]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: add some debugging to test_give_owner.sh
authorRalph Boehme <slow@samba.org>
Thu, 12 Oct 2017 15:07:15 +0000 (17:07 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 25 Oct 2017 06:43:00 +0000 (08:43 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Oct 13 01:22:05 CEST 2017 on sn-devel-144

(cherry picked from commit 156015aed0b5a72b2f7150beb5cdaffa32b554e5)

source3/script/tests/test_give_owner.sh

index 64e09f3c2b4bbc65971a1e436c1e9b1f6de58158..c8f437ebd8b593972e0848ccc98a1d3d0e93cc9f 100755 (executable)
@@ -76,14 +76,34 @@ add_ace() {
 
     # avoid duplicate
     out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD)
+    if [ $? -ne 0 ] ; then
+       echo "get acl failed"
+       echo "$out"
+       return 1
+    fi
+    echo "Original ACL"
+    echo $out
     echo "$out" | grep "$local_ace" && return 0
 
     # add it
-    $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "$ace" || return 1
+    $SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD -a "$ace"
+    if [ $? -ne 0 ] ; then
+       echo "add acl failed"
+       return 1
+    fi
 
     # check it's there
-    out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD) || return 1
+    out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD)
+    if [ $? -ne 0 ] ; then
+       echo "get new acl failed"
+       echo "$out"
+       return 1
+    fi
+    echo "New ACL"
+    echo $out
+    echo "Checking if new ACL has \"$local_ace\""
     echo "$out" | grep "$local_ace" || return 1
+    echo "ok"
 }
 
 chown_give_fails() {