From 0379c8eca1716810c06a0c8710c06d77a6256be6 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 3 Nov 2007 19:27:49 +0000 Subject: [PATCH] Make sure that the user has write permissions when opening a temp file. --- syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/syscall.c b/syscall.c index 0dfcaa01..4369c6e3 100644 --- a/syscall.c +++ b/syscall.c @@ -211,6 +211,7 @@ int do_mkstemp(char *template, mode_t perms) { RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF(read_only, EROFS); + perms |= S_IWUSR; #if defined HAVE_SECURE_MKSTEMP && defined HAVE_FCHMOD && (!defined HAVE_OPEN64 || defined HAVE_MKSTEMP64) { -- 2.34.1