summaryrefslogtreecommitdiffstats
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-05-01 17:48:07 +0000
committerJeremy Allison <jra@samba.org>2003-05-01 17:48:07 +0000
commit731eba7dedbad1756cad9bd89186ce83e2d1002a (patch)
treebf2d4dfe2ed1ad3de4beb2d525b776d8e2355ca7 /source3/smbd
parente492cdb4e4deb9bba714272caed8772b8b25e4be (diff)
downloadsamba-731eba7dedbad1756cad9bd89186ce83e2d1002a.tar.gz
samba-731eba7dedbad1756cad9bd89186ce83e2d1002a.tar.xz
samba-731eba7dedbad1756cad9bd89186ce83e2d1002a.zip
Fix for bugid 51 from Dragan Krnic.
Jeremy. (This used to be commit aeba1fcab2fa61859fc1052af4752512a33bd801)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 5e4f3caca7..906c4b40d9 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -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. */