summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-10-16 23:13:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:30 -0500
commitb26b8f95e95030506189d714ac62380788a5fe3e (patch)
tree822419ce04464347c47181d58212840fc2463fb3 /source3
parentda6e42b47f0b14238d932e5818fee93d4fd932c4 (diff)
downloadsamba-b26b8f95e95030506189d714ac62380788a5fe3e.tar.gz
samba-b26b8f95e95030506189d714ac62380788a5fe3e.tar.bz2
samba-b26b8f95e95030506189d714ac62380788a5fe3e.zip
r19351: Also export the info3 profilepath via the PAM_WINBIND_PROFILEPATH data
field. Guenther (This used to be commit 66b92f27fa4edec180b8c8eee929ec8f31ef6a08)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/pam_winbind.c12
-rw-r--r--source3/nsswitch/pam_winbind.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c
index 034c7f1746..0729fda62b 100644
--- a/source3/nsswitch/pam_winbind.c
+++ b/source3/nsswitch/pam_winbind.c
@@ -572,6 +572,18 @@ static int winbind_auth_request(pam_handle_t * pamh,
}
}
+ /* save the profile path for other PAM modules */
+ if (response.data.auth.info3.profile_path[0] != '\0') {
+
+ int ret2 = pam_set_data(pamh, PAM_WINBIND_PROFILEPATH,
+ (void *) strdup(response.data.auth.info3.profile_path),
+ _pam_winbind_cleanup_func);
+ if (ret2) {
+ _pam_log_debug(pamh, ctrl, LOG_DEBUG, "Could not set data: %s",
+ pam_strerror(pamh, ret2));
+ }
+ }
+
/* If winbindd returned a username, return the pointer to it here. */
if (user_ret && response.extra_data.data) {
/* We have to trust it's a null terminated string. */
diff --git a/source3/nsswitch/pam_winbind.h b/source3/nsswitch/pam_winbind.h
index 0ca30c28aa..e817c5a840 100644
--- a/source3/nsswitch/pam_winbind.h
+++ b/source3/nsswitch/pam_winbind.h
@@ -100,6 +100,7 @@ do { \
#define PAM_WINBIND_NEW_AUTHTOK_REQD "PAM_WINBIND_NEW_AUTHTOK_REQD"
#define PAM_WINBIND_HOMEDIR "PAM_WINBIND_HOMEDIR"
#define PAM_WINBIND_LOGONSCRIPT "PAM_WINBIND_LOGONSCRIPT"
+#define PAM_WINBIND_PROFILEPATH "PAM_WINBIND_PROFILEPATH"
#define PAM_WINBIND_PWD_LAST_SET "PAM_WINBIND_PWD_LAST_SET"
#define SECONDS_PER_DAY 86400