summaryrefslogtreecommitdiff
path: root/mdmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdmon.c')
-rw-r--r--mdmon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mdmon.c b/mdmon.c
index b84d4d95..21221cd6 100644
--- a/mdmon.c
+++ b/mdmon.c
@@ -232,6 +232,7 @@ static int make_control_sock(char *devname)
addr.sun_family = PF_LOCAL;
strcpy(addr.sun_path, path);
+ umask(077); /* ensure no world write access */
if (bind(sfd, &addr, sizeof(addr)) < 0) {
close(sfd);
return -1;