Thread View: comp.sources.bugs
1 messages
1 total messages
Started by Paul Bijnens
Tue, 15 Sep 1992 11:54
patch compress 4.2 (from c.s.r.)
Author: Paul Bijnens
Date: Tue, 15 Sep 1992 11:54
Date: Tue, 15 Sep 1992 11:54
46 lines
2210 bytes
2210 bytes
The recently posted sources for compress 4.2 (on comp.sources.reviewed)
still contains the bug that I posted 2 times (and have seen mentioned
by other people a few other times). I wonder how it slipped through
the testing procedures... :-)
Nice to see compress still improved though.
The bug just boils down to the fact that in System V, you cannot
change the times of a file if you are not the owner. So just
move the "chown" syscall after the "utime" syscall.
Below is a uni-diff patch.
Sending this from an IBM mainframe running VM/CMS, the spaces, tabs
and line-endings will be grossly mangled... :-(
But wasn't the layout spoiled already by
the last "cleanup" (see compress42.c line 15)?
########################### cut here #################################
--- orig/compres42.c Mon Aug 31 23:58:04 1992
+++ compress42.c Sun Sep 13 09:10:40 1992
@@ -1213,9 +1213,6 @@
timep.actime = infstat.st_atime;
timep.modtime = infstat.st_mtime;
-#ifndef DOS
- chown(ofname, infstat.st_uid,
infstat.st_gid); /* Copy ownership */
-#endif
if (utime(ofname, &timep))
{
@@ -1223,6 +1220,9 @@
perror(ofname);
exit_code = 1;
}
+#ifndef DOS
+ chown(ofname, infstat.st_uid,
infstat.st_gid); /* Copy ownership */
+#endif
remove_ofname = 0;
########################### cut here #################################
--
Paul Bijnens
Linguistics dept., K. University Leuven, Belgium
Polleke@cc1.kuleuven.ac.be
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