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/winbindd | |
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/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 79b4c764c3..ef5a312eea 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -157,7 +157,6 @@ static NTSTATUS append_unix_username(TALLOC_CTX *mem_ctx, /* We've been asked to return the unix username, per 'winbind use default domain' settings and the like */ - fstring username_out; const char *nt_username, *nt_domain; nt_domain = talloc_strdup(mem_ctx, info3->base.domain.string); @@ -174,18 +173,11 @@ static NTSTATUS append_unix_username(TALLOC_CTX *mem_ctx, nt_username = name_user; } - fill_domain_username(username_out, nt_domain, nt_username, - True); + fill_domain_username(state->response.data.auth.unix_username, + nt_domain, nt_username, True); - DEBUG(5,("Setting unix username to [%s]\n", username_out)); - - SAFE_FREE(state->response.extra_data.data); - state->response.extra_data.data = SMB_STRDUP(username_out); - if (!state->response.extra_data.data) { - return NT_STATUS_NO_MEMORY; - } - state->response.length += - strlen((const char *)state->response.extra_data.data)+1; + DEBUG(5,("Setting unix username to [%s]\n", + state->response.data.auth.unix_username)); return NT_STATUS_OK; } @@ -736,14 +728,12 @@ failed: static bool check_request_flags(uint32_t flags) { uint32_t flags_edata = WBFLAG_PAM_AFS_TOKEN | - WBFLAG_PAM_UNIX_NAME | WBFLAG_PAM_INFO3_TEXT | WBFLAG_PAM_INFO3_NDR; if ( ( (flags & flags_edata) == WBFLAG_PAM_AFS_TOKEN) || ( (flags & flags_edata) == WBFLAG_PAM_INFO3_NDR) || ( (flags & flags_edata) == WBFLAG_PAM_INFO3_TEXT)|| - ( (flags & flags_edata) == WBFLAG_PAM_UNIX_NAME) || !(flags & flags_edata) ) { return True; } |