[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Thu Jun 29 00:34:02 UTC 2017


The branch, master has been updated
       via  776ed55 nsswitch: Add ad_member tests for wbinfo --domain-info and --dc-info
       via  4eef11e s3:winbind: Move debug statement into the error handling
       via  45da755 s3:tests: Do *NOT* flush the complete gencache!
       via  0a0fbaa selftest: Do *NOT* flush the complete gencache!
      from  c29db05 s4:auth/ntlm: allow auth_operations to specify check_password_send/recv()

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


- Log -----------------------------------------------------------------
commit 776ed55a89a6caadf9a77a6f7b42b8b7ef69e933
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Jun 23 16:14:08 2017 +0200

    nsswitch: Add ad_member tests for wbinfo --domain-info and --dc-info
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Thu Jun 29 02:33:48 CEST 2017 on sn-devel-144

commit 4eef11e0a0c43d634a36bc03396307212b2c5430
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Jun 23 16:25:27 2017 +0200

    s3:winbind: Move debug statement into the error handling
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 45da755430c6b124335c9dfeb8a252060823ac4c
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 28 14:58:41 2017 +0200

    s3:tests: Do *NOT* flush the complete gencache!
    
    This removes important entries winbindd created during startup!
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12868
    
    Pair-Programmed-With: Ralph Boehme <slow at samba.org>
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Signed-off-by: Ralph Boehme <slow at samba.org>

commit 0a0fbaacbcbaa52ed5008e84958e2aea90cdba7c
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 28 14:49:45 2017 +0200

    selftest: Do *NOT* flush the complete gencache!
    
    This removes *IMPORTANT* entries from the gencache winbindd creates on
    startup.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12868
    
    Pair-Programmed-With: Ralph Boehme <slow at samba.org>
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Signed-off-by: Ralph Boehme <slow at samba.org>

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

Summary of changes:
 nsswitch/tests/test_wbinfo.sh                     |  6 ++++++
 selftest/target/Samba3.pm                         |  2 +-
 source3/script/tests/test_wbinfo_sids2xids_int.py | 25 ++++++++++++++---------
 source3/winbindd/winbindd_misc.c                  |  4 ++--
 4 files changed, 24 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh
index 49296b6..67660e5 100755
--- a/nsswitch/tests/test_wbinfo.sh
+++ b/nsswitch/tests/test_wbinfo.sh
@@ -284,6 +284,12 @@ testit "wbinfo -K against $TARGET with domain creds" $wbinfo --krb5ccname=$KRB5C
 
 testit "wbinfo --separator against $TARGET" $wbinfo --separator || failed=`expr $failed + 1`
 
+if test "$TARGET" = "ad_member"; then
+	testit "wbinfo --domain-info=$DOMAIN" $wbinfo --domain-info=$DOMAIN || failed=`expr $failed + 1`
+
+	testit "wbinfo --dc-info=$DOMAIN" $wbinfo --dc-info=$DOMAIN || failed=`expr $failed + 1`
+fi
+
 testit_expect_failure "wbinfo -a against $TARGET with invalid password" $wbinfo -a "$DOMAIN/$USERNAME%InvalidPassword" && failed=`expr $failed + 1`
 
 testit_expect_failure "wbinfo -K against $TARGET with invalid password" $wbinfo -K "$DOMAIN/$USERNAME%InvalidPassword" && failed=`expr $failed + 1`
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index bea5db2..68b9828 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -2275,7 +2275,7 @@ sub wait_for_start($$$$$)
 	    }
 	    my $count = 0;
 	    do {
-		system(Samba::bindir_path($self, "net") . " $envvars->{CONFIGURATION} cache flush");
+		system(Samba::bindir_path($self, "net") . " $envvars->{CONFIGURATION} cache del IDMAP/SID2XID/S-1-5-32-545");
 		$ret = system("SELFTEST_WINBINDD_SOCKET_DIR=" . $envvars->{SELFTEST_WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " --sid-to-gid=S-1-5-32-545");
 		if ($ret != 0) {
 		    sleep(2);
diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py b/source3/script/tests/test_wbinfo_sids2xids_int.py
index 3ad3156..2180445 100755
--- a/source3/script/tests/test_wbinfo_sids2xids_int.py
+++ b/source3/script/tests/test_wbinfo_sids2xids_int.py
@@ -10,8 +10,13 @@ if len(sys.argv) != 3:
 wbinfo = sys.argv[1]
 netcmd = sys.argv[2]
 
-def flush_cache():
-    os.system(netcmd + " cache flush")
+def flush_cache(sids=[], uids=[], gids=[]):
+    for sid in sids:
+        os.system(netcmd + (" cache del IDMAP/SID2XID/%s" % (sid)))
+    for uids in uids:
+        os.system(netcmd + (" cache del IDMAP/UID2SID/%s" % (uid)))
+    for gids in gids:
+        os.system(netcmd + (" cache del IDMAP/GID2SID/%s" % (gid)))
 
 def fill_cache(inids, idtype='gid'):
     for inid in inids:
@@ -31,7 +36,7 @@ domsid = domsid.split(' ')[0]
 
 sids=[ domsid + '-512', 'S-1-5-32-545', domsid + '-513', 'S-1-1-0', 'S-1-3-1', 'S-1-5-1' ]
 
-flush_cache()
+flush_cache(sids=sids)
 
 sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' +  ','.join(sids)],
                              stdout=subprocess.PIPE).communicate()[0].strip()
@@ -74,7 +79,7 @@ def check_singular(sids, ids, idtype='gid'):
                                  stdout=subprocess.PIPE).communicate()[0].strip()
         if outid != ids[i]:
             print "Expected %s, got %s\n" % (outid, ids[i])
-            flush_cache()
+            flush_cache(sids=sids, uids=uids, gids=gids)
             sys.exit(1)
         i += 1
 
@@ -90,7 +95,7 @@ def check_multiple(sids, idtypes):
 
         if result[0] != idtypes[i]:
             print "Expected %s, got %s\n" % (idtypes[i], result[0])
-            flush_cache()
+            flush_cache(sids=sids, uids=uids, gids=gids)
             sys.exit(1)
         i += 1
 
@@ -99,22 +104,22 @@ check_singular(sids, gids, 'gid')
 check_singular(sids, uids, 'uid')
 
 # second round: with empty cache
-flush_cache()
+flush_cache(sids=sids, gids=gids)
 check_singular(sids, gids, 'gid')
-flush_cache()
+flush_cache(sids=sids, uids=uids)
 check_singular(sids, uids, 'uid')
 
 # third round: with filled cache via uid-to-sid
-flush_cache()
+flush_cache(sids=uids, uids=uids)
 fill_cache(uids, 'uid')
 check_multiple(sids, idtypes)
 
 # fourth round: with filled cache via gid-to-sid
-flush_cache()
+flush_cache(sids=sids, gids=gids)
 fill_cache(gids, 'gid')
 check_multiple(sids, idtypes)
 
 # flush the cache so any incorrect mappings don't break other tests
-flush_cache()
+flush_cache(sids=sids, uids=uids, gids=gids)
 
 sys.exit(0)
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index 12c5faa..30730dc 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -338,9 +338,9 @@ void winbindd_dc_info(struct winbindd_cli_state *cli)
 	if (cli->request->domain_name[0] != '\0') {
 		domain = find_domain_from_name_noinit(
 			cli->request->domain_name);
-		DEBUG(10, ("Could not find domain %s\n",
-			   cli->request->domain_name));
 		if (domain == NULL) {
+			DEBUG(10, ("Could not find domain %s\n",
+				   cli->request->domain_name));
 			request_error(cli);
 			return;
 		}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list