aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2006-06-16 16:16:03 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2006-06-16 16:16:03 +0000
commit607a06e8e7db6e0171fa8b94e4859560a844ec24 (patch)
treee3e48efd9b7d4559b779869ee324d1471fd0aafb
parent7a0f2068e46a27a527a94227a2f9b8038d152a83 (diff)
downloadpam-607a06e8e7db6e0171fa8b94e4859560a844ec24.tar.gz
pam-607a06e8e7db6e0171fa8b94e4859560a844ec24.tar.bz2
pam-607a06e8e7db6e0171fa8b94e4859560a844ec24.zip
Relevant BUGIDs:
Purpose of commit: bugfix Commit summary: --------------- 2006-06-16 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_unix/pam_unix_passwd.c (save_old_password): UIDs are unsigned on Linux, don't truncate them. (_do_setpass): err is of type clnt_stat, not int.
-rw-r--r--ChangeLog4
-rw-r--r--modules/pam_unix/pam_unix_passwd.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 334d68e3..b6da386c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-06-16 Thorsten Kukuk <kukuk@thkukuk.de>
+ * modules/pam_unix/pam_unix_passwd.c (save_old_password): UIDs
+ are unsigned on Linux, don't truncate them.
+ (_do_setpass): err is of type clnt_stat, not int.
+
* modules/pam_lastlog/pam_lastlog.c (last_login_read): Don't
truncate UID for syslog output.
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index a9d40281..da96d3df 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -470,8 +470,8 @@ static int save_old_password(pam_handle_t *pamh,
err = 1;
} else {
pass = crypt_md5_wrapper(oldpass);
- snprintf(nbuf, sizeof(nbuf), "%s:%d:1:%s\n",
- forwho, pwd->pw_uid, pass);
+ snprintf(nbuf, sizeof(nbuf), "%s:%lu:1:%s\n",
+ forwho, (unsigned long)pwd->pw_uid, pass);
_pam_delete(pass);
if (fputs(nbuf, pwfile) < 0) {
err = 1;
@@ -763,7 +763,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho,
struct yppasswd yppwd;
CLIENT *clnt;
int status;
- int err = 0;
+ enum clnt_stat err;
/* Unlock passwd file to avoid deadlock */
#ifdef USE_LCKPWDF