diff options
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/passwd.c | 2 | ||||
-rw-r--r-- | loginutils/vlock.c | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index 99fb76e..b156ab5 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -115,7 +115,7 @@ int passwd_main(int argc UNUSED_PARAM, char **argv) bb_show_usage(); /* Will complain and die if username not found */ - myname = xstrdup(bb_getpwuid(NULL, -1, myuid)); + myname = xstrdup(xuid2uname(myuid)); name = argv[0] ? argv[0] : myname; pw = getpwnam(name); diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 0262da5..85f489c 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -38,14 +38,9 @@ int vlock_main(int argc UNUSED_PARAM, char **argv) struct termios term; struct termios oterm; struct vt_mode ovtm; - uid_t uid; struct passwd *pw; -/* XXX: xgetpwuid */ - uid = getuid(); - pw = getpwuid(uid); - if (pw == NULL) - bb_error_msg_and_die("unknown uid %d", (int)uid); + pw = xgetpwuid(getuid()); opt_complementary = "=0"; /* no params! */ getopt32(argv, "a"); |