aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-18 02:00:55 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-18 02:00:55 +0200
commitd86b4c3907a78ab8785bcd6342ca233d0fe23ed0 (patch)
tree82c99ea6266a0587236e7b17f39dc541ebbe1936 /testsuite
parent0cc25945d8e6821d967bb97266774f9ee6c07197 (diff)
downloadbusybox-w32-d86b4c3907a78ab8785bcd6342ca233d0fe23ed0.tar.gz
busybox-w32-d86b4c3907a78ab8785bcd6342ca233d0fe23ed0.tar.bz2
busybox-w32-d86b4c3907a78ab8785bcd6342ca233d0fe23ed0.zip
data_extract_all: do not chmod symlink. Closes 2053
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/cpio.tests30
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" \
400 400
41-rw-r--r-- 2 $user $group 0 x 41-rw-r--r-- 2 $user $group 0 x
42-rw-r--r-- 2 $user $group 0 y 42-rw-r--r-- 2 $user $group 0 y
43" \ 43" "" ""
44 "" ""
45SKIP= 44SKIP=
46 45
47 46
@@ -56,8 +55,7 @@ cpio.testdir/x
56cpio.testdir/y 55cpio.testdir/y
571 blocks 561 blocks
580 570
59" \ 58" "" ""
60 "" ""
61} 59}
62 60
63 61
@@ -83,11 +81,9 @@ ls -ln cpio.testdir2/cpio.testdir | $FILTER_LS" \
83-rw-r--r-- 2 $user $group 2 nonempty 81-rw-r--r-- 2 $user $group 2 nonempty
84-rw-r--r-- 2 $user $group 2 nonempty1 82-rw-r--r-- 2 $user $group 2 nonempty1
85-rw-r--r-- 1 $user $group 0 solo 83-rw-r--r-- 1 $user $group 0 solo
86" \ 84" "" ""
87 "" ""
88SKIP= 85SKIP=
89 86
90
91# Was trying to create "/usr/bin", correct is "usr/bin". 87# Was trying to create "/usr/bin", correct is "usr/bin".
92rm -rf cpio.testdir 88rm -rf cpio.testdir
93optional FEATURE_CPIO_P 89optional FEATURE_CPIO_P
@@ -98,8 +94,24 @@ ls cpio.testdir" \
981 blocks 941 blocks
990 950
100usr 96usr
101" \ 97" "" ""
102 "" "" 98SKIP=
99
100# chown on a link was affecting file, dropping its sgid bits
101rm -rf cpio.testdir
102optional FEATURE_CPIO_O
103mkdir cpio.testdir
104touch cpio.testdir/file
105chmod 6755 cpio.testdir/file # set the suid/sgid bit
106ln -sf file cpio.testdir/link
107testing "cpio restores sgid bits" \
108"cd cpio.testdir && { echo file; echo link; } | cpio -ovHnewc >pack.cpio && rm ???? && cpio -idmvu <pack.cpio 2>/dev/null;
109 stat -c '%a %n' file" \
110"\
111file
112link
1136755 file
114" "" ""
103SKIP= 115SKIP=
104 116
105 117