| Summary: | hardlink of symlink in archive messes up permissions | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Nils Rennebarth <nils.rennebarth> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.16.x | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Nils Rennebarth
2010-04-08 11:52:57 UTC
Works for me:
tar.tests:
==========
#!/bin/sh
rm -rf input_* test.tar 2>/dev/null
>input_hard1
chmod 741 input_hard1
ln input_hard1 input_hard2
mkdir input_dir
chmod 550 input_dir
ln input_hard1 input_dir
ln input_hard2 input_dir
/usr/bin/tar cf test.tar input_*
rm -rf input_*
./busybox tar tvf test.tar
./busybox tar xf test.tar
echo Ok: $?
ls -l . input_dir/* | grep input_
rm -rf input_* test.tar 2>/dev/null
Running it:
dr-xr-x--- root/root 0 2010-04-09 10:50:08 input_dir/
-rwxr----x root/root 0 2010-04-09 10:50:08 input_dir/input_hard1
-rwxr----x root/root 0 2010-04-09 10:50:08 input_dir/input_hard2 -> input_dir/input_hard1
-rwxr----x root/root 0 2010-04-09 10:50:08 input_hard1 -> input_dir/input_hard1
-rwxr----x root/root 0 2010-04-09 10:50:08 input_hard2 -> input_dir/input_hard1
Ok: 0
-rwxr----x 4 root root 0 Apr 9 10:50 input_dir/input_hard1
-rwxr----x 4 root root 0 Apr 9 10:50 input_dir/input_hard2
dr-xr-x--- 2 root root 112 Apr 9 10:50 input_dir
-rwxr----x 4 root root 0 Apr 9 10:50 input_hard1
-rwxr----x 4 root root 0 Apr 9 10:50 input_hard2
Ahh... I see! It happens with hardlink TO SYMLINK Fixed in git, please test. |