user_newname can only be used in WITH_AUDIT code or when lflg is set. This
issue was introduced in the code refactoring of usermod.
This commit is contained in:
parent
229e6cbdd8
commit
294e3a632e
@ -1,3 +1,9 @@
|
|||||||
|
2008-01-23 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/usermod.c: user_newname can only be used in WITH_AUDIT code
|
||||||
|
or when lflg is set. This issue was introduced in the code
|
||||||
|
refactoring of usermod.
|
||||||
|
|
||||||
2008-01-22 Nicolas François <nicolas.francois@centraliens.net>
|
2008-01-22 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/groupadd.c: Fix typo in comment: s/find_new_uid/find_new_gid/
|
* src/groupadd.c: Fix typo in comment: s/find_new_uid/find_new_gid/
|
||||||
|
@ -319,7 +319,8 @@ static char *new_pw_passwd (char *pw_pass)
|
|||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating passwd",
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating passwd",
|
||||||
user_newname, user_newid, 0);
|
user_newname, user_newid, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "lock user `%s' password", user_newname));
|
SYSLOG ((LOG_INFO, "lock user `%s' password",
|
||||||
|
lflg ? user_newname : user_name));
|
||||||
strcpy (buf, "!");
|
strcpy (buf, "!");
|
||||||
strcat (buf, pw_pass);
|
strcat (buf, pw_pass);
|
||||||
pw_pass = buf;
|
pw_pass = buf;
|
||||||
@ -338,7 +339,8 @@ static char *new_pw_passwd (char *pw_pass)
|
|||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating password",
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating password",
|
||||||
user_newname, user_newid, 0);
|
user_newname, user_newid, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "unlock user `%s' password", user_newname));
|
SYSLOG ((LOG_INFO, "unlock user `%s' password",
|
||||||
|
lflg ? user_newname : user_name));
|
||||||
s = pw_pass;
|
s = pw_pass;
|
||||||
while (*s) {
|
while (*s) {
|
||||||
*s = *(s + 1);
|
*s = *(s + 1);
|
||||||
@ -349,7 +351,8 @@ static char *new_pw_passwd (char *pw_pass)
|
|||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "changing password",
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "changing password",
|
||||||
user_newname, user_newid, 1);
|
user_newname, user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "change user `%s' password", user_newname));
|
SYSLOG ((LOG_INFO, "change user `%s' password",
|
||||||
|
lflg ? user_newname : user_name));
|
||||||
pw_pass = xstrdup (user_pass);
|
pw_pass = xstrdup (user_pass);
|
||||||
}
|
}
|
||||||
return pw_pass;
|
return pw_pass;
|
||||||
|
Loading…
Reference in New Issue
Block a user