From 9a44c4f91ce7e517d5325fd3743e6ad9d54ef3f0 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 28 Dec 2006 05:44:47 +0000 Subject: bb_xget[pw/gr]nam were horribly misnamed - fixed. uidgid_get -> get_uidgid, add additional param (numeric_ok). Make chown use it. chown: fix "chown user: ...." install: fix incorrect use of bb_xget[pw/gr]nam --- loginutils/adduser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'loginutils') diff --git a/loginutils/adduser.c b/loginutils/adduser.c index 418d4c7..5766e5d 100644 --- a/loginutils/adduser.c +++ b/loginutils/adduser.c @@ -157,7 +157,7 @@ static int adduser(struct passwd *p, unsigned long flags) * gecos * * can be customized via command-line parameters. - * ________________________________________________________________________ */ + */ int adduser_main(int argc, char **argv) { struct passwd pw; @@ -187,7 +187,7 @@ int adduser_main(int argc, char **argv) pw.pw_name = argv[optind]; pw.pw_passwd = "x"; pw.pw_uid = 0; - pw.pw_gid = (usegroup) ? bb_xgetgrnam(usegroup) : 0; /* exits on failure */ + pw.pw_gid = usegroup ? xgroup2gid(usegroup) : 0; /* exits on failure */ /* grand finale */ return adduser(&pw, flags); -- cgit v1.1