summaryrefslogtreecommitdiff
path: root/source3/smbwrapper/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbwrapper/shared.c')
-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);