]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs:
authorThorsten Kukuk <kukuk@thkukuk.de>
Mon, 28 Jan 2008 14:50:21 +0000 (14:50 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Mon, 28 Jan 2008 14:50:21 +0000 (14:50 +0000)
Purpose of commit: cleanup

Commit summary:
---------------

2008-01-28  Thorsten Kukuk  <kukuk@thkukuk.de>

        * libpam/pam_audit.c: Include pam_modutil_private.h.

        * libpam/pam_item.c (pam_set_item): Fix compiler warning.

        * libpam/pam_end.c (pam_end): Cast to correct pointer type.
        * libpam/include/security/_pam_macros.h (_pam_overwrite_n): Use
        unsigned int.

ChangeLog
libpam/include/security/_pam_macros.h
libpam/pam_audit.c
libpam/pam_end.c
libpam/pam_item.c

index 7b0e3bf98784091cc247183216dd48ec7c60a183..0358a2fee405e082cf29d797fd744e289e095995 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-2008-01-28  Thorsten Kukuk  <kukuk@suse.de>
+2008-01-28  Thorsten Kukuk  <kukuk@thkukuk.de>
+
+       * libpam/pam_audit.c: Include pam_modutil_private.h.
+
+       * libpam/pam_item.c (pam_set_item): Fix compiler warning.
+
+       * libpam/pam_end.c (pam_end): Cast to correct pointer type.
+       * libpam/include/security/_pam_macros.h (_pam_overwrite_n): Use
+       unsigned int.
 
        * modules/pam_unix/passverify.c: Fix compiling without SELinux
        support.
index 72aaf4682ce0bac1a631a73ef050b138262570ad..bd107cfb68cb191fd69b87e462b1d91b6c5f7cad 100644 (file)
@@ -28,7 +28,7 @@ do {                             \
 #define _pam_overwrite_n(x,n)   \
 do {                             \
      register char *__xx__;      \
-     register int __i__ = 0;    \
+     register unsigned int __i__ = 0;    \
      if ((__xx__=(x)))           \
         for (;__i__<n; __i__++) \
             __xx__[__i__] = 0; \
@@ -94,7 +94,7 @@ static void _pam_output_debug_info(const char *file, const char *fn
 {
     FILE *logfile;
     int must_close = 1, fd;
-   
+
 #ifdef O_NOFOLLOW
     if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_NOFOLLOW|O_APPEND)) != -1) {
 #else
@@ -120,7 +120,7 @@ static void _pam_output_debug(const char *format, ...)
     va_list args;
     FILE *logfile;
     int must_close = 1, fd;
-    
+
     va_start(args, format);
 
 #ifdef O_NOFOLLOW
index a9d72176b6af1b8014ae05a8cfd8e712e68f5043..6fd6a0c1ebc3890046977a24f83f83faed6f2ce5 100644 (file)
@@ -6,9 +6,10 @@
    Authors:
    Steve Grubb <sgrubb@redhat.com> */
 
-#include "pam_private.h"
 #include <stdio.h>
 #include <syslog.h>
+#include "pam_private.h"
+#include "pam_modutil_private.h"
 
 #ifdef HAVE_LIBAUDIT
 #include <libaudit.h>
index f400c325b3c3f6cdb49f005e192b43c376d42fde..c96dc384e845a33f5a70f65c754a970448366e8a 100644 (file)
@@ -78,9 +78,9 @@ int pam_end(pam_handle_t *pamh, int pam_status)
 
     _pam_overwrite(pamh->xauth.name);
     _pam_drop(pamh->xauth.name);
-    _pam_overwrite_n(pamh->xauth.data, pamh->xauth.datalen);
+    _pam_overwrite_n(pamh->xauth.data, (unsigned int)pamh->xauth.datalen);
     _pam_drop(pamh->xauth.data);
-    _pam_overwrite_n(&pamh->xauth, sizeof(pamh->xauth));
+    _pam_overwrite_n((char *)&pamh->xauth, sizeof(pamh->xauth));
 
     /* and finally liberate the memory for the pam_handle structure */
 
index 41d900874f989c97f58bdd9f62d3e1609d54a0dc..f1bd972564735c0578e58a6bbc05307ffe59e90c 100644 (file)
@@ -148,7 +148,8 @@ int pam_set_item (pam_handle_t *pamh, int item_type, const void *item)
            free(pamh->xauth.name);
        }
        if (pamh->xauth.datalen) {
-           _pam_overwrite_n(pamh->xauth.data, pamh->xauth.datalen);
+         _pam_overwrite_n(pamh->xauth.data,
+                          (unsigned int) pamh->xauth.datalen);
            free(pamh->xauth.data);
        }
        pamh->xauth = *((const struct pam_xauth_data *) item);