aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-09-02 22:22:17 +0000
committerEric Andersen <andersen@codepoet.org>2004-09-02 22:22:17 +0000
commit192c35f6eb2bb85e28c697a45c7d80a43ec6e743 (patch)
treecca9dfaedbd20844b78eccf5e30b9d0f95b5975a /loginutils
parent7eb79fff10915afc4d561a65e54851efa869db89 (diff)
downloadbusybox-192c35f6eb2bb85e28c697a45c7d80a43ec6e743.tar.gz
Tito writes:
The second patch contains: 1) a size optimization for adduser.c 2) removes a warning about an unused variable in syslogd.c if CONFIG_FEATURE_REMOTE_LOG is not set 3)cosmetic fixes for addgroup_full_usage and adduser_full_usage Ciao, Tito
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/adduser.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index 768788845..7fa05a013 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -305,13 +305,8 @@ int adduser_main(int argc, char **argv)
if (usegroup) {
/* Add user to a group that already exists */
- struct group *g;
-
- g = getgrnam(usegroup);
- if (g == NULL)
- bb_error_msg_and_die("group %s does not exist", usegroup);
-
- pw.pw_gid = g->gr_gid;
+ pw.pw_gid = my_getgrnam(usegroup);
+ /* exits on error */
}
/* grand finale */