summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--libpam/include/security/_pam_macros.h6
-rw-r--r--libpam/pam_audit.c3
-rw-r--r--libpam/pam_end.c4
-rw-r--r--libpam/pam_item.c3
5 files changed, 18 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b0e3bf9..0358a2fe 100644
--- 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.
diff --git a/libpam/include/security/_pam_macros.h b/libpam/include/security/_pam_macros.h
index 72aaf468..bd107cfb 100644
--- a/libpam/include/security/_pam_macros.h
+++ b/libpam/include/security/_pam_macros.h
@@ -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
diff --git a/libpam/pam_audit.c b/libpam/pam_audit.c
index a9d72176..6fd6a0c1 100644
--- a/libpam/pam_audit.c
+++ b/libpam/pam_audit.c
@@ -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>
diff --git a/libpam/pam_end.c b/libpam/pam_end.c
index f400c325..c96dc384 100644
--- a/libpam/pam_end.c
+++ b/libpam/pam_end.c
@@ -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 */
diff --git a/libpam/pam_item.c b/libpam/pam_item.c
index 41d90087..f1bd9725 100644
--- a/libpam/pam_item.c
+++ b/libpam/pam_item.c
@@ -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);