Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] zstd -t modifies /dev/null file mode bits
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Mon Sep 18, 2017 12:11 pm    Post subject: [solved] zstd -t modifies /dev/null file mode bits Reply with quote

I installed app-arch/zstd-1.3.0. It works fine. But if I run "zstd -t" as root, it modifies file mode bits of /dev/null:
Code:
# ls -la /dev/null
crw-rw-rw- 1 root root 1, 3 Sep 18 13:12 /dev/null

# zstd -t linux.tgz
linux.tgz : 27002880 bytes

# ls -la /dev/null
crw-r----- 1 root root 1, 3 Sep 18 13:12 /dev/null

A strace shows:
Code:
# strace -o trace.txt -f zstd -t linux.tgz
linux.tgz : 27002880 bytes

# grep "/dev/null" trace.txt
20269 open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
20269 utime("/dev/null", {actime=2017-09-18T13:50:14+0200, modtime=2017-09-18T13:12:41+0200}) = 0
20269 chown("/dev/null", 0, 0) = 0
20269 chmod("/dev/null", 0640) = 0

What the hell is going on? Does anyone else see this?


Last edited by mike155 on Mon Sep 18, 2017 9:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Mon Sep 18, 2017 12:53 pm    Post subject: Reply with quote

I filed a bug on the project's bug tracker: https://github.com/facebook/zstd/issues/851
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Mon Sep 18, 2017 9:16 pm    Post subject: Reply with quote

Upstream confirmed the bug and proposed a fix, which will probably be part of the next release.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum