diff options
Diffstat (limited to 'discover')
-rw-r--r-- | discover/paths.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discover/paths.c b/discover/paths.c index c25671b..1269dde 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -6,6 +6,8 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> #include <talloc/talloc.h> #include <system/system.h> @@ -49,9 +51,12 @@ char *join_paths(void *alloc_ctx, const char *a, const char *b) static char *local_name(void *ctx) { char *ret, tmp[] = "/tmp/pb-XXXXXX"; + mode_t oldmask; int fd; + oldmask = umask(0644); fd = mkstemp(tmp); + umask(oldmask); if (fd < 0) return NULL; |