Darren J Moffat wrote:
Maybe I'm not reading the code correctly but it looks like in
pre_get_uid_gid() you pass in the user and group names to
image.can_change_file_ownership(). So can't use use that user and
group name in the chown call ?
Sorry about that. The webrev was updated by mistake with an
intermediate and incorrect copy of the code. I was thinking about being
able to pass that in, but then realized that the value there is a user
name (not a uid) and it isn't even a valid one at that.
This would still trigger audit records, but currently we ship
packages for user images with owner=root group=sys, so there are
attempts to change ownership to uid=0, uid=3 already when packages
are installed by non-root users into user images.
That is actually a better failure audit record than st_uid + 1 because
it is meaningful to what was happening. What is st_uid + 1 happens to
be the CFO's uid that could set of all sorts of alarm bells.
I've changed the code to try to set the owner and group to 0 as a test
as to whether a ownership change is possible. Also, I changed the
exception handling to just catch OSError, per Shawn's comment. Also, I
remerged with the gate, which means bumping the version to 21 since a
previous checkin took 20.
New webrev here:
http://cr.opensolaris.org/~tmueller/ips-1530.2/
Thanks.
Tom
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss