Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Seth Robertson
Mon, 28 Sep 1992 01:34
tar-1.11: No directory chown (report +fix)
Author: Seth Robertson
Date: Mon, 28 Sep 1992 01:34
Date: Mon, 28 Sep 1992 01:34
31 lines
1543 bytes
1543 bytes
My apologies if this has been reported before, but tar is not chowning
the directories to their owner as it creates the directories. Note
that if tar is trying to extract a file to a directory which does not
exist, my reading of the code indicates that the chown is performed
then.
In any case, here is my fix:
-Seth Robertson
seth@ctr.columbia.edu
--- extract.c.orig Tue Sep 15 19:54:58 1992
+++ extract.c Fri Sep 25 06:26:13 1992
@@ -650,6 +650,17 @@
skipcrud+current_file_name);
}
+#ifndef NODIRCHOWN
+ 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);
+ }
+ }
+#endif
+
if (f_modified)
goto set_filestat;
tmp = (struct saved_dir_info *) malloc (sizeof (struct saved_dir_info));
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