Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg list should be able to refresh the local cache #137

Merged
merged 1 commit into from
Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/Zadm/Zones.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ has brands => sub {
];
};
has availbrands => sub($self) {
privSet({ add => 1, inherit => 1 }, PRIV_NET_ACCESS);
my $pkg = $self->utils->readProc('pkg', [ qw(list -aHv), "$PKGPREFIX/*" ]);
privSet({ remove => 1, inherit => 1 }, PRIV_NET_ACCESS);
# TODO: the state of sn1/s10 brands is currently unknown
# while zadm can still be used to configure them we don't advertise them as available
return [ grep { !/^(?:sn1|s10)$/ } map { m!\Q$PKGPREFIX\E/([^@/]+)\@! } @$pkg ];
Expand Down
4 changes: 2 additions & 2 deletions test/lib/perl5/Sun/Solaris/Privilege.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ use constant {
};

my @constants = qw(PRIV_DEBUG PRIV_EFFECTIVE PRIV_FILE_DAC_READ PRIV_FILE_DAC_WRITE
PRIV_INHERITABLE PRIV_LIMIT PRIV_OFF PRIV_ON PRIV_PERMITTED PRIV_SET PRIV_STR_LIT
PRIV_STR_PORT PRIV_SYS_DL_CONFIG PRIV_SYS_MOUNT);
PRIV_INHERITABLE PRIV_LIMIT PRIV_NET_ACCESS PRIV_OFF PRIV_ON PRIV_PERMITTED
PRIV_SET PRIV_STR_LIT PRIV_STR_PORT PRIV_SYS_DL_CONFIG PRIV_SYS_MOUNT);

our @EXPORT_OK = (@constants, qw(getppriv priv_addset priv_emptyset priv_fillset
priv_intersect priv_set_to_str priv_str_to_set setpflags setppriv));
Expand Down