diff options
author | Jeremy Allison <jra@samba.org> | 2002-10-23 01:22:45 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-10-23 01:22:45 +0000 |
commit | 7689a9c96932a41ccde73b3df0ce358e62a38a15 (patch) | |
tree | 125f8535118f4b97464fa95388d54f6aa7a34661 /source3/smbd/open.c | |
parent | ef372e36f08c8cd370c1a8a70c60b045c4e736c3 (diff) | |
download | samba-7689a9c96932a41ccde73b3df0ce358e62a38a15.tar.gz samba-7689a9c96932a41ccde73b3df0ce358e62a38a15.tar.bz2 samba-7689a9c96932a41ccde73b3df0ce358e62a38a15.zip |
First cut of new ACL mapping code from Andreas Gruenbacher <agruen@suse.de>.
This is not 100% the same as what SuSE shipped in their Samba, there is
a crash bug fix, a race condition fix, and a few logic changes I'd like to
discuss with Andreas. Added Andreas to (C) notices for posix_acls.c
Jeremy.
(This used to be commit a81d700ae9c82d4b7ea631ab7862162a2ed3d512)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a95793a050..417a9dd039 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -165,9 +165,13 @@ static BOOL open_file(files_struct *fsp,connection_struct *conn, local_flags |= O_NONBLOCK; #endif - /* actually do the open */ + /* 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)); |