summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 42a9617077..506a0334d1 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1752,8 +1752,9 @@ int smb_mkstemp(char *template)
#else
/* have a reasonable go at emulating it. Hope that
the system mktemp() isn't completly hopeless */
- if (!mktemp(template)) return -1;
- return open(template, O_CREAT|O_EXCL|O_RDWR, 0600);
+ char *p = smbd_mktemp(template);
+ if (!p) return -1;
+ return open(p, O_CREAT|O_EXCL|O_RDWR, 0600);
#endif
}