Imported Upstream version 2.2.51
[platform/upstream/acl.git] / test / malformed-restore.test
1 Test for malformed input to --restore
2  https://savannah.nongnu.org/bugs/index.php?28185
3
4         $ cp malformed-restore-double-owner.acl tmp.acl
5         $ sed -i "s/USER/%TUSER/g" tmp.acl
6         $ sed -i "s/GROUP/%TGROUP/g" tmp.acl
7         $ touch tmp
8         $ setfacl --restore tmp.acl
9         > setfacl: tmp.acl: Invalid argument
10         $ rm tmp.acl tmp
11
12         $ mkdir tmp
13         $ chmod 1777 tmp
14         $ getfacl tmp > tmp.acl
15         $ sed -i 's/--t/--x/g' tmp.acl
16         $ setfacl --restore tmp.acl
17         > setfacl: tmp.acl: Invalid argument
18         $ rmdir tmp
19         $ rm tmp.acl