[PATH] -g option for httpd and default user

Denis Vlasenko vda.linux at googlemail.com
Mon Oct 2 19:38:14 UTC 2006


On Monday 25 September 2006 19:58, Luciano Miguel Ferreira Rocha wrote:
> 
> Hello,
> 
> The attached patch changes httpd in the following ways when
> CONFIG_FEATURE_HTTPD_SETUID is set:
> 
> 1. -u now also sets the group id (from pwent->pw_gid, if found, else
>    same as uid)

Same as uid? Rationale?

> 2. new -g option, defining new group id
> 3. setgid and setuid are always called, even in the absence of -u/-g,
>    and a new option for defining the default was added. Default is "-1".

Why they are always called? What if I want to run httpd under
current user/group?

More general question: why does httpd needs -u AT ALL?
Should we add similar options to all other daemons now?
Obviously not, setuidgid utility handles that just fine:

setuidgid apache httpd -opt

Or chpst from runit... (/me needs to merge that...)

Note that httpd.c has been reformatted. I am attaching
one from svn for your easy reference.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.c.bz2
Type: application/x-bzip2
Size: 15022 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061002/f5dbb958/attachment-0002.bin 


More information about the busybox mailing list