1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

Fix for bugid 51 from Dragan Krnic.

Jeremy.
(This used to be commit a2af45154d0e1bb76e78fbde1572d4fcd1ba0da2)
This commit is contained in:
Jeremy Allison 2003-05-01 17:45:38 +00:00
parent d7b2564e86
commit 7ce38082f3

View File

@ -168,17 +168,17 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn,
/* Actually do the open */
fsp->fd = fd_open(conn, fname, local_flags, mode);
/* Inherit the ACL if the file was created. */
if ((local_flags & O_CREAT) && !VALID_STAT(*psbuf))
inherit_access_acl(conn, fname, mode);
if (fsp->fd == -1) {
DEBUG(3,("Error opening file %s (%s) (local_flags=%d) (flags=%d)\n",
fname,strerror(errno),local_flags,flags));
check_for_pipe(fname);
return False;
}
/* Inherit the ACL if the file was created. */
if ((local_flags & O_CREAT) && !VALID_STAT(*psbuf))
inherit_access_acl(conn, fname, mode);
} else
fsp->fd = -1; /* What we used to call a stat open. */