summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-11-02 18:58:25 +0100
committerAndreas Schneider <asn@cryptomilk.org>2018-11-12 13:44:09 +0100
commitc10d70c43c935c5388654f78b3ac51ec43bbdf02 (patch)
tree5db8b8ae3c6e2859079caf296f2de77ceb97501b /nsswitch
parentffc8b4ac8d418b44da7206469ae076398e12b7ac (diff)
downloadsamba-c10d70c43c935c5388654f78b3ac51ec43bbdf02.tar.gz
pam_winbind: Set the request type as client name
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Nov 12 13:44:09 CET 2018 on sn-devel-144
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/pam_winbind.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 1a58ba49c48..757fdae6e3c 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -564,6 +564,8 @@ static int _pam_winbind_init_context(pam_handle_t *pamh,
struct pwb_context **ctx_p)
{
struct pwb_context *r = NULL;
+ const char *service = NULL;
+ char service_name[32] = {0};
int ctrl_code;
#ifdef HAVE_GETTEXT
@@ -594,6 +596,12 @@ static int _pam_winbind_init_context(pam_handle_t *pamh,
return PAM_SYSTEM_ERR;
}
+ pam_get_item(pamh, PAM_SERVICE, (const void **)&service);
+
+ snprintf(service_name, sizeof(service_name), "PAM_WINBIND[%s]", service);
+
+ wbcSetClientProcessName(service_name);
+
*ctx_p = r;
return PAM_SUCCESS;