summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2009-06-25 21:36:49 +0200
committerKai Blin <kai@samba.org>2009-06-25 21:36:49 +0200
commit4250eab4b58e6194a015bb5d464d60c69de463fc (patch)
tree6bcdff868103b4c53dc48779ffb7f1d8b15d9737 /source4
parent309924e5c1da5ee6bf14f48e9f7d10d4348b8f77 (diff)
downloadsamba-4250eab4b58e6194a015bb5d464d60c69de463fc.tar.gz
samba-4250eab4b58e6194a015bb5d464d60c69de463fc.tar.bz2
samba-4250eab4b58e6194a015bb5d464d60c69de463fc.zip
s4 auth_winbind: Internally, info3 has utf8 buffers, not utf16 buffers.
Thanks to gd for the catch.
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/ntlm/auth_winbind.c79
1 files changed, 16 insertions, 63 deletions
diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index 3905d00667..568226dd87 100644
--- a/source4/auth/ntlm/auth_winbind.c
+++ b/source4/auth/ntlm/auth_winbind.c
@@ -71,69 +71,22 @@ static NTSTATUS get_info3_from_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
info3->base.allow_password_change = info->pass_can_change_time;
info3->base.force_password_change = info->pass_must_change_time;
- if (info->account_name != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->account_name,
- strlen(info->account_name),
- discard_const(&info3->base.account_name.string),
- NULL, false);
- }
-
- if (info->full_name != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->full_name,
- strlen(info->full_name),
- discard_const(&info3->base.full_name.string),
- NULL, false);
- }
-
- if (info->logon_script != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->logon_script,
- strlen(info->logon_script),
- discard_const(&info3->base.logon_script.string),
- NULL, false);
- }
-
- if (info->profile_path != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->profile_path,
- strlen(info->profile_path),
- discard_const(&info3->base.profile_path.string),
- NULL, false);
- }
-
- if (info->home_directory != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->home_directory,
- strlen(info->home_directory),
- discard_const(&info3->base.home_directory.string),
- NULL, false);
- }
-
- if (info->home_drive != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->home_drive,
- strlen(info->home_drive),
- discard_const(&info3->base.home_drive.string),
- NULL, false);
- }
-
- if (info->logon_server != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->logon_server,
- strlen(info->logon_server),
- discard_const(&info3->base.logon_server.string),
- NULL, false);
- }
-
- if (info->domain_name != NULL) {
- convert_string_talloc_convenience(mem_ctx, ic,
- CH_UNIX, CH_UTF16, info->domain_name,
- strlen(info->domain_name),
- discard_const(&info3->base.domain.string),
- NULL, false);
- }
+ info3->base.account_name.string = talloc_strdup(mem_ctx,
+ info->account_name);
+ info3->base.full_name.string = talloc_strdup(mem_ctx,
+ info->full_name);
+ info3->base.logon_script.string = talloc_strdup(mem_ctx,
+ info->logon_script);
+ info3->base.profile_path.string = talloc_strdup(mem_ctx,
+ info->profile_path);
+ info3->base.home_directory.string = talloc_strdup(mem_ctx,
+ info->home_directory);
+ info3->base.home_drive.string = talloc_strdup(mem_ctx,
+ info->home_drive);
+ info3->base.logon_server.string = talloc_strdup(mem_ctx,
+ info->logon_server);
+ info3->base.domain.string = talloc_strdup(mem_ctx,
+ info->domain_name);
info3->base.logon_count = info->logon_count;
info3->base.bad_password_count = info->bad_password_count;