-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.
#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; \
{
FILE *logfile;
int must_close = 1, fd;
-
+
#ifdef O_NOFOLLOW
if ((fd = open(_PAM_LOGFILE, O_WRONLY|O_NOFOLLOW|O_APPEND)) != -1) {
#else
va_list args;
FILE *logfile;
int must_close = 1, fd;
-
+
va_start(args, format);
#ifdef O_NOFOLLOW
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>
_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 */
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);