[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Patch for adduser: Create a system user
From:       Charlie Brady <charlieb-busybox () e-smith ! com>
Date:       2007-10-30 21:09:10
Message-ID: Pine.LNX.4.44.0710301701410.32260-100000 () allspice ! nssg ! mitel ! com
[Download RAW message or body]


On Mon, 29 Oct 2007, Denys Vlasenko wrote:

> It also has "can select duplicate uid" bug fixed too:
> 
>         /* check for a free uid (and maybe gid) */
>         while (getpwuid(p->pw_uid) || (!p->pw_gid && getgrgid(p->pw_uid)))
>                 p->pw_uid++;
> 
> BTW, why are we setting setgid bit here?
> 
>       chmod(pw.pw_dir, 02755) /* set setgid bit on homedir */
> 
> I vaguely remember that it means something for the creation of new files.
> Right?

New files will take the group from the directory, rather than the gid of 
the creating process.

Google is still your friend:

http://www.google.com/search?q=setgid+directory+permissions

--
Charlie

_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic