[Pkg-shadow-commits] r1558 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sat Dec 29 14:52:35 UTC 2007
Author: nekral-guest
Date: 2007-12-29 14:52:35 +0000 (Sat, 29 Dec 2007)
New Revision: 1558
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/newusers.c
Log:
Avoid variables with the name of a type.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2007-12-29 14:48:33 UTC (rev 1557)
+++ upstream/trunk/ChangeLog 2007-12-29 14:52:35 UTC (rev 1558)
@@ -7,6 +7,7 @@
pam API was already checked. No need to validate it again.
* src/newusers.c: Avoid implicit brackets.
* src/newusers.c: Avoid assignments in comparisons.
+ * src/newusers.c: Avoid variables with the name of a type.
2007-12-29 Nicolas François <nicolas.francois at centraliens.net>
Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c 2007-12-29 14:48:33 UTC (rev 1557)
+++ upstream/trunk/src/newusers.c 2007-12-29 14:52:35 UTC (rev 1558)
@@ -256,7 +256,7 @@
return !pw_update (&pwent);
}
-static void update_passwd (struct passwd *pwd, const char *passwd)
+static void update_passwd (struct passwd *pwd, const char *password)
{
void *crypt_arg = NULL;
if (crypt_method != NULL) {
@@ -266,9 +266,9 @@
}
if ((crypt_method != NULL) && (0 == strcmp(crypt_method, "NONE"))) {
- pwd->pw_passwd = (char *)passwd;
+ pwd->pw_passwd = (char *)password;
} else {
- pwd->pw_passwd = pw_encrypt (passwd,
+ pwd->pw_passwd = pw_encrypt (password,
crypt_make_salt (crypt_method,
crypt_arg));
}
@@ -277,7 +277,7 @@
/*
* add_passwd - add or update the encrypted password
*/
-static int add_passwd (struct passwd *pwd, const char *passwd)
+static int add_passwd (struct passwd *pwd, const char *password)
{
const struct spwd *sp;
struct spwd spent;
@@ -294,7 +294,7 @@
* harder since there are zillions of things to do ...
*/
if (!is_shadow) {
- update_passwd (pwd, passwd);
+ update_passwd (pwd, password);
return 0;
}
@@ -305,7 +305,7 @@
sp = spw_locate (pwd->pw_name);
if (NULL != sp) {
spent = *sp;
- spent.sp_pwdp = pw_encrypt (passwd,
+ spent.sp_pwdp = pw_encrypt (password,
crypt_make_salt (crypt_method,
crypt_arg));
return !spw_update (&spent);
@@ -318,7 +318,7 @@
* the password set someplace else.
*/
if (strcmp (pwd->pw_passwd, "x") != 0) {
- update_passwd (pwd, passwd);
+ update_passwd (pwd, password);
return 0;
}
@@ -327,7 +327,7 @@
* shadow password file entry.
*/
spent.sp_namp = pwd->pw_name;
- spent.sp_pwdp = pw_encrypt (passwd,
+ spent.sp_pwdp = pw_encrypt (password,
crypt_make_salt (crypt_method, crypt_arg));
spent.sp_lstchg = time ((time_t *) 0) / SCALE;
spent.sp_min = getdef_num ("PASS_MIN_DAYS", 0);
More information about the Pkg-shadow-commits
mailing list