diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-13 00:37:00 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-13 00:37:00 +0000 |
commit | 50e78a9ac8cf0949c2471fafde844c674f97d73d (patch) | |
tree | 4b9489a28767ea782a679e4c8c3b93ce5a1f19ba /source3/lib/util.c | |
parent | d85924a028f35e4789c70c068f903d677caf7ca0 (diff) | |
download | samba-50e78a9ac8cf0949c2471fafde844c674f97d73d.tar.gz samba-50e78a9ac8cf0949c2471fafde844c674f97d73d.tar.bz2 samba-50e78a9ac8cf0949c2471fafde844c674f97d73d.zip |
As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
(This used to be commit e7d59d6de89a5fdd201e4b5c6072dab08b1519db)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 5 |
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 } |