Index: gnu/usr.bin/gzip/Makefile =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/gzip/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- gnu/usr.bin/gzip/Makefile 17 Sep 2002 01:48:49 -0000 1.24 +++ gnu/usr.bin/gzip/Makefile 14 Nov 2002 04:18:38 -0000 @@ -4,7 +4,7 @@ PROG= gzip SRCS= gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c \ crypt.c lzw.c unlzw.c unlzh.c unpack.c getopt.c -CFLAGS+=-DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 +CFLAGS+=-DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DDIRENT=1 -DWITH_ACL_SUPPORT .if ${MACHINE_ARCH} == "i386" SRCS+= match.S CFLAGS+=-DASMV Index: gnu/usr.bin/gzip/gzip.c =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/gzip/gzip.c,v retrieving revision 1.10 diff -u -r1.10 gzip.c --- gnu/usr.bin/gzip/gzip.c 27 Aug 1999 23:35:50 -0000 1.10 +++ gnu/usr.bin/gzip/gzip.c 14 Nov 2002 04:18:38 -0000 @@ -50,6 +50,9 @@ #include #include +#ifdef WITH_ACL_SUPPORT +#include +#endif #include #include #include @@ -1626,6 +1629,9 @@ local void copy_stat(ifstat) struct stat *ifstat; { +#ifdef WITH_ACL_SUPPORT + acl_t acl; +#endif #ifndef NO_UTIME if (decompress && time_stamp != 0 && ifstat->st_mtime != time_stamp) { ifstat->st_mtime = time_stamp; @@ -1642,6 +1648,16 @@ } #ifndef NO_CHOWN chown(ofname, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */ +#endif +#ifdef WITH_ACL_SUPPORT + /* Copy the ACL */ + acl = acl_get_file(ifname, ACL_TYPE_ACCESS); + if (acl != NULL) { + if (acl_set_file(ofname, ACL_TYPE_ACCESS, acl) == -1 && + errno != EOPNOTSUPP && !quiet) + warn("failed to set the ACL on %s", ofname); + acl_free(acl); + } #endif remove_ofname = 0; /* It's now safe to remove the input file: */