+2009-12-08 Thorsten Kukuk <kukuk@thkukuk.de>
+
+ * 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 <t8m@centrum.cz>
* modules/pam_unix/passverify.c(unix_update_shadow): Create a shadow
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
/* some debugging code */
-#ifdef DEBUG
+#ifdef PAM_DEBUG
/*
* This provides the necessary function to do debugging in PAM.
#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 */
/* helper functions */
-#ifdef DEBUG
+#ifdef PAM_DEBUG
static void _pam_dump_env(pam_handle_t *pamh)
{
int i;
argv = NULL;
}
-#ifdef DEBUG
+#ifdef PAM_DEBUG
{
int y;
char **our_argv = NULL;
char **argvbuf;
char *argvbufp;
-#ifdef DEBUG
+#ifdef PAM_DEBUG
int count=0;
#endif
* $Id$
*/
-/* #define DEBUG */
-
#include "pam_private.h"
#include <stdio.h>
* NEEDS TO BE INTEGRATED MORE NATIVELY.
*/
-/* #define DEBUG */
-
#include <fcntl.h>
#include <pwd.h>
#include <stdio.h>
}
}
-#ifdef DEBUG
+#ifdef PAM_DEBUG
if (retval == PAM_SUCCESS) {
D(("reply has length=%d and control=%u",
PAM_BP_LENGTH(new->current_reply),
no_grps = 0;
_pam_drop(grps);
}
-#ifdef DEBUG
+#ifdef PAM_DEBUG
{
int z;
for (z=0; z<no_grps; ++z) {
/* now set the groups for the user */
if (no_grps > 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<no_grps; ++err) {
D(("gid[%d]=%d", err, grps[err]));
}
#include <pwd.h>
#include <grp.h>
-#ifdef DEBUG
+#ifdef PAM_DEBUG
#include <assert.h>
#endif
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;
}
return onerr;
}
}
-#ifdef DEBUG
+#ifdef PAM_DEBUG
pam_syslog(pamh,LOG_INFO,
"Got file = %s, item = %d, value = %s, sense = %d",
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
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
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
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* #define DEBUG */
-
#include "config.h"
#include <stdio.h>
_("NIS password could not be changed."));
retval = PAM_TRY_AGAIN;
}
-#ifdef DEBUG
+#ifdef PAM_DEBUG
sleep(5);
#endif
} else {