From d73cbd31a295ac757e59f129f162d9cd69440224 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 21 Jul 2008 14:41:33 +0000 Subject: - first pass to unify/cleanup uid handling (-236b) This needs further love, alot of love.. Tito? --- runit/chpst.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'runit') 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)); } -- cgit v1.1