Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Masatoshi Watanabe
Fri, 30 Oct 1992 12:01
Bug in GNU tar 1.11.1
Author: Masatoshi Watanabe
Date: Fri, 30 Oct 1992 12:01
Date: Fri, 30 Oct 1992 12:01
46 lines
1886 bytes
1886 bytes
I found a problem in GNU tar 1.11.1. As shown in following log, owner
of the extracted directory is not same with original one. (izanami%
is a prompt.)
izanami% mkdir test
izanami% ls -lg
total 1
drwxr-xr-x 2 watanabe staff 512 Oct 30 20:15 test
izanami% tar cvf hoe.tar test
test/
izanami% rmdir test
izanami% su
Password:
izanami# tar xvf hoe.tar
test/
Reading test
izanami# ls -lg
total 11
-rw-r--r-- 1 watanabe staff 10240 Oct 30 20:16 hoe.tar
drwxr-xr-x 2 root wheel 512 Oct 30 20:15 test
This problem does not happen when using tar with -m option.
I attempted following patch to avoid this problem.
*** extract.c.orig Wed Sep 16 08:54:58 1992
--- extract.c Fri Oct 30 16:40:03 1992
***************
*** 652,657 ****
--- 652,665 ----
if (f_modified)
goto set_filestat;
+ if (we_are_root || f_do_chown) {
+ if (chown(skipcrud + current_file_name,
+ hstat.st_uid, hstat.st_gid) < 0) {
+ msg_perror("cannot chown file %s to uid %d gid %d",
+ skipcrud + current_file_name,
+ hstat.st_uid,hstat.st_gid);
+ }
+ }
tmp = (struct saved_dir_info *) malloc (sizeof (struct saved_dir_info));
tmp->path = malloc (strlen (skipcrud + current_file_name) + 1);
strcpy (tmp->path, skipcrud + current_file_name);
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads