From: Thorsten Kukuk Date: Tue, 8 Dec 2009 14:41:40 +0000 (+0000) Subject: Relevant BUGIDs: 2892529 X-Git-Tag: Linux-PAM-1_1_1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a728c0f63e15c18ef599e599e4e46456b624abda;p=linux-pam Relevant BUGIDs: 2892529 Purpose of commit: bugfix Commit summary: --------------- 2009-12-08 Thorsten Kukuk * configure.in: Rename DEBUG to PAM_DEBUG. * libpam/pam_env.c: Likewise * libpam/pam_handlers.c: Likewise * libpam/pam_miscc.c: Likewise * libpam/pam_password.c: Likewise * libpam/include/security/_pam_macros.h: Likewise * libpamc/test/modules/pam_secret.c: Likewise * modules/pam_group/pam_group.c: Likewise * modules/pam_listfile/pam_listfile.c: Likewise * modules/pam_unix/pam_unix_auth.c: Likewise * modules/pam_unix/pam_unix_passwd.c: Likewise --- diff --git a/ChangeLog b/ChangeLog index 547b2d58..80e00631 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-12-08 Thorsten Kukuk + + * configure.in: Rename DEBUG to PAM_DEBUG. + * libpam/pam_env.c: Likewise + * libpam/pam_handlers.c: Likewise + * libpam/pam_miscc.c: Likewise + * libpam/pam_password.c: Likewise + * libpam/include/security/_pam_macros.h: Likewise + * libpamc/test/modules/pam_secret.c: Likewise + * modules/pam_group/pam_group.c: Likewise + * modules/pam_listfile/pam_listfile.c: Likewise + * modules/pam_unix/pam_unix_auth.c: Likewise + * modules/pam_unix/pam_unix_passwd.c: Likewise + 2009-12-08 Tomas Mraz * modules/pam_unix/passverify.c(unix_update_shadow): Create a shadow diff --git a/configure.in b/configure.in index 3cc05ed4..96cf572b 100644 --- a/configure.in +++ b/configure.in @@ -234,7 +234,7 @@ AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[specify you are building with debugging on])) if test x"$enable_debug" = x"yes" ; then - AC_DEFINE([DEBUG],, + AC_DEFINE([PAM_DEBUG],, [lots of stuff gets written to /var/run/pam-debug.log]) fi diff --git a/libpam/include/security/_pam_macros.h b/libpam/include/security/_pam_macros.h index bd107cfb..e891e226 100644 --- a/libpam/include/security/_pam_macros.h +++ b/libpam/include/security/_pam_macros.h @@ -62,7 +62,7 @@ do { \ /* some debugging code */ -#ifdef DEBUG +#ifdef PAM_DEBUG /* * This provides the necessary function to do debugging in PAM. @@ -191,6 +191,6 @@ do { \ #define _pam_show_mem(X,XS) do { } while (0) #define _pam_show_reply(reply, replies) do { } while (0) -#endif /* DEBUG */ +#endif /* PAM_DEBUG */ #endif /* PAM_MACROS_H */ diff --git a/libpam/pam_env.c b/libpam/pam_env.c index dcdac7ab..1c8403d6 100644 --- a/libpam/pam_env.c +++ b/libpam/pam_env.c @@ -21,7 +21,7 @@ /* helper functions */ -#ifdef DEBUG +#ifdef PAM_DEBUG static void _pam_dump_env(pam_handle_t *pamh) { int i; diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c index bca3dd31..59a1929f 100644 --- a/libpam/pam_handlers.c +++ b/libpam/pam_handlers.c @@ -239,7 +239,7 @@ static int _pam_parse_conf_file(pam_handle_t *pamh, FILE *f argv = NULL; } -#ifdef DEBUG +#ifdef PAM_DEBUG { int y; diff --git a/libpam/pam_misc.c b/libpam/pam_misc.c index b690fd3e..0e607276 100644 --- a/libpam/pam_misc.c +++ b/libpam/pam_misc.c @@ -171,7 +171,7 @@ int _pam_mkargv(char *s, char ***argv, int *argc) char **our_argv = NULL; char **argvbuf; char *argvbufp; -#ifdef DEBUG +#ifdef PAM_DEBUG int count=0; #endif diff --git a/libpam/pam_password.c b/libpam/pam_password.c index 70917c58..75db5e50 100644 --- a/libpam/pam_password.c +++ b/libpam/pam_password.c @@ -4,8 +4,6 @@ * $Id$ */ -/* #define DEBUG */ - #include "pam_private.h" #include diff --git a/libpamc/test/modules/pam_secret.c b/libpamc/test/modules/pam_secret.c index 830f1a78..6316f7f5 100644 --- a/libpamc/test/modules/pam_secret.c +++ b/libpamc/test/modules/pam_secret.c @@ -9,8 +9,6 @@ * NEEDS TO BE INTEGRATED MORE NATIVELY. */ -/* #define DEBUG */ - #include #include #include @@ -178,7 +176,7 @@ static int converse(pam_handle_t *pamh, struct ps_state_s *new) } } -#ifdef DEBUG +#ifdef PAM_DEBUG if (retval == PAM_SUCCESS) { D(("reply has length=%d and control=%u", PAM_BP_LENGTH(new->current_reply), diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c index 4a931c4f..3dc7f78e 100644 --- a/modules/pam_group/pam_group.c +++ b/modules/pam_group/pam_group.c @@ -605,7 +605,7 @@ static int check_account(pam_handle_t *pamh, const char *service, no_grps = 0; _pam_drop(grps); } -#ifdef DEBUG +#ifdef PAM_DEBUG { int z; for (z=0; z 0) { -#ifdef DEBUG +#ifdef PAM_DEBUG int err; #endif D(("trying to set %d groups", no_grps)); -#ifdef DEBUG +#ifdef PAM_DEBUG for (err=0; err #include -#ifdef DEBUG +#ifdef PAM_DEBUG #include #endif @@ -199,23 +199,23 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, if(apply_type==APPLY_TYPE_USER) { if(strcmp(user_name, apply_val)) { /* Does not apply to this user */ -#ifdef DEBUG +#ifdef PAM_DEBUG pam_syslog(pamh,LOG_DEBUG, "don't apply: apply=%s, user=%s", apply_val,user_name); -#endif /* DEBUG */ +#endif /* PAM_DEBUG */ free(ifname); return PAM_IGNORE; } } else if(apply_type==APPLY_TYPE_GROUP) { if(!pam_modutil_user_in_group_nam_nam(pamh,user_name,apply_val)) { /* Not a member of apply= group */ -#ifdef DEBUG +#ifdef PAM_DEBUG pam_syslog(pamh,LOG_DEBUG, "don't apply: %s not a member of group %s", user_name,apply_val); -#endif /* DEBUG */ +#endif /* PAM_DEBUG */ free(ifname); return PAM_IGNORE; } @@ -276,7 +276,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, return onerr; } } -#ifdef DEBUG +#ifdef PAM_DEBUG pam_syslog(pamh,LOG_INFO, "Got file = %s, item = %d, value = %s, sense = %d", @@ -312,7 +312,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, retval=PAM_AUTH_ERR; /* This loop assumes that PAM_SUCCESS == 0 and PAM_AUTH_ERR != 0 */ -#ifdef DEBUG +#ifdef PAM_DEBUG assert(PAM_SUCCESS == 0); assert(PAM_AUTH_ERR != 0); #endif @@ -343,7 +343,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, fclose(inf); free(ifname); if ((sense && retval) || (!sense && !retval)) { -#ifdef DEBUG +#ifdef PAM_DEBUG pam_syslog(pamh,LOG_INFO, "Returning PAM_SUCCESS, retval = %d", retval); #endif @@ -352,7 +352,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED, else { const void *service; const char *user_name; -#ifdef DEBUG +#ifdef PAM_DEBUG pam_syslog(pamh,LOG_INFO, "Returning PAM_AUTH_ERR, retval = %d", retval); #endif diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c index 05b5ec6c..c2f79b10 100644 --- a/modules/pam_unix/pam_unix_auth.c +++ b/modules/pam_unix/pam_unix_auth.c @@ -35,8 +35,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* #define DEBUG */ - #include "config.h" #include diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 2792a4d5..1d70a7c2 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -385,7 +385,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho, _("NIS password could not be changed.")); retval = PAM_TRY_AGAIN; } -#ifdef DEBUG +#ifdef PAM_DEBUG sleep(5); #endif } else {