diff options
author | Gerald Carter <jerry@samba.org> | 2005-09-22 01:21:12 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-09-22 01:21:12 +0000 |
commit | d826a6a9b1bb26565fe75781dddac782a4757e90 (patch) | |
tree | a0856da45373abedef604417f83489148dcf334e /source/smbd/open.c | |
parent | 7a42b3de7aea0f8afefefd90db7fe8f255163589 (diff) | |
download | samba-d826a6a9b1bb26565fe75781dddac782a4757e90.tar.gz |
r10400: commit merge patch from jrasamba-3.0.20rc2
libsmbsharemodes added (Jermey).
Linux core dump fix from (James Peach).
Linux quota fixes from (metze).
krb5 memory leaks from (gd).
Creds fix for winbindd and server (Jeremy).
winbindd recursion fix (Jeremy).
winbindd builtin fix (gd)
universal pw error fixes (novell).
dir logic fix (Jeremy).
hide dotfiles fix (Jeremy)
no write to read-only shares fix (?).
exclusive open fix (vl).
tdb reopen fix (tridge)
status display open files fix (Jeremy)
posix acl null pointer crash (?)
posix acl mem leak (?)
mount.cifs flag fix (sfrench)
smbspool error message fix (?)
libsmbclient comment fix (?).
64-bit error message fixes (Jeremy).
Diffstat (limited to 'source/smbd/open.c')
-rw-r--r-- | source/smbd/open.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c index 99a284832f3..ed847826d52 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -1585,6 +1585,15 @@ files_struct *open_file_ntcreate(connection_struct *conn, fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,unx_mode,access_mask); + if (!fsp_open && (flags2 & O_EXCL) && (errno == EEXIST)) { + /* + * Two smbd's tried to open exclusively, but only one of them + * succeeded. + */ + file_free(fsp); + return NULL; + } + if (!fsp_open && (flags == O_RDWR) && (errno != ENOENT)) { if((fsp_open = open_file(fsp,conn,fname,psbuf, O_RDONLY,unx_mode,access_mask)) == True) { |