1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

As Andrew suggested, make smbrun return a fd for a deleted file which can then

be read.
Jeremy.
This commit is contained in:
Jeremy Allison
-
parent a17f247157
commit e7d59d6de8
12 changed files with 186 additions and 137 deletions

View File

@@ -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
}