[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sat Jul 10 06:09:14 MDT 2010


The branch, master has been updated
       via  80f9ad4... s4:winbind: let WBSRV_SAMBA3_SET_STRING() initialize the whole buffer
       via  751a262... s4:wb_cmd_list_groups: also handle NT_STATUS_NO_MORE_ENTRIES
       via  c7a30c6... s4:wb_cmd_list_users: also handle NT_STATUS_NO_MORE_ENTRIES
       via  1ea4215... s4:libnet_GroupList: allocate children strings on the correct talloc parent
       via  35c554b... s4:libnet_UserList: allocate children strings on the correct talloc parent
      from  85f7384... s4:buildtools: add 'make show_waf_options'

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


- Log -----------------------------------------------------------------
commit 80f9ad4074889bd5acec74316c427ec2b3963006
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jul 10 09:09:28 2010 +0200

    s4:winbind: let WBSRV_SAMBA3_SET_STRING() initialize the whole buffer
    
    We should not send uninitialized bytes to the winbind pipe,
    this makes also makes valgrind very unhappy.
    
    metze

commit 751a26214e3d88d2d1bd89787524e7a49c30037f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jul 10 09:08:57 2010 +0200

    s4:wb_cmd_list_groups: also handle NT_STATUS_NO_MORE_ENTRIES
    
    metze

commit c7a30c6b173cb2720bcb7d5eefe00899f629b91e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jul 10 09:08:31 2010 +0200

    s4:wb_cmd_list_users: also handle NT_STATUS_NO_MORE_ENTRIES
    
    metze

commit 1ea4215e5681ccef921bbf77bb1af79fc1a82b77
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jul 10 09:06:44 2010 +0200

    s4:libnet_GroupList: allocate children strings on the correct talloc parent
    
    Otherwise the _recv() function won't move the children strings to the
    callers memory context and let the callers crash.
    
    metze

commit 35c554bef02e9acfe9cbec12d1f4ebc1067bedd4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jul 10 09:04:43 2010 +0200

    s4:libnet_UserList: allocate children strings on the correct talloc parent
    
    Otherwise the _recv() function won't move the children strings to the
    callers memory context and let the callers crash.
    
    metze

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

Summary of changes:
 source4/libnet/libnet_group.c        |    4 ++--
 source4/libnet/libnet_user.c         |    4 ++--
 source4/winbind/wb_cmd_list_groups.c |    3 ++-
 source4/winbind/wb_cmd_list_users.c  |    3 ++-
 source4/winbind/wb_server.h          |    1 +
 5 files changed, 9 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c
index 8c88aa3..7679b42 100644
--- a/source4/libnet/libnet_group.c
+++ b/source4/libnet/libnet_group.c
@@ -671,11 +671,11 @@ static void continue_groups_enumerated(struct tevent_req *subreq)
 			if (composite_nomem(group_sid, c)) return;
 
 			/* groupname */
-			s->groups[i].groupname = talloc_strdup(c, entry->name.string);
+			s->groups[i].groupname = talloc_strdup(s->groups, entry->name.string);
 			if (composite_nomem(s->groups[i].groupname, c)) return;
 
 			/* sid string */
-			s->groups[i].sid = dom_sid_string(c, group_sid);
+			s->groups[i].sid = dom_sid_string(s->groups, group_sid);
 			if (composite_nomem(s->groups[i].sid, c)) return;
 		}
 
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index 0055639..7f93b3f 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -1138,11 +1138,11 @@ static void continue_users_enumerated(struct tevent_req *subreq)
 			if (composite_nomem(user_sid, c)) return;
 			
 			/* username */
-			s->users[i].username = talloc_strdup(c, entry->name.string);
+			s->users[i].username = talloc_strdup(s->users, entry->name.string);
 			if (composite_nomem(s->users[i].username, c)) return;
 
 			/* sid string */
-			s->users[i].sid = dom_sid_string(c, user_sid);
+			s->users[i].sid = dom_sid_string(s->users, user_sid);
 			if (composite_nomem(s->users[i].sid, c)) return;
 		}
 		
diff --git a/source4/winbind/wb_cmd_list_groups.c b/source4/winbind/wb_cmd_list_groups.c
index 16059ea..db25676 100644
--- a/source4/winbind/wb_cmd_list_groups.c
+++ b/source4/winbind/wb_cmd_list_groups.c
@@ -137,7 +137,8 @@ static void cmd_list_groups_recv_group_list(struct composite_context *ctx)
 
 	/* If NTSTATUS is neither OK nor MORE_ENTRIES, something broke */
 	if (!NT_STATUS_IS_OK(status) &&
-	    !NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
+	    !NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
 		composite_error(state->ctx, status);
 		return;
 	}
diff --git a/source4/winbind/wb_cmd_list_users.c b/source4/winbind/wb_cmd_list_users.c
index 4728f3a..03544f6 100644
--- a/source4/winbind/wb_cmd_list_users.c
+++ b/source4/winbind/wb_cmd_list_users.c
@@ -135,7 +135,8 @@ static void cmd_list_users_recv_user_list(struct composite_context *ctx)
 
 	/* If NTSTATUS is neither OK nor MORE_ENTRIES, something broke */
 	if (!NT_STATUS_IS_OK(status) &&
-	     !NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
+	    !NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES) &&
+	    !NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
 		composite_error(state->ctx, status);
 		return;
 	}
diff --git a/source4/winbind/wb_server.h b/source4/winbind/wb_server.h
index 111aefc..1ffb62e 100644
--- a/source4/winbind/wb_server.h
+++ b/source4/winbind/wb_server.h
@@ -104,6 +104,7 @@ struct wbsrv_connection {
 };
 
 #define WBSRV_SAMBA3_SET_STRING(dest, src) do { \
+	memset(dest, 0, sizeof(dest));\
 	safe_strcpy(dest, src, sizeof(dest)-1);\
 } while(0)
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list