summaryrefslogtreecommitdiff
path: root/test/malformed-restore.test
blob: e92b75b438691cf5d740b7edc53b13b5e9438a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Test for malformed input to --restore
 https://savannah.nongnu.org/bugs/index.php?28185

	$ cp malformed-restore-double-owner.acl tmp.acl
	$ sed -i "s/USER/%TUSER/g" tmp.acl
	$ sed -i "s/GROUP/%TGROUP/g" tmp.acl
	$ touch tmp
	$ setfacl --restore tmp.acl
	> setfacl: tmp.acl: Invalid argument
	$ rm tmp.acl tmp

	$ mkdir tmp
	$ chmod 1777 tmp
	$ getfacl tmp > tmp.acl
	$ sed -i 's/--t/--x/g' tmp.acl
	$ setfacl --restore tmp.acl
	> setfacl: tmp.acl: Invalid argument
	$ rmdir tmp
	$ rm tmp.acl