The Samba-Bugzilla – Attachment 15257 Details for
Bug 14002
samba.ntacls python module uses invalid "state dir" smb.conf parameter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch for 4.10
fix-14002_v4-10.patch (text/plain), 4.76 KB, created by
Björn Baumbach
on 2019-06-19 13:10:55 UTC
(
hide
)
Description:
proposed patch for 4.10
Filename:
MIME Type:
Creator:
Björn Baumbach
Created:
2019-06-19 13:10:55 UTC
Size:
4.76 KB
patch
obsolete
>From f573c2d5bccd8136e77c8a0e52041d638f010657 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Wed, 12 Jun 2019 21:00:01 +0200 >Subject: [PATCH 1/2] selftest: add test for samba-tool ntacl get/set > --use-ntvfs --xattr-backend=tdb >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Björn Baumbach <bb@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >(cherry picked from commit 1b0184a9562689a658e75a0cfc69bdd23277cff6) > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14002 >--- > selftest/knownfail | 2 ++ > testprogs/blackbox/test_samba-tool_ntacl.sh | 21 +++++++++++++++++++++ > 2 files changed, 23 insertions(+) > >diff --git a/selftest/knownfail b/selftest/knownfail >index 7176e097eb2..4df154d4728 100644 >--- a/selftest/knownfail >+++ b/selftest/knownfail >@@ -360,3 +360,5 @@ > ^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\) > ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) > ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) >+^samba4.blackbox.samba-tool_ntacl.*.set_ntacl_ntvfs >+^samba4.blackbox.samba-tool_ntacl.*.get_ntacl_ntvfs >diff --git a/testprogs/blackbox/test_samba-tool_ntacl.sh b/testprogs/blackbox/test_samba-tool_ntacl.sh >index b00d4f29ac2..64a7e6b55d3 100755 >--- a/testprogs/blackbox/test_samba-tool_ntacl.sh >+++ b/testprogs/blackbox/test_samba-tool_ntacl.sh >@@ -44,6 +44,24 @@ test_set_acl() > $PYTHON $samba_tool ntacl set "$acl" "$testfile" > } > >+test_get_acl_ntvfs() >+{ >+ testfile="$1" >+ exptextedacl="$2" >+ >+ retacl=$($PYTHON $samba_tool ntacl get "$testfile" --as-sddl --use-ntvfs --xattr-backend=tdb -s $PREFIX/ad_member/lib/server.conf) || return $? >+ >+ test "$retacl" = "$exptextedacl" >+} >+ >+test_set_acl_ntvfs() >+{ >+ testfile="$1" >+ acl="$2" >+ >+ $PYTHON $samba_tool ntacl set "$acl" "$testfile" --use-ntvfs --xattr-backend=tdb -s $PREFIX/ad_member/lib/server.conf >+} >+ > # work around include error - s4-loadparm does not allow missing include files > # > # Unable to load file /home/bbaumba/src/git/samba/st/ad_member/lib/server.conf >@@ -63,6 +81,9 @@ testit "set_ntacl" test_set_acl "$testfile" "$acl" || failed=`expr $failed + 1` > > testit "get_ntacl" test_get_acl "$testfile" "$acl" || failed=`expr $failed + 1` > >+testit "set_ntacl_ntvfs" test_set_acl_ntvfs "$testfile" "$acl" || failed=`expr $failed + 1` >+testit "get_ntacl_ntvfs" test_get_acl_ntvfs "$testfile" "$acl" || failed=`expr $failed + 1` >+ > rm -f "$testfile" > > exit $failed >-- >2.21.0 > > >From 5aec42a95a5445a98ded24e0d379c7e6efbe1b65 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Baumbach?= <bb@sernet.de> >Date: Wed, 12 Jun 2019 21:16:25 +0200 >Subject: [PATCH 2/2] python/ntacls: use correct "state directory" smb.conf > option instead of "state dir" >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >samba-tool ntacl get testfile --xattr-backend=tdb --use-ntvfs >Fixes: Unknown parameter encountered: "state dir" > >Signed-off-by: Björn Baumbach <bb@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >(cherry picked from commit 670a12df52df63a067b638d37bec71341bf18bdd) > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14002 >--- > python/samba/ntacls.py | 4 +++- > selftest/knownfail | 2 -- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py >index 5bf646caf9f..6337d9ecf36 100644 >--- a/python/samba/ntacls.py >+++ b/python/samba/ntacls.py >@@ -77,7 +77,9 @@ def checkset_backend(lp, backend, eadbfile): > if eadbfile is not None: > return (samba.xattr_tdb, eadbfile) > else: >- return (samba.xattr_tdb, os.path.abspath(os.path.join(lp.get("state dir"), "xattr.tdb"))) >+ state_dir = lp.get("state directory") >+ db_path = os.path.abspath(os.path.join(state_dir, "xattr.tdb")) >+ return (samba.xattr_tdb, db_path) > else: > raise XattrBackendError("Invalid xattr backend choice %s" % backend) > >diff --git a/selftest/knownfail b/selftest/knownfail >index 4df154d4728..7176e097eb2 100644 >--- a/selftest/knownfail >+++ b/selftest/knownfail >@@ -360,5 +360,3 @@ > ^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\) > ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) > ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) >-^samba4.blackbox.samba-tool_ntacl.*.set_ntacl_ntvfs >-^samba4.blackbox.samba-tool_ntacl.*.get_ntacl_ntvfs >-- >2.21.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
dbagnall
:
review+
timbeale
:
review+
bbaumbach
:
ci-passed+
Actions:
View
Attachments on
bug 14002
: 15257 |
15260