1 $NetBSD: patch-ac,v 1.1 2005/08/04 14:20:35 tron Exp $
3 --- unix/unix.c.orig 2005-02-26 19:43:42.000000000 +0000
4 +++ unix/unix.c 2005-08-04 15:15:17.000000000 +0100
11 /*---------------------------------------------------------------------------
12 If symbolic links are supported, allocate storage for a symlink control
13 structure, put the uncompressed "data" and other required info in it, and
16 slinkentry *slnk_entry;
20 if ((unsigned)slnk_entrysize < ucsize) {
21 Info(slide, 0x201, ((char *)slide,
22 "warning: symbolic link (%s) failed: mem alloc overflow\n",
23 @@ -1107,6 +1107,11 @@
28 + if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr)))
29 + perror("chmod (file attributes) error");
34 static void qlfix OF((__GPRO__ uch *ef_ptr, unsigned ef_len));
36 /* if -X option was specified and we have UID/GID info, restore it */
37 if (have_uidgid_flg) {
38 TTrace((stderr, "close_outfile: restoring Unix UID/GID info\n"));
39 - if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
40 + if (fchown(fileno(G.outfile), (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
43 Info(slide, 0x201, ((char *)slide,
50 /* set the file's access and modification times */
51 if (utime(G.filename, &(zt.t2))) {
53 @@ -1156,11 +1163,6 @@
55 ---------------------------------------------------------------------------*/
58 - if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr)))
59 - perror("chmod (file attributes) error");
62 } /* end function close_outfile() */