summaryrefslogtreecommitdiff
path: root/runit
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-07-21 14:41:33 +0000
committerBernhard Reutner-Fischer2008-07-21 14:41:33 +0000
commitd73cbd31a295ac757e59f129f162d9cd69440224 (patch)
tree53d9c4cff7223be124698ec8cc3ccba4bded52eb /runit
parenta53de7f7c2cd3ac46b26642aafb1a573a096a80d (diff)
downloadbusybox-d73cbd31a295ac757e59f129f162d9cd69440224.zip
busybox-d73cbd31a295ac757e59f129f162d9cd69440224.tar.gz
- first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
Diffstat (limited to 'runit')
-rw-r--r--runit/chpst.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/runit/chpst.c b/runit/chpst.c
index 899a4ee..3c841dd 100644
--- a/runit/chpst.c
+++ b/runit/chpst.c
@@ -81,9 +81,7 @@ static void suidgid(char *user)
{
struct bb_uidgid_t ugid;
- if (!get_uidgid(&ugid, user, 1)) {
- bb_error_msg_and_die("unknown user/group: %s", user);
- }
+ xget_uidgid(&ugid, user);
if (setgroups(1, &ugid.gid) == -1)
bb_perror_msg_and_die("setgroups");
xsetgid(ugid.gid);
@@ -94,9 +92,7 @@ static void euidgid(char *user)
{
struct bb_uidgid_t ugid;
- if (!get_uidgid(&ugid, user, 1)) {
- bb_error_msg_and_die("unknown user/group: %s", user);
- }
+ xget_uidgid(&ugid, user);
xsetenv("GID", utoa(ugid.gid));
xsetenv("UID", utoa(ugid.uid));
}