summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
blob: f392465b58efe862ab4c4881304bd8853c43bb58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 20 May 2013 16:38:06 +0200
Subject: [PATCH] test: fix insufficient quoting of '\'

This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
caused sbits-restore.test to fail in the following way in case SELinux
was disabled:

*** sbits-restore.test ***
[3] $ umask 022 -- ok
[4] $ mkdir d -- ok
[5] $ touch d/g -- ok
[6] $ touch d/u -- ok
[7] $ chmod u+s d/u -- ok
[8] $ chmod g+s d/g -- ok
[9] $ chmod +t d -- ok
[10] $ getfacl -R d > d.acl -- ok
[11] $ rm -R d -- ok
[12] $ mkdir d -- ok
[13] $ touch d/g -- ok
[14] $ touch d/u -- ok
[15] $ setfacl --restore d.acl -- ok
[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
drwxr-xr-                             != drwxr-xr-t
[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
-rwSr--r-                             != -rwSr--r--
[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
-rw-r-Sr-                             != -rw-r-Sr--
[22] $ rm -Rf d -- ok
17 commands (14 passed, 3 failed)

Upstream-Status: Backport
http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>

Index: acl-2.2.52/test/cp.test
===================================================================
--- acl-2.2.52.orig/test/cp.test
+++ acl-2.2.52/test/cp.test
@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if
 	> -rw-rw-r--+
 	
 	$ cp f g
-	$ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
+	$ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
 	> -rw-r--r--
 	
 	$ rm g
Index: acl-2.2.52/test/misc.test
===================================================================
--- acl-2.2.52.orig/test/misc.test
+++ acl-2.2.52/test/misc.test
@@ -254,7 +254,7 @@ Add some users and groups
 Symlink in directory with default ACL?
 	 
 	$ ln -s d d/l
-	$ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
+	$ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
 	> lrwxrwxrwx
 
 	$ ls -dl -L d/l | awk '{print $1}'
@@ -343,7 +343,7 @@ Remove the default ACL
 Reset to base entries
 	 
 	$ setfacl -b d
-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
 	> drwxr-x---
 
 	$ getfacl --omit-header d
@@ -355,7 +355,7 @@ Reset to base entries
 Now, chmod should change the group_obj entry
 	 
 	$ chmod 775 d
-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
 	> drwxrwxr-x
 	
 	$ getfacl --omit-header d
Index: acl-2.2.52/test/sbits-restore.test
===================================================================
--- acl-2.2.52.orig/test/sbits-restore.test
+++ acl-2.2.52/test/sbits-restore.test
@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via -
 	$ touch d/g
 	$ touch d/u
 	$ setfacl --restore d.acl
-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
+	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
 	> drwxr-xr-t
-	$ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
+	$ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
 	> -rwSr--r--
-	$ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
+	$ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
 	> -rw-r-Sr--
 	$ rm -Rf d