git: DragonFly_RELEASE_6_4 gzip(1): Set file flags after setting file times

Aaron LI aly at crater.dragonflybsd.org
Tue Mar 5 17:53:37 PST 2024


commit 315e89fdd6f26e8a416d62603600bcd7e5da3cae
Author: Ricardo Branco <rbranco at suse.de>
Date:   Mon Mar 4 17:41:56 2024 +0100

    gzip(1): Set file flags after setting file times
    
    Only set the source file flags on the target file after the timestamp
    has been set; otherwise setting the timestamp will fail if the flags
    don't permit it (i.e., uchg).
    
    To reproduce the issue:
    $ /usr/bin/touch /tmp/foo
    $ /bin/chflags uchg /tmp/foo
    $ /usr/bin/gzip -v /tmp/foo
    gzip: couldn't utimes: /tmp/foo.gz: Operation not permitted
    
    GitHub PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/21
    See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=120208

Summary of changes:
 usr.bin/gzip/gzip.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/315e89fdd6f26e8a416d62603600bcd7e5da3cae


-- 
DragonFly BSD source repository


More information about the Commits mailing list