diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-18 04:00:55 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-18 04:00:55 +0400 |
commit | d86b4c3907a78ab8785bcd6342ca233d0fe23ed0 (patch) | |
tree | 82c99ea6266a0587236e7b17f39dc541ebbe1936 /testsuite/cpio.tests | |
parent | 0cc25945d8e6821d967bb97266774f9ee6c07197 (diff) |
data_extract_all: do not chmod symlink. Closes 2053
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/cpio.tests')
-rwxr-xr-x | testsuite/cpio.tests | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/testsuite/cpio.tests b/testsuite/cpio.tests index 725e70eab..42e3ff8dc 100755 --- a/testsuite/cpio.tests +++ b/testsuite/cpio.tests @@ -40,8 +40,7 @@ ls -ln cpio.testdir | $FILTER_LS" \ 0 -rw-r--r-- 2 $user $group 0 x -rw-r--r-- 2 $user $group 0 y -" \ - "" "" +" "" "" SKIP= @@ -56,8 +55,7 @@ cpio.testdir/x cpio.testdir/y 1 blocks 0 -" \ - "" "" +" "" "" } @@ -83,11 +81,9 @@ ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \ -rw-r--r-- 2 $user $group 2 nonempty -rw-r--r-- 2 $user $group 2 nonempty1 -rw-r--r-- 1 $user $group 0 solo -" \ - "" "" +" "" "" SKIP= - # Was trying to create "/usr/bin", correct is "usr/bin". rm -rf cpio.testdir optional FEATURE_CPIO_P @@ -98,8 +94,24 @@ ls cpio.testdir" \ 1 blocks 0 usr -" \ - "" "" +" "" "" +SKIP= + +# chown on a link was affecting file, dropping its sgid bits +rm -rf cpio.testdir +optional FEATURE_CPIO_O +mkdir cpio.testdir +touch cpio.testdir/file +chmod 6755 cpio.testdir/file # set the suid/sgid bit +ln -sf file cpio.testdir/link +testing "cpio restores sgid bits" \ +"cd cpio.testdir && { echo file; echo link; } | cpio -ovHnewc >pack.cpio && rm ???? && cpio -idmvu <pack.cpio 2>/dev/null; + stat -c '%a %n' file" \ +"\ +file +link +6755 file +" "" "" SKIP= |