From e7d59d6de89a5fdd201e4b5c6072dab08b1519db Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Apr 2001 00:37:00 +0000 Subject: As Andrew suggested, make smbrun return a fd for a deleted file which can then be read. Jeremy. --- source/lib/util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/lib/util.c') diff --git a/source/lib/util.c b/source/lib/util.c index 42a9617077d..506a0334d1d 100644 --- a/source/lib/util.c +++ b/source/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 } -- cgit