Skip to content

Commit

Permalink
Merge pull request #137 from hadfl/pkg
Browse files Browse the repository at this point in the history
pkg list should be able to refresh the local cache
  • Loading branch information
citrus-it authored Oct 31, 2022
2 parents 715f83a + 4ea8760 commit 5cbbae0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 5cbbae0

Please sign in to comment.