svn commit: samba r25273 - in branches: SAMBA_3_2/source/winbindd
SAMBA_3_2_0/source/winbindd
jra at samba.org
jra at samba.org
Fri Sep 21 09:58:38 GMT 2007
Author: jra
Date: 2007-09-21 09:58:36 +0000 (Fri, 21 Sep 2007)
New Revision: 25273
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25273
Log:
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 at sernet.de>,
now to check all other uses.
Michael - this version uses sizeof(target) not sizeof(fstring).
This way is more future proof.
Jeremy.
Modified:
branches/SAMBA_3_2/source/winbindd/winbindd_pam.c
branches/SAMBA_3_2_0/source/winbindd/winbindd_pam.c
Changeset:
Modified: branches/SAMBA_3_2/source/winbindd/winbindd_pam.c
===================================================================
--- branches/SAMBA_3_2/source/winbindd/winbindd_pam.c 2007-09-21 09:52:28 UTC (rev 25272)
+++ branches/SAMBA_3_2/source/winbindd/winbindd_pam.c 2007-09-21 09:58:36 UTC (rev 25273)
@@ -61,22 +61,22 @@
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;
}
Modified: branches/SAMBA_3_2_0/source/winbindd/winbindd_pam.c
===================================================================
--- branches/SAMBA_3_2_0/source/winbindd/winbindd_pam.c 2007-09-21 09:52:28 UTC (rev 25272)
+++ branches/SAMBA_3_2_0/source/winbindd/winbindd_pam.c 2007-09-21 09:58:36 UTC (rev 25273)
@@ -61,22 +61,22 @@
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;
}
More information about the samba-cvs
mailing list