diff options
author | Gerrit Pape <pape@smarden.org> | 2005-08-23 22:36:27 +0000 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2005-08-23 22:36:27 +0000 |
commit | 84457fd2a4bfb662aacd11f9106323efe4b2f915 (patch) | |
tree | f9f062142b6fc5c063571cb7ba0b677d5be9546a /src/chpst.c | |
parent | e99bbdcb0d7f846f39fb1ee10879ea9d19f99d55 (diff) | |
download | runit-84457fd2a4bfb662aacd11f9106323efe4b2f915.tar.gz runit-84457fd2a4bfb662aacd11f9106323efe4b2f915.tar.xz runit-84457fd2a4bfb662aacd11f9106323efe4b2f915.zip |
* doc/runscripts.html: typo; openssh needs absolute path (thx Kevin Berry);
exec into dhcpcd. * uidgid.c, uidgid.h, chpst.c: support colon-separated list of groups. * sv.c: utilize optional ./check script in service directory to check for availablity of service. * runsv.c: wait_pid() might be interupted. * man/chpst.8, man/sv.8: adapt.
Diffstat (limited to 'src/chpst.c')
-rw-r--r-- | src/chpst.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/chpst.c b/src/chpst.c index cbf34eb..3381a3b 100644 --- a/src/chpst.c +++ b/src/chpst.c @@ -70,7 +70,8 @@ void suidgid(char *user, unsigned int dogrp) { else fatalx("unknown account", user); } - if (prot_gid(ugid.gid) == -1) fatal("unable to setgid"); + if (setgroups(ugid.gids, ugid.gid) == -1) fatal("unable to setgroups"); + if (setgid(*ugid.gid) == -1) fatal("unable to setgid"); if (prot_uid(ugid.uid) == -1) fatal("unable to setuid"); } @@ -84,7 +85,7 @@ void euidgid(char *user, unsigned int dogrp) { else fatalx("unknown account", user); } - bufnum[fmt_ulong(bufnum, ugid.gid)] =0; + bufnum[fmt_ulong(bufnum, *ugid.gid)] =0; if (! pathexec_env("GID", bufnum)) die_nomem(); bufnum[fmt_ulong(bufnum, ugid.uid)] =0; if (! pathexec_env("UID", bufnum)) die_nomem(); |