diff options
Diffstat (limited to 'Linux-PAM/libpam/include')
-rw-r--r-- | Linux-PAM/libpam/include/security/_pam_macros.h | 13 | ||||
-rw-r--r-- | Linux-PAM/libpam/include/security/_pam_types.h | 14 | ||||
-rw-r--r-- | Linux-PAM/libpam/include/security/pam_modutil.h | 3 |
3 files changed, 28 insertions, 2 deletions
diff --git a/Linux-PAM/libpam/include/security/_pam_macros.h b/Linux-PAM/libpam/include/security/_pam_macros.h index f7da10a7..bd107cfb 100644 --- a/Linux-PAM/libpam/include/security/_pam_macros.h +++ b/Linux-PAM/libpam/include/security/_pam_macros.h @@ -25,6 +25,15 @@ do { \ *__xx__++ = '\0'; \ } while (0) +#define _pam_overwrite_n(x,n) \ +do { \ + register char *__xx__; \ + register unsigned int __i__ = 0; \ + if ((__xx__=(x))) \ + for (;__i__<n; __i__++) \ + __xx__[__i__] = 0; \ +} while (0) + /* * Don't just free it, forget it too. */ @@ -85,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 @@ -111,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/Linux-PAM/libpam/include/security/_pam_types.h b/Linux-PAM/libpam/include/security/_pam_types.h index 45bae97b..2f7e807f 100644 --- a/Linux-PAM/libpam/include/security/_pam_types.h +++ b/Linux-PAM/libpam/include/security/_pam_types.h @@ -138,8 +138,11 @@ typedef struct pam_handle pam_handle_t; #define PAM_OLDAUTHTOK 7 /* The old authentication token */ #define PAM_RUSER 8 /* The remote user name */ #define PAM_USER_PROMPT 9 /* the prompt for getting a username */ +/* Linux-PAM extensions */ #define PAM_FAIL_DELAY 10 /* app supplied function to override failure delays */ +#define PAM_XDISPLAY 11 /* X display name */ +#define PAM_XAUTHDATA 12 /* X server authentication data */ /* -------------- Special defines used by Linux-PAM -------------- */ @@ -279,6 +282,17 @@ struct pam_conv { void *appdata_ptr; }; +/* Used by the PAM_XAUTHDATA pam item. Contains X authentication + data used by modules to connect to the user's X display. Note: + this structure is intentionally compatible with xcb_auth_info_t. */ + +struct pam_xauth_data { + int namelen; + char *name; + int datalen; + char *data; +}; + /* ... adapted from the pam_appl.h file created by Theodore Ts'o and * * Copyright Theodore Ts'o, 1996. All rights reserved. diff --git a/Linux-PAM/libpam/include/security/pam_modutil.h b/Linux-PAM/libpam/include/security/pam_modutil.h index efb72436..ffdf5ad0 100644 --- a/Linux-PAM/libpam/include/security/pam_modutil.h +++ b/Linux-PAM/libpam/include/security/pam_modutil.h @@ -97,6 +97,9 @@ pam_modutil_read(int fd, char *buffer, int count); extern int pam_modutil_write(int fd, const char *buffer, int count); +extern int PAM_NONNULL((1,3)) +pam_modutil_audit_write(pam_handle_t *pamh, int type, + const char *message, int retval); #ifdef __cplusplus } #endif |