diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-02-28 13:29:47 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-28 23:00:42 +0100 |
commit | 76de025c724d68bef1b81c8ec6081db5e0f19c4a (patch) | |
tree | 4db329d4ee1d2409130557969aae78d67a59d972 /source3/nsswitch | |
parent | 37bca2ea57e2f2f13a9ab59d6fcd8f27052f65ef (diff) | |
download | samba-76de025c724d68bef1b81c8ec6081db5e0f19c4a.tar.gz samba-76de025c724d68bef1b81c8ec6081db5e0f19c4a.tar.bz2 samba-76de025c724d68bef1b81c8ec6081db5e0f19c4a.zip |
winbind: use a struct element for WBFLAG_PAM_UNIX_NAME
To not conflict with WBFLAG_PAM_INFO3_TEXT.
This should fix pam_winbind.
metze
(This used to be commit 1b8ed6c0ffb2548442bb7e9d848117ce9b1c65c0)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/pam_winbind.c | 5 | ||||
-rw-r--r-- | source3/nsswitch/winbind_struct_protocol.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c index 89db0773ae..81f5227410 100644 --- a/source3/nsswitch/pam_winbind.c +++ b/source3/nsswitch/pam_winbind.c @@ -1341,9 +1341,10 @@ static int winbind_auth_request(pam_handle_t * pamh, /* If winbindd returned a username, return the pointer to it * here. */ - if (user_ret && response.extra_data.data) { + if (user_ret && response.data.auth.unix_username[0]) { /* We have to trust it's a null terminated string. */ - *user_ret = (char *)response.extra_data.data; + *user_ret = strndup(response.data.auth.unix_username, + sizeof(response.data.auth.unix_username) - 1); } } diff --git a/source3/nsswitch/winbind_struct_protocol.h b/source3/nsswitch/winbind_struct_protocol.h index 12ca1e55c8..e81813c77b 100644 --- a/source3/nsswitch/winbind_struct_protocol.h +++ b/source3/nsswitch/winbind_struct_protocol.h @@ -431,6 +431,7 @@ struct winbindd_response { fstring logon_srv; fstring logon_dom; } info3; + fstring unix_username; } auth; struct { fstring name; |