Hi

After upgrading a firewall to 5.9 I noticed that the ownership of logfiles
is not as I specified in newsyslog.conf. After newsyslog compressed the files
the ownership is always root:wheel.

I figured out that this is because gzip can not chown anymore since it was
pledged. The below patch fixes this.

Remi


Index: main.c
===================================================================
RCS file: /cvs/src/usr.bin/compress/main.c,v
retrieving revision 1.90
diff -u -p -r1.90 main.c
--- main.c      17 Oct 2015 21:34:07 -0000      1.90
+++ main.c      14 Jul 2016 05:40:35 -0000
@@ -167,7 +167,7 @@ main(int argc, char *argv[])
        char outfile[PATH_MAX], _infile[PATH_MAX], suffix[16];
        int bits, ch, error, rc, cflag, oflag;
 
-       if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
+       if (pledge("stdio rpath wpath cpath fattr chown", NULL) == -1)
                err(1, "pledge");
 
        bits = cflag = oflag = 0;

Reply via email to