summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-13 00:37:00 +0000
committerJeremy Allison <jra@samba.org>2001-04-13 00:37:00 +0000
commite7d59d6de89a5fdd201e4b5c6072dab08b1519db (patch)
treebbd692f17878668c7eeedb8640a028eff73254f5 /source/lib/util.c
parenta17f2471571596e97b212ff9de1c8b45dac12eb6 (diff)
downloadsamba-e7d59d6de89a5fdd201e4b5c6072dab08b1519db.tar.gz
samba-e7d59d6de89a5fdd201e4b5c6072dab08b1519db.tar.xz
samba-e7d59d6de89a5fdd201e4b5c6072dab08b1519db.zip
As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read. Jeremy.
Diffstat (limited to 'source/lib/util.c')
-rw-r--r--source/lib/util.c5
1 files changed, 3 insertions, 2 deletions
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
}