summaryrefslogtreecommitdiffstats
path: root/src/tests/debug-tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/debug-tests.c')
-rw-r--r--src/tests/debug-tests.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/debug-tests.c b/src/tests/debug-tests.c
index 8a338fb5f..40dd2e98b 100644
--- a/src/tests/debug-tests.c
+++ b/src/tests/debug-tests.c
@@ -191,10 +191,14 @@ int test_helper_debug_check_message(int level, int msgmode)
int fd;
int ret;
int _errno = 0;
+ mode_t old_umask;
FILE *file = NULL;
strncpy(filename, "sssd_debug_tests.XXXXXX", 24);
+
+ old_umask = umask(077);
fd = mkstemp(filename);
+ umask(old_umask);
if (fd == -1) {
_errno = errno;
talloc_free(ctx);
@@ -331,10 +335,14 @@ int test_helper_debug_is_empty_message(int level, int msgmode)
int filesize;
int ret;
int _errno = 0;
+ mode_t old_umask;
FILE *file;
strncpy(filename, "sssd_debug_tests.XXXXXX", 24);
+
+ old_umask = umask(077);
fd = mkstemp(filename);
+ umask(old_umask);
if (fd == -1) {
return DEBUG_TEST_ERROR;
}