diff --git a/mdmon.c b/mdmon.c index b84d4d9..21221cd 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;