autofs/SOURCES/autofs-5.1.4-fix-flag-file-permission.patch
2021-10-08 09:50:49 +00:00

42 lines
1.0 KiB
Diff

autofs-5.1.4 - fix flag file permission
From: Ian Kent <raven@themaw.net>
The flag file used to check if automount(8) is running was being
created with mode 0 which caused unnecessary dac_override AVC
failures.
There's no reason to protect this file so just use 0644 as the
file permission.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 3 +++
daemon/flag.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG b/CHANGELOG
index 246279ae..d07d88ce 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+xx/xx/2018 autofs-5.1.5
+- fix flag file permission.
+
19/12/2017 autofs-5.1.4
- fix spec file url.
- fix unset tsd group name handling.
diff --git a/daemon/flag.c b/daemon/flag.c
index 99f26847..ff9858c8 100644
--- a/daemon/flag.c
+++ b/daemon/flag.c
@@ -164,7 +164,7 @@ int aquire_flag_file(void)
while (!we_created_flagfile) {
int errsv, i, j;
- i = open_fd_mode(linkf, O_WRONLY|O_CREAT, 0);
+ i = open_fd_mode(linkf, O_WRONLY|O_CREAT, 0644);
if (i < 0) {
release_flag_file();
return 0;