[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Sun Apr 22 23:45:02 MDT 2012


The branch, master has been updated
       via  9ea9ad2 selftest: Add test for bug #8884: wbinfo --group-info=administrator segfaults s4-winbindd
       via  832dd41 s4-libnet: Fix continue_groupinfo_opengroup to check correct state info
       via  bb3d983 s4-libnet: Fix segfault shown by wbinfo --group-info=administrator
      from  3969cc2 s3-dbwrap: A void function can not return a value

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


- Log -----------------------------------------------------------------
commit 9ea9ad2de00749e32107975611a3adfa71d7b9f3
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 23 13:52:17 2012 +1000

    selftest: Add test for bug #8884: wbinfo --group-info=administrator segfaults s4-winbindd
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Mon Apr 23 07:44:50 CEST 2012 on sn-devel-104

commit 832dd41551bf6bc47906a3a90d72ed758528c48a
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 23 13:48:49 2012 +1000

    s4-libnet: Fix continue_groupinfo_opengroup to check correct state info
    
    This meant that we would attempt to query the group that we could not open.
    
    Andrew Bartlett

commit bb3d983f5bc4b49619f26af44c3c540c3030155f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 23 13:47:46 2012 +1000

    s4-libnet: Fix segfault shown by wbinfo --group-info=administrator
    
    The issue was that after the LookupNames call indicated that this was
    not a group, the call paths diverged, with both sucess and failure
    paths running.
    
    Andrew Bartlett

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

Summary of changes:
 nsswitch/tests/test_wbinfo.sh |    2 ++
 source4/libnet/groupinfo.c    |    4 ++--
 source4/libnet/libnet_group.c |    1 +
 3 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh
index 52e203f..461d780 100755
--- a/nsswitch/tests/test_wbinfo.sh
+++ b/nsswitch/tests/test_wbinfo.sh
@@ -185,6 +185,8 @@ else
 	failed=`expr $failed + 1`
 fi
 
+testfail "wbinfo --group-info against $TARGET with $USERNAME" $wbinfo --group-info $USERNAME && failed=`expr $failed + 1`
+
 gid=`echo $rawgid | sed 's/.*:\([0-9][0-9]*\):/\1/'`
 testit "wbinfo --gid-info against $TARGET" $wbinfo --gid-info $gid || failed=`expr $failed + 1`
 
diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c
index 44c21ee..932ab0c 100644
--- a/source4/libnet/groupinfo.c
+++ b/source4/libnet/groupinfo.c
@@ -131,8 +131,8 @@ static void continue_groupinfo_opengroup(struct tevent_req *subreq)
 	TALLOC_FREE(subreq);
 	if (!composite_is_ok(c)) return;
 
-	if (!NT_STATUS_IS_OK(s->querygroupinfo.out.result)) {
-		composite_error(c, s->querygroupinfo.out.result);
+	if (!NT_STATUS_IS_OK(s->opengroup.out.result)) {
+		composite_error(c, s->opengroup.out.result);
 		return;
 	}
 
diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c
index 5d8f9e2..b12037e 100644
--- a/source4/libnet/libnet_group.c
+++ b/source4/libnet/libnet_group.c
@@ -337,6 +337,7 @@ static void continue_name_found(struct composite_context *ctx)
 	if (s->lookup.out.sid_type != SID_NAME_DOM_GRP &&
 	    s->lookup.out.sid_type != SID_NAME_ALIAS) {
 		composite_error(c, NT_STATUS_NO_SUCH_GROUP);
+		return;
 	}
 
 	/* prepare arguments for groupinfo call */


-- 
Samba Shared Repository


More information about the samba-cvs mailing list