selftest: prevent interpretation of escape sequences in test_give_owner.sh
authorRalph Boehme <slow@samba.org>
Fri, 13 Oct 2017 12:32:58 +0000 (14:32 +0200)
committerRalph Boehme <slow@samba.org>
Sat, 14 Oct 2017 04:02:50 +0000 (06:02 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=7933

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Oct 14 06:02:50 CEST 2017 on sn-devel-144

source3/script/tests/test_give_owner.sh

index c8f437ebd8b593972e0848ccc98a1d3d0e93cc9f..7ee37341b42f45e2a02be758cb5394136a053d8a 100755 (executable)
@@ -72,7 +72,7 @@ add_ace() {
     local fname=$2
     local ace=$3
 
-    local_ace=$(echo $ace | sed 's|\\|/|')
+    local_ace=$(printf '%s' "$ace" | sed 's|\\|/|')
 
     # avoid duplicate
     out=$($SMBCACLS //$SERVER/$share $fname -U $USERNAME%$PASSWORD)