]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorThorsten Kukuk <kukuk@thkukuk.de>
Fri, 16 Jun 2006 16:16:03 +0000 (16:16 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Fri, 16 Jun 2006 16:16:03 +0000 (16:16 +0000)
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.

ChangeLog
modules/pam_unix/pam_unix_passwd.c

index 334d68e3479e9e8e175de0010ea5cd000f60b097..b6da386cfca8f9748bf0029efac18b229ede59e4 100644 (file)
--- 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.
 
index a9d40281c3f31616a100914bc2b3442a54034745..da96d3dfc975ac7b8fbb5367864a1c2c9ace508f 100644 (file)
@@ -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