Blame SOURCES/freeradius-set-S_IWUSER-when-creating-the-file.patch

305396
From 608943a10f589974191fe69ec6ab2b9b456fd85b Mon Sep 17 00:00:00 2001
305396
From: "Alan T. DeKok" <aland@freeradius.org>
305396
Date: Mon, 8 May 2017 16:00:01 -0400
305396
Subject: [PATCH] set S_IWUSER when creating the file
305396
305396
(cherry picked from commit 8f53382c64114936a0433d68101a24570783e13a)
305396
---
305396
 src/main/tls.c | 2 +-
305396
 1 file changed, 1 insertion(+), 1 deletion(-)
305396
305396
diff --git a/src/main/tls.c b/src/main/tls.c
305396
index b790d2dc1..887f81755 100644
305396
--- a/src/main/tls.c
305396
+++ b/src/main/tls.c
305396
@@ -1143,7 +1143,7 @@ static int cbtls_new_session(SSL *ssl, SSL_SESSION *sess)
305396
 		/* open output file */
305396
 		snprintf(filename, sizeof(filename), "%s%c%s.asn1",
305396
 			 conf->session_cache_path, FR_DIR_SEP, buffer);
305396
-		fd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0600);
305396
+		fd = open(filename, O_RDWR|O_CREAT|O_EXCL, S_IWUSR);
305396
 		if (fd < 0) {
305396
 			DEBUG2("  SSL: could not open session file %s: %s", filename, fr_syserror(errno));
305396
 			goto error;
305396
-- 
305396
2.11.0
305396