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?
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.
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/