From: Wayne Davison Date: Sat, 3 Nov 2007 19:27:49 +0000 (+0000) Subject: Make sure that the user has write permissions when opening a temp file. X-Git-Tag: v3.0.0pre5~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0379c8eca1716810c06a0c8710c06d77a6256be6;p=thirdparty%2Frsync.git Make sure that the user has write permissions when opening a temp file. --- 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) {