Skip to content

Commit 0676598

Browse files
committed
use secure --daemonize umask
Overwise, combination of --daemonize and --pidfile creates a world writeable pidfile. See https://bugs.debian.org/1128380
1 parent 8d116f7 commit 0676598

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ void daemonize(char *logfile) {
149149
}
150150

151151
if (!uwsgi.do_not_change_umask) {
152-
umask(0);
152+
umask(022);
153153
}
154154

155155
/*if (chdir("/") != 0) {

0 commit comments

Comments
 (0)