Blame SOURCES/autofs-5.1.4-fix-flag-file-permission.patch

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