[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-67-g4250eab

Kai Blin kai at samba.org
Thu Jun 25 19:37:59 GMT 2009


The branch, master has been updated
       via  4250eab4b58e6194a015bb5d464d60c69de463fc (commit)
      from  309924e5c1da5ee6bf14f48e9f7d10d4348b8f77 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4250eab4b58e6194a015bb5d464d60c69de463fc
Author: Kai Blin <kai at samba.org>
Date:   Thu Jun 25 21:36:49 2009 +0200

    s4 auth_winbind: Internally, info3 has utf8 buffers, not utf16 buffers.
    
    Thanks to gd for the catch.

-----------------------------------------------------------------------

Summary of changes:
 source4/auth/ntlm/auth_winbind.c |   79 ++++++++------------------------------
 1 files changed, 16 insertions(+), 63 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c
index 3905d00..568226d 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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list