diff options
author | Jeremy Allison <jra@samba.org> | 2007-09-21 09:58:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:56 -0500 |
commit | c1284b8eb8585f05a49866d2f93d25f5665b5cf8 (patch) | |
tree | a692143bbe945ebdf26535ef89f8fa743c597ee8 /source3/winbindd | |
parent | 4fab9cf625278dd032a808b5c1bb8f2aec1bd0f2 (diff) | |
download | samba-c1284b8eb8585f05a49866d2f93d25f5665b5cf8.tar.gz samba-c1284b8eb8585f05a49866d2f93d25f5665b5cf8.tar.bz2 samba-c1284b8eb8585f05a49866d2f93d25f5665b5cf8.zip |
r25273: unistrX_to_ascii calls pull_ucs2 - ensure it's never
called with -1 (these calls were wrong anyway, target
was an fstring, not a pstring). Found by Michael Adam <ma@sernet.de>,
now to check all other uses.
Michael - this version uses sizeof(target) not sizeof(fstring).
This way is more future proof.
Jeremy.
(This used to be commit 9ed3046633b6949c68c9aed61b8e9444601cf101)
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index c4db691d05..8f78209586 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -61,22 +61,22 @@ static NTSTATUS append_info3_as_txt(TALLOC_CTX *mem_ctx, state->response.data.auth.info3.num_other_sids = info3->num_other_sids; unistr2_to_ascii(state->response.data.auth.info3.user_name, - &info3->uni_user_name, sizeof(fstring)); + &info3->uni_user_name, sizeof(state->response.data.auth.info3.user_name)); unistr2_to_ascii(state->response.data.auth.info3.full_name, - &info3->uni_full_name, sizeof(fstring)); + &info3->uni_full_name, sizeof(state->response.data.auth.info3.full_name)); unistr2_to_ascii(state->response.data.auth.info3.logon_script, - &info3->uni_logon_script, sizeof(fstring)); + &info3->uni_logon_script, sizeof(state->response.data.auth.info3.logon_script)); unistr2_to_ascii(state->response.data.auth.info3.profile_path, - &info3->uni_profile_path, sizeof(fstring)); + &info3->uni_profile_path, sizeof(state->response.data.auth.info3.profile_path)); unistr2_to_ascii(state->response.data.auth.info3.home_dir, - &info3->uni_home_dir, sizeof(fstring)); + &info3->uni_home_dir, sizeof(state->response.data.auth.info3.home_dir)); unistr2_to_ascii(state->response.data.auth.info3.dir_drive, - &info3->uni_dir_drive, sizeof(fstring)); + &info3->uni_dir_drive, sizeof(state->response.data.auth.info3.dir_drive)); unistr2_to_ascii(state->response.data.auth.info3.logon_srv, - &info3->uni_logon_srv, sizeof(fstring)); + &info3->uni_logon_srv, sizeof(state->response.data.auth.info3.logon_srv)); unistr2_to_ascii(state->response.data.auth.info3.logon_dom, - &info3->uni_logon_dom, sizeof(fstring)); + &info3->uni_logon_dom, sizeof(state->response.data.auth.info3.logon_dom)); return NT_STATUS_OK; } |