[Pkg-shadow-commits] r1664 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun Jan 6 12:50:22 UTC 2008
Author: nekral-guest
Date: 2008-01-06 12:50:22 +0000 (Sun, 06 Jan 2008)
New Revision: 1664
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/usermod.c
Log:
Remove the pw_name argument of new_pw_passwd. Use the user_newname global
variable instead. This avoid using a parameter with the same name as a function.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-01-06 12:31:06 UTC (rev 1663)
+++ upstream/trunk/ChangeLog 2008-01-06 12:50:22 UTC (rev 1664)
@@ -1,5 +1,11 @@
2008-01-06 Nicolas François <nicolas.francois at centraliens.net>
+ * src/usermod.c: Remove the pw_name argument of new_pw_passwd. Use
+ the user_newname global variable instead. This avoid using a
+ parameter with the same name as a function.
+
+2008-01-06 Nicolas François <nicolas.francois at centraliens.net>
+
* src/newgrp.c: Removed unused gid parameter of syslog_sg().
* src/newgrp.c: The loginname and tty buffers are never changed.
Add the const qualifier.
Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c 2008-01-06 12:31:06 UTC (rev 1663)
+++ upstream/trunk/src/usermod.c 2008-01-06 12:50:22 UTC (rev 1664)
@@ -310,7 +310,7 @@
* update encrypted password string (for both shadow and non-shadow
* passwords)
*/
-static char *new_pw_passwd (char *pw_pass, const char *pw_name)
+static char *new_pw_passwd (char *pw_pass)
{
if (Lflg && pw_pass[0] != '!') {
char *buf = xmalloc (strlen (pw_pass) + 2);
@@ -319,7 +319,7 @@
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating passwd",
user_newname, user_newid, 0);
#endif
- SYSLOG ((LOG_INFO, "lock user `%s' password", pw_name));
+ SYSLOG ((LOG_INFO, "lock user `%s' password", user_newname));
strcpy (buf, "!");
strcat (buf, pw_pass);
pw_pass = buf;
@@ -338,7 +338,7 @@
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "updating password",
user_newname, user_newid, 0);
#endif
- SYSLOG ((LOG_INFO, "unlock user `%s' password", pw_name));
+ SYSLOG ((LOG_INFO, "unlock user `%s' password", user_newname));
s = pw_pass;
while (*s) {
*s = *(s + 1);
@@ -349,7 +349,7 @@
audit_logger (AUDIT_USER_CHAUTHTOK, Prog, "changing password",
user_newname, user_newid, 1);
#endif
- SYSLOG ((LOG_INFO, "change user `%s' password", pw_name));
+ SYSLOG ((LOG_INFO, "change user `%s' password", user_newname));
pw_pass = xstrdup (user_pass);
}
return pw_pass;
@@ -374,7 +374,7 @@
}
if (!is_shadow_pwd)
pwent->pw_passwd =
- new_pw_passwd (pwent->pw_passwd, pwent->pw_name);
+ new_pw_passwd (pwent->pw_passwd);
if (uflg) {
#ifdef WITH_AUDIT
@@ -519,7 +519,7 @@
spent->sp_expire = user_expire;
#endif
}
- spent->sp_pwdp = new_pw_passwd (spent->sp_pwdp, spent->sp_namp);
+ spent->sp_pwdp = new_pw_passwd (spent->sp_pwdp);
if (pflg)
spent->sp_lstchg = time ((time_t *) 0) / SCALE;
}
More information about the Pkg-shadow-commits
mailing list