[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Tue Jan 8 12:16:03 UTC 2019
The branch, master has been updated
via ee4a33a4fff idmap: In _wbint_Sids2UnixIDs, pass back what we have
via 6f2ccb59734 idmap_tdb: If one SID fails to map, try the rest
via 0e2e6352054 selftest: Test sids-to-xids with one failing sid
from f23287bcb69 waf: fix tri-state of --with-sendfile-support being auto the default
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ee4a33a4fff1ba86f353d72970fe990774dee893
Author: Volker Lendecke <vl at samba.org>
Date: Tue Dec 18 15:53:48 2018 +0100
idmap: In _wbint_Sids2UnixIDs, pass back what we have
SOME_UNMAPPED does not mean that nothing worthwhile is in here. We
need to pass what we have.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Tue Jan 8 13:15:35 CET 2019 on sn-devel-144
commit 6f2ccb59734440e5844d6ef703a41e032f7d1663
Author: Volker Lendecke <vl at samba.org>
Date: Tue Dec 18 15:53:21 2018 +0100
idmap_tdb: If one SID fails to map, try the rest
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
commit 0e2e6352054a9b4f2c211e9fa3ca3563421e792b
Author: Volker Lendecke <vl at samba.org>
Date: Fri Dec 21 11:49:33 2018 +0100
selftest: Test sids-to-xids with one failing sid
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
Signed-off-by: Volker Lendecke <vl at samba.org>
Signed-off-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
nsswitch/tests/test_wbinfo_sids_to_xids.sh | 32 ++++++++++++++++++++++++++++++
source3/selftest/tests.py | 5 +++++
source3/winbindd/idmap_tdb_common.c | 5 ++++-
source3/winbindd/winbindd_dual_srv.c | 9 +++++++++
4 files changed, 50 insertions(+), 1 deletion(-)
create mode 100755 nsswitch/tests/test_wbinfo_sids_to_xids.sh
Changeset truncated at 500 lines:
diff --git a/nsswitch/tests/test_wbinfo_sids_to_xids.sh b/nsswitch/tests/test_wbinfo_sids_to_xids.sh
new file mode 100755
index 00000000000..a3ab404f644
--- /dev/null
+++ b/nsswitch/tests/test_wbinfo_sids_to_xids.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+incdir=`dirname $0`/../../testprogs/blackbox
+. $incdir/subunit.sh
+
+#
+# S-1-5-123456789 fails, but S-1-5-11 succeeds. Check that S-1-5-11 is
+# mapped successfully with a GID in the 1000x range
+#
+wbinfo_some_mapped()
+{
+ output=`$VALGRIND $BINDIR/wbinfo --sids-to-unix-ids=S-1-5-123456789,S-1-5-11`
+ test x"$?" = x"0" || {
+ return 1
+ }
+
+ printf '%s' "$output" | grep -q 'S-1-5-123456789 -> unmapped' || {
+ printf '%s' "$output"
+ return 1
+ }
+
+ printf '%s' "$output" | grep -q 'S-1-5-11 -> gid 10000' || {
+ printf '%s' "$output"
+ return 1
+ }
+
+ return 0
+}
+
+testit "wbinfo some mapped" wbinfo_some_mapped || failed=`expr $failed + 1`
+
+testok $0 $failed
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index a3bb1c4feac..c0fde3ad3f0 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -262,6 +262,11 @@ plantestsuite("samba3.wbinfo_user_info", env,
"nsswitch/tests/test_wbinfo_user_info.sh"),
'$TRUST_DOMAIN', '$TRUST_REALM', '$DOMAIN', 'alice', 'alice', 'jane', 'jane.doe', env])
+env = "nt4_member:local"
+plantestsuite("samba3.wbinfo_sids_to_xids", env,
+ [os.path.join(srcdir(),
+ "nsswitch/tests/test_wbinfo_sids_to_xids.sh")])
+
env = "ad_member"
t = "WBCLIENT-MULTI-PING"
plantestsuite("samba3.smbtorture_s3.%s" % t, env, [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//foo/bar', '""', '""', smbtorture3, ""])
diff --git a/source3/winbindd/idmap_tdb_common.c b/source3/winbindd/idmap_tdb_common.c
index e130be08245..34269e3fe56 100644
--- a/source3/winbindd/idmap_tdb_common.c
+++ b/source3/winbindd/idmap_tdb_common.c
@@ -577,8 +577,11 @@ static NTSTATUS idmap_tdb_common_sids_to_unixids_action(struct db_context *db,
ret =
idmap_tdb_common_new_mapping(state->dom,
state->ids[i]);
+ DBG_DEBUG("idmap_tdb_common_new_mapping returned %s\n",
+ nt_errstr(ret));
if (!NT_STATUS_IS_OK(ret)) {
- goto done;
+ ret = STATUS_SOME_UNMAPPED;
+ continue;
}
num_mapped += 1;
}
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 62224bf313e..ab14f5d51a0 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -204,6 +204,15 @@ NTSTATUS _wbint_Sids2UnixIDs(struct pipes_struct *p,
status = dom->methods->sids_to_unixids(dom, id_map_ptrs);
+ if (NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) {
+ /*
+ * This is okay. We need to transfer the mapped ones
+ * up to our caller. The individual mappings carry the
+ * information whether they are mapped or not.
+ */
+ status = NT_STATUS_OK;
+ }
+
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("sids_to_unixids returned %s\n",
nt_errstr(status)));
--
Samba Shared Repository
More information about the samba-cvs
mailing list