diff options
Diffstat (limited to 'libpam')
-rw-r--r-- | libpam/include/security/_pam_types.h | 2 | ||||
-rw-r--r-- | libpam/pam_env.c | 5 | ||||
-rw-r--r-- | libpam/pam_handlers.c | 2 | ||||
-rw-r--r-- | libpam/pam_private.h | 8 |
4 files changed, 12 insertions, 5 deletions
diff --git a/libpam/include/security/_pam_types.h b/libpam/include/security/_pam_types.h index 871bfbf2..70f6d6ab 100644 --- a/libpam/include/security/_pam_types.h +++ b/libpam/include/security/_pam_types.h @@ -76,7 +76,7 @@ typedef struct pam_handle pam_handle_t; #define PAM_AUTHTOK_LOCK_BUSY 22 /* Authentication token lock busy */ #define PAM_AUTHTOK_DISABLE_AGING 23 /* Authentication token aging disabled */ #define PAM_TRY_AGAIN 24 /* Preliminary check by password service */ -#define PAM_IGNORE 25 /* Ingore underlying account module */ +#define PAM_IGNORE 25 /* Ignore underlying account module */ /* regardless of whether the control */ /* flag is required, optional, or sufficient */ #define PAM_ABORT 26 /* Critical error (?module fail now request) */ diff --git a/libpam/pam_env.c b/libpam/pam_env.c index d5a26ccb..ae1ddf2e 100644 --- a/libpam/pam_env.c +++ b/libpam/pam_env.c @@ -75,7 +75,7 @@ int _pam_make_env(pam_handle_t *pamh) /* * fill entries in pamh->env */ - + pamh->env->entries = PAM_ENV_CHUNK; pamh->env->requested = 1; pamh->env->list[0] = NULL; @@ -223,7 +223,7 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value) /* add a new NULL entry at end; increase counter */ pamh->env->list[pamh->env->requested++] = NULL; - + } else { /* replace old */ D(("replacing item: %s\n with: %s" , pamh->env->list[item], name_value)); @@ -344,6 +344,7 @@ static char **_copy_env(pam_handle_t *pamh) _pam_overwrite(dump[i]); _pam_drop(dump[i]); } + __pam_drop(dump); return NULL; } } diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c index e84d0d03..90c0968a 100644 --- a/libpam/pam_handlers.c +++ b/libpam/pam_handlers.c @@ -686,7 +686,7 @@ int _pam_add_handler(pam_handle_t *pamh /* indicate its name - later we will search for it by this */ if ((mod->name = _pam_strdup(mod_path)) == NULL) { D(("_pam_handler: couldn't get memory for mod_path")); - _pam_system_log(LOG_ERR, "no memory for module path", mod_path); + _pam_system_log(LOG_ERR, "no memory for module path"); success = PAM_ABORT; } diff --git a/libpam/pam_private.h b/libpam/pam_private.h index 7afc4fa7..1fbd9812 100644 --- a/libpam/pam_private.h +++ b/libpam/pam_private.h @@ -250,7 +250,13 @@ void _pam_set_default_control(int *control_array, int default_action); void _pam_parse_control(int *control_array, char *tok); -void _pam_system_log(int priority, const char *format, ... ); +void _pam_system_log(int priority, const char *format, ... ) +#ifdef __GNUC__ + __attribute__ ((format (printf, 2, 3))); +#else + ; +#endif + #define _PAM_SYSTEM_LOG_PREFIX "PAM " /* |