Bug 203625

Summary: Does O_TMPFILE honor umask?
Product: File System Reporter: anonymous (fepaw95099)
Component: OtherAssignee: fs_other
Status: NEW ---    
Severity: normal CC: max
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.19.27-gentoo-r1 Subsystem:
Regression: No Bisected commit-id:

Description anonymous 2019-05-16 22:33:16 UTC
According to `man 2 open`, O_CREAT honors umask, but O_TMPFILE doesn't explicitly state support for umask.

Can I infer that O_TMPFILE ignores umask? It is a bug for O_TMPFILE to ignore umask?

Or, should I report this issue to glibc?
Comment 1 Max Kellermann 2019-07-03 11:07:44 UTC
This bug report started as https://github.com/MusicPlayerDaemon/MPD/issues/558

As I wrote over there, I have a theory that this bug affects only kernels compiled without ACL support.

Most of my computers run a kernel I built, and I disabled ACL support because I don't need it. Those computers are affected by this bug. Therefore, I can confirm this bug report.

On the other hand, computers which run a Debian standard kernel (with ACL support) don't reproduce the bug.
Comment 2 Max Kellermann 2019-07-03 12:54:56 UTC
I confirmed that this happens when ACL support is disabled, and I submitted several patches to fix this bug:
https://lore.kernel.org/patchwork/patch/1096965/
https://lore.kernel.org/patchwork/patch/1096962/
https://lore.kernel.org/patchwork/patch/1096963/
https://lore.kernel.org/patchwork/patch/1096961/