summaryrefslogtreecommitdiff
path: root/source3/smbwrapper
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-11 23:19:08 +0000
committerJeremy Allison <jra@samba.org>2001-04-11 23:19:08 +0000
commit6578fd874283ee97c2896bcf7257db7f3e37c2ec (patch)
treea5e9ee2ed36b4b0ba1521edbe961f3e2f9026f13 /source3/smbwrapper
parent0ca9f5c023df2ee498dcd1bdb2f29abc632a5d60 (diff)
downloadsamba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.tar.gz
samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.tar.bz2
samba-6578fd874283ee97c2896bcf7257db7f3e37c2ec.zip
To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke XFS ACL code. Jeremy. (This used to be commit 9b32b8a8cfc8ddb93c14d5581f433d2e93f89ed2)
Diffstat (limited to 'source3/smbwrapper')
-rw-r--r--source3/smbwrapper/shared.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbwrapper/shared.c b/source3/smbwrapper/shared.c
index f7f7b8c8ea..c9650c5863 100644
--- a/source3/smbwrapper/shared.c
+++ b/source3/smbwrapper/shared.c
@@ -33,15 +33,14 @@ setup the shared area
void smbw_setup_shared(void)
{
int fd;
- pstring s, name;
+ pstring name;
- slprintf(s,sizeof(s)-1, "%s/smbw.XXXXXX",tmpdir());
+ slprintf(name,sizeof(name)-1, "%s/smbw.XXXXXX",tmpdir());
- fstrcpy(name,(char *)smbd_mktemp(s));
+ fd = smb_mkstemp(name);
- /* note zero permissions! don't change this */
- fd = sys_open(name,O_RDWR|O_CREAT|O_TRUNC|O_EXCL,0);
if (fd == -1) goto failed;
+
unlink(name);
shared_fd = set_maxfiles(SMBW_MAX_OPEN);