File: malformed-restore.test

package info (click to toggle)
acl 2.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates
  • size: 3,200 kB
  • sloc: ansic: 5,916; sh: 5,379; perl: 279; makefile: 49; sed: 16
file content (19 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (4)
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 "%TESTDIR/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