diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 14:41:33 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 14:41:33 +0000 |
commit | d73cbd31a295ac757e59f129f162d9cd69440224 (patch) | |
tree | 53d9c4cff7223be124698ec8cc3ccba4bded52eb /loginutils | |
parent | a53de7f7c2cd3ac46b26642aafb1a573a096a80d (diff) |
- first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/passwd.c | 5 | ||||
-rw-r--r-- | loginutils/vlock.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index 84e5aeb6d..99fb76eca 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -27,7 +27,7 @@ static char* new_password(const struct passwd *pw, uid_t myuid, int algo) goto err_ret; encrypted = pw_encrypt(orig, pw->pw_passwd, 1); /* returns malloced str */ if (strcmp(encrypted, pw->pw_passwd) != 0) { - syslog(LOG_WARNING, "incorrect password for '%s'", + syslog(LOG_WARNING, "incorrect password for %s", pw->pw_name); bb_do_delay(FAIL_DELAY); puts("Incorrect password"); @@ -119,7 +119,8 @@ int passwd_main(int argc UNUSED_PARAM, char **argv) name = argv[0] ? argv[0] : myname; pw = getpwnam(name); - if (!pw) bb_error_msg_and_die("unknown user %s", name); + if (!pw) + bb_error_msg_and_die("unknown user %s", name); if (myuid && pw->pw_uid != myuid) { /* LOGMODE_BOTH */ bb_error_msg_and_die("%s can't change password for %s", myname, name); diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 442272a05..42ef44732 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -40,7 +40,7 @@ int vlock_main(int argc UNUSED_PARAM, char **argv) struct vt_mode ovtm; uid_t uid; struct passwd *pw; - +/* XXX: xgetpwuid */ uid = getuid(); pw = getpwuid(uid); if (pw == NULL) |