From fd962863ce8c4ad0c4ab67dc2b181e5afe9f398f Mon Sep 17 00:00:00 2001 From: Don Penney Date: Mon, 15 Jul 2019 14:56:32 -0400 Subject: [PATCH] Set restricted permissions for mtce logfiles This update sets the umask for the mtclog daemon to restrict permissions on logfiles it creates. Change-Id: I712ecd46e4c550b946dd1df39557a8e0a87dad3d Partial-Bug: 1836632 Signed-off-by: Don Penney --- mtce/centos/build_srpm.data | 2 +- mtce/src/mtclog/mtclog.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mtce/centos/build_srpm.data b/mtce/centos/build_srpm.data index 41f9cbb7..80bd36f0 100644 --- a/mtce/centos/build_srpm.data +++ b/mtce/centos/build_srpm.data @@ -1,3 +1,3 @@ SRC_DIR="src" -TIS_PATCH_VER=152 +TIS_PATCH_VER=153 BUILD_IS_SLOW=5 diff --git a/mtce/src/mtclog/mtclog.cpp b/mtce/src/mtclog/mtclog.cpp index 38c33e15..46f915ab 100644 --- a/mtce/src/mtclog/mtclog.cpp +++ b/mtce/src/mtclog/mtclog.cpp @@ -251,7 +251,10 @@ void daemon_service_run ( void ) /* The CONFIG_COMPLETE file may be empty so don't look at size, * look at the node and dev ids as non-zero instead */ } while ((p.st_ino == 0 ) || (p.st_dev == 0)) ; - + + /* Set umask for the log files that will be created */ + umask(027); + /* Run daemon main loop */ for ( ; ; ) {