Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001 |
| 2 | From: Kamil Dudka <kdudka@redhat.com> |
| 3 | Date: Mon, 20 May 2013 16:38:06 +0200 |
| 4 | Subject: [PATCH] test: fix insufficient quoting of '\' |
| 5 | |
| 6 | This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which |
| 7 | caused sbits-restore.test to fail in the following way in case SELinux |
| 8 | was disabled: |
| 9 | |
| 10 | *** sbits-restore.test *** |
| 11 | [3] $ umask 022 -- ok |
| 12 | [4] $ mkdir d -- ok |
| 13 | [5] $ touch d/g -- ok |
| 14 | [6] $ touch d/u -- ok |
| 15 | [7] $ chmod u+s d/u -- ok |
| 16 | [8] $ chmod g+s d/g -- ok |
| 17 | [9] $ chmod +t d -- ok |
| 18 | [10] $ getfacl -R d > d.acl -- ok |
| 19 | [11] $ rm -R d -- ok |
| 20 | [12] $ mkdir d -- ok |
| 21 | [13] $ touch d/g -- ok |
| 22 | [14] $ touch d/u -- ok |
| 23 | [15] $ setfacl --restore d.acl -- ok |
| 24 | [16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed |
| 25 | drwxr-xr- != drwxr-xr-t |
| 26 | [18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed |
| 27 | -rwSr--r- != -rwSr--r-- |
| 28 | [20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed |
| 29 | -rw-r-Sr- != -rw-r-Sr-- |
| 30 | [22] $ rm -Rf d -- ok |
| 31 | 17 commands (14 passed, 3 failed) |
| 32 | |
| 33 | Upstream-Status: Backport |
| 34 | http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d |
| 35 | |
| 36 | Signed-off-by: Kamil Dudka <kdudka@redhat.com> |
| 37 | Signed-off-by: He Zhe <zhe.he@windriver.com> |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 38 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 39 | Index: acl-2.2.52/test/cp.test |
| 40 | =================================================================== |
| 41 | --- acl-2.2.52.orig/test/cp.test |
| 42 | +++ acl-2.2.52/test/cp.test |
| 43 | @@ -9,7 +9,7 @@ The cp utility should only copy ACLs if |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 44 | > -rw-rw-r--+ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 46 | $ cp f g |
| 47 | - $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g' |
| 48 | + $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g' |
| 49 | > -rw-r--r-- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 50 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 51 | $ rm g |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 52 | Index: acl-2.2.52/test/misc.test |
| 53 | =================================================================== |
| 54 | --- acl-2.2.52.orig/test/misc.test |
| 55 | +++ acl-2.2.52/test/misc.test |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 56 | @@ -254,7 +254,7 @@ Add some users and groups |
| 57 | Symlink in directory with default ACL? |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 58 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 59 | $ ln -s d d/l |
| 60 | - $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g' |
| 61 | + $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g' |
| 62 | > lrwxrwxrwx |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 63 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 64 | $ ls -dl -L d/l | awk '{print $1}' |
| 65 | @@ -343,7 +343,7 @@ Remove the default ACL |
| 66 | Reset to base entries |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 67 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 68 | $ setfacl -b d |
| 69 | - $ ls -dl d | awk '{print $1}' | sed 's/\.$//g' |
| 70 | + $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g' |
| 71 | > drwxr-x--- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 72 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 73 | $ getfacl --omit-header d |
| 74 | @@ -355,7 +355,7 @@ Reset to base entries |
| 75 | Now, chmod should change the group_obj entry |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 76 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 77 | $ chmod 775 d |
| 78 | - $ ls -dl d | awk '{print $1}' | sed 's/\.$//g' |
| 79 | + $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g' |
| 80 | > drwxrwxr-x |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 81 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 82 | $ getfacl --omit-header d |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 83 | Index: acl-2.2.52/test/sbits-restore.test |
| 84 | =================================================================== |
| 85 | --- acl-2.2.52.orig/test/sbits-restore.test |
| 86 | +++ acl-2.2.52/test/sbits-restore.test |
| 87 | @@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via - |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 88 | $ touch d/g |
| 89 | $ touch d/u |
| 90 | $ setfacl --restore d.acl |
| 91 | - $ ls -dl d | awk '{print $1}' | sed 's/\.$//g' |
| 92 | + $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g' |
| 93 | > drwxr-xr-t |
| 94 | - $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g' |
| 95 | + $ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g' |
| 96 | > -rwSr--r-- |
| 97 | - $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g' |
| 98 | + $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g' |
| 99 | > -rw-r-Sr-- |
| 100 | $ rm -Rf d |