Bug 203625 - Does O_TMPFILE honor umask?
Summary: Does O_TMPFILE honor umask?
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-16 22:33 UTC by anonymous
Modified: 2019-07-03 12:54 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.19.27-gentoo-r1
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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/

Note You need to log in before you can comment on or make changes to this bug.