Re: ipsvd patch
Gerrit Pape <[email protected]>
| Newsgroups | gmane.comp.misc.pape.general |
|---|---|
| Message-ID | <20070716095038.13746.qmail@b40718cdb116df.315fe32.mid.smarden.org> |
On Mon, Jul 16, 2007 at 10:30:41AM +0300, Nikola Vladov wrote:
> I sudjest a replacemat of uidgid.c
> I'll spport numeric UID/GID
> expample:
> -u 123:456
>
> It can be also dangerous. Let for example /etc/passwd has line:
> 123:x:1000:1000:Bad user:/home/Bad_user:/bin/bash
Hi, I've done this for chpst in runit 1.7.1, from the man page:
-u [:]user[:group]
setuidgid. Set uid and gid to the user's uid and gid, as found
in /etc/passwd. If user is followed by a colon and a group, set
the gid to group's gid, as found in /etc/group, instead of
user's gid. If group consists of a colon-separated list of
group names, chpst sets the group ids of all listed groups. If
user is prefixed with a colon, the user and all group arguments
are interpreted as uid and gids respectivly, and not looked up
in the password or group file. All initial supplementary groups
are removed.
We could include that into ipsvd I think.
Thanks, Gerrit.