summaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorDenis Vlasenko2006-12-28 05:44:47 +0000
committerDenis Vlasenko2006-12-28 05:44:47 +0000
commit9a44c4f91ce7e517d5325fd3743e6ad9d54ef3f0 (patch)
tree34292ef12cab59b118e91a6c58844ae25f1bee94 /loginutils
parentba092336f00644c1233735bae4b81382309955d8 (diff)
downloadbusybox-9a44c4f91ce7e517d5325fd3743e6ad9d54ef3f0.zip
busybox-9a44c4f91ce7e517d5325fd3743e6ad9d54ef3f0.tar.gz
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
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/adduser.c4
1 files changed, 2 insertions, 2 deletions
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);