diff options
Diffstat (limited to 'debian/patches-applied/031_pam_include')
-rw-r--r-- | debian/patches-applied/031_pam_include | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/debian/patches-applied/031_pam_include b/debian/patches-applied/031_pam_include index e28415c4..8e7ea587 100644 --- a/debian/patches-applied/031_pam_include +++ b/debian/patches-applied/031_pam_include @@ -4,11 +4,11 @@ Authors: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de> Upstream status: not yet submitted -Index: pam/Linux-PAM/libpam/pam_handlers.c +Index: pam.deb/libpam/pam_handlers.c =================================================================== ---- pam.orig/Linux-PAM/libpam/pam_handlers.c -+++ pam/Linux-PAM/libpam/pam_handlers.c -@@ -114,6 +114,10 @@ +--- pam.deb.orig/libpam/pam_handlers.c ++++ pam.deb/libpam/pam_handlers.c +@@ -117,6 +117,10 @@ module_type = PAM_T_ACCT; } else if (!strcasecmp("password", tok)) { module_type = PAM_T_PASS; @@ -19,35 +19,49 @@ Index: pam/Linux-PAM/libpam/pam_handlers.c } else { /* Illegal module type */ D(("_pam_init_handlers: bad module type: %s", tok)); -@@ -178,14 +182,33 @@ +@@ -186,8 +190,10 @@ _pam_set_default_control(actions, _PAM_ACTION_BAD); } +parsing_done: tok = _pam_StrTok(NULL, " \n\t", &nexttok); if (pam_include) { -- if (_pam_load_conf_file(pamh, tok, this_service, module_type + struct stat include_dir; + if (substack) { + res = _pam_add_handler(pamh, PAM_HT_SUBSTACK, other, + stack_level, module_type, actions, tok, +@@ -198,13 +204,35 @@ + return PAM_ABORT; + } + } +- if (_pam_load_conf_file(pamh, tok, this_service, module_type, +- stack_level + substack + if (tok[0] == '/') { -+ if (_pam_load_conf_file(pamh, tok, this_service, module_type - #ifdef PAM_READ_BOTH_CONFS -- , !other -+ , !other - #endif /* PAM_READ_BOTH_CONFS */ - ) == PAM_SUCCESS) -- continue; ++ if (_pam_load_conf_file(pamh, tok, this_service, ++ module_type, stack_level + substack ++#ifdef PAM_READ_BOTH_CONFS ++ , !other ++#endif /* PAM_READ_BOTH_CONFS */ ++ ) == PAM_SUCCESS) + continue; -+ } else if (!stat(PAM_CONFIG_D, &include_dir) && S_ISDIR(include_dir.st_mode)) { ++ } ++ else if (!stat(PAM_CONFIG_D, include_dir) ++ && S_ISDIR(include_dir.st_mode)) ++ { + char *include_file; + if (asprintf (&include_file, PAM_CONFIG_DF, tok) < 0) { + pam_syslog(pamh, LOG_CRIT, "asprintf failed"); + return PAM_ABORT; + } -+ if (_pam_load_conf_file(pamh, include_file, this_service, module_type -+#ifdef PAM_READ_BOTH_CONFS -+ , !other -+#endif /* PAM_READ_BOTH_CONFS */ -+ ) == PAM_SUCCESS) { ++ if (_pam_load_conf_file(pamh, include_file, this_service, ++ module_type, stack_level + substack + #ifdef PAM_READ_BOTH_CONFS + , !other + #endif /* PAM_READ_BOTH_CONFS */ +- ) == PAM_SUCCESS) +- continue; ++ ) == PAM_SUCCESS) ++ { + free(include_file); + continue; + } @@ -55,4 +69,4 @@ Index: pam/Linux-PAM/libpam/pam_handlers.c + } _pam_set_default_control(actions, _PAM_ACTION_BAD); mod_path = NULL; - must_fail = 1; + handler_type = PAM_HT_MUST_FAIL; |