src/: Use xasprintf() instead of its pattern
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
44ba094766
commit
d9923431eb
+2
-3
@@ -412,15 +412,14 @@ usage (int status)
|
||||
static char *new_pw_passwd (char *pw_pass)
|
||||
{
|
||||
if (Lflg && ('!' != pw_pass[0])) {
|
||||
char *buf = XMALLOC(strlen(pw_pass) + 2, char);
|
||||
char *buf;
|
||||
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||
"updating passwd", user_newname, user_newid, 0);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "lock user '%s' password", user_newname));
|
||||
strcpy (buf, "!");
|
||||
strcat (buf, pw_pass);
|
||||
xasprintf(&buf, "!%s", pw_pass);
|
||||
pw_pass = buf;
|
||||
} else if (Uflg && pw_pass[0] == '!') {
|
||||
if (pw_pass[1] == '\0') {
|
||||
|
||||
Reference in New Issue
Block a user