diff options
Diffstat (limited to 'src/authutil.c')
-rw-r--r-- | src/authutil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/authutil.c b/src/authutil.c index 86a716b..a47cf46 100644 --- a/src/authutil.c +++ b/src/authutil.c @@ -175,7 +175,8 @@ IceLockAuthFile ( { if (creat_fd == -1) { - creat_fd = creat (creat_name, 0666); + creat_fd = open (creat_name, + O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666); if (creat_fd == -1) { @@ -347,7 +348,7 @@ IceGetAuthFileEntry ( if (access (filename, R_OK) != 0) /* checks REAL id */ return (NULL); - if (!(auth_file = fopen (filename, "rb"))) + if (!(auth_file = fopen (filename, "rb" FOPEN_CLOEXEC))) return (NULL); for (;;) |