summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-05-01 17:45:38 +0000
committerJeremy Allison <jra@samba.org>2003-05-01 17:45:38 +0000
commita2af45154d0e1bb76e78fbde1572d4fcd1ba0da2 (patch)
treecfeef89696d78596f84c0e0358e908089ffd4332 /source/smbd
parentcdfcdf39d1d74cdbf2eaf55601d9041f5016a5fa (diff)
downloadsamba-a2af45154d0e1bb76e78fbde1572d4fcd1ba0da2.tar.gz
samba-a2af45154d0e1bb76e78fbde1572d4fcd1ba0da2.tar.xz
samba-a2af45154d0e1bb76e78fbde1572d4fcd1ba0da2.zip
Fix for bugid 51 from Dragan Krnic.
Jeremy.
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/open.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 5e4f3caca74..906c4b40d9f 100644
--- a/source/smbd/open.c
+++ b/source/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. */