Tom Mueller wrote:
Tom Mueller wrote:
Shawn Walker wrote:
Tom Mueller (plain-text) wrote:
pkg(1) now prints a message and returns 1. However, for a user image where the user is unable to change the ownership of a file anyway, not having the required user/group is ignored.

I don't agree with the assumption that a user image automatically implies that a user doesn't have the permissions to change ownership of a file.

With the change, the Image class has a "can_change_file_ownership" method that tests to see if the user running the command actually has the ability to change file ownership within the image. This test is only done for non-ENTIRE images. Only if it is a non-ENTIRE image AND the user cannot change file ownership of a temporary file are invalid owner/group tags ignored.

AFAIK, I'm not making the assumption that you don't agree with.
One other point. Before this change, we were already ignoring the inability to change the ownership of files in a user image. For example, if a file action says the file is to be owned by root, but the user running the install is unable to change a file to root, pkg(5) silently ignores this error and the file is owned by the user. In the long term, this behavior should be changed by making the owner/group tags optional on file and dir actions.

This change just provides parity for unknown users and group for that case rather than throwing an exception. And for the user with the ability to change file ownership, it is now reported as an error rather than throwing a traceback as it did before.

If you haven't made things any worse, then I can't complain too much. But I don't like silently ignoring the error either :/
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to