summaryrefslogtreecommitdiff
path: root/src/providers/ipa/ipa_subdomains.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ipa/ipa_subdomains.c')
-rw-r--r--src/providers/ipa/ipa_subdomains.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 9adc3fa9..98c7de34 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -285,6 +285,7 @@ ipa_subdomains_write_mappings(struct sss_domain_info *domain,
const char *mapping_file;
char *tmp_file = NULL;
int fd = -1;
+ mode_t old_mode;
FILE *fstream = NULL;
size_t i;
@@ -304,7 +305,9 @@ ipa_subdomains_write_mappings(struct sss_domain_info *domain,
goto done;
}
+ old_mode = umask(077);
fd = mkstemp(tmp_file);
+ umask(old_mode);
if (fd < 0) {
DEBUG(SSSDBG_OP_FAILURE, ("creating the temp file [%s] for domain-realm "
"mappings failed.", tmp_file));