[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] start-stop-daemon cannot set gid
From: Luciano Miguel Ferreira Rocha <strange () nsk ! no-ip ! org>
Date: 2007-02-26 23:00:31
Message-ID: 20070226230031.GA19584 () nsk ! no-ip ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Mon, Feb 26, 2007 at 11:45:37PM +0100, Denis Vlasenko wrote:
> On Monday 26 February 2007 14:51, Thaddeus Ternes wrote:
> > On 2006/7/16, I posted a patch that added chuid support to
> > start-stop-daemon. See this thread for the original patch:
> >
> > http://busybox.net/lists/busybox/2006-July/023212.html
> >
> > I'm including a modification of that patch to add chgid support as
> > well. The syntax is a bit different the previous proposed patch on
> > this thread, but it may be of interest to some.
>
> If there is a "standard" start-stop-daemon (I suppose there is,
> but I don't use Debian, so I don't know for sure), it's better
> to match it, I think.
>
> With the patch Natanael just tested, bbox ssd supports:
>
> --chuid <user>[:[<group>]]
> or
> --chuid :<group>
>
> Does this match "standard"? If not, I will gladly take
> patches which fix that...
> --
man page:
-g|--group group|gid
Change to group or gid when starting the process.
-c|--chuid username|uid
Change to this username/uid before starting the process. You can
also specify a group by appending a :, then the group or gid in
the same way as you would for the `chown' command (user:group).
When using this option you must realize that the primary and
supplemental groups are set as well, even if the --group option
is not specified. The --group option is only for groups that
the user isn't normally a member of (like adding per/process
group membership for generic users like nobody).
According to source code, username is mandatory (otherwise getpwnam will
fail and cause the process to terminate).
--
lfr
0/0
[Attachment #5 (application/pgp-signature)]
_______________________________________________
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