[Pkg-shadow-devel] user ID change

Nicolas François nicolas.francois at centraliens.net
Tue Apr 14 22:16:32 UTC 2009


On Sun, Apr 05, 2009 at 11:22:59PM +0200, nicolas.francois at centraliens.net wrote:
> Hi,
> 
> On Fri, Apr 03, 2009 at 04:54:42PM +0200, pvrabec at redhat.com wrote:
> > Can you look at the patch, please.
> 
> I had a look at chown_tree, and it already protects against changing the
> ownership of files that are not already owned by the user (on a file per
> file basis).

There are other chown() in move_home and move_mailbox() that would have to
be checked.

At first glance, move_mailbox() looks OK.

The first chown in move_home is OK (UID and GID are preserved)
copy_tree is probably not since it lacks the knowledge of the old IDs.
The final chwon in move_home does not look necessary.

Using -m and -u will result in two chown for each file. This should be
improved.

These issues only occur when the -m/--move-home option is used.
Hum, hopefully, this option is not documented ;)

I will fix these.
And add test cases to make sure that only the right files get their IDs
changed.

Best Regards
-- 
Nekral



More information about the Pkg-shadow-devel mailing list