diff options
author | Jeremy Allison <jra@samba.org> | 2007-01-18 06:19:24 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:16 -0500 |
commit | fd37f98158161406229b728a7c767121a30e254f (patch) | |
tree | bcc2ecea864702f61d56ccb1e2b10f7fa3672cc6 /source3/smbd/posix_acls.c | |
parent | a99840e59ee4bd27fd4f2cf8b465dd0f215ea067 (diff) | |
download | samba-fd37f98158161406229b728a7c767121a30e254f.tar.gz samba-fd37f98158161406229b728a7c767121a30e254f.tar.bz2 samba-fd37f98158161406229b728a7c767121a30e254f.zip |
r20873: Some correctness fixes w.r.t. Samba4 torture BASE-DELETE.
Allow us to correctly refuse to set delete on close on a
non-empty directory. There are still some delete-on-close
wrinkles to be fixed, but I understand how to do that better
now. I'll fix this tomorrow.
Jeremy.
(This used to be commit 029635885825a5562e7974a6f5675cce3bf1b5dc)
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r-- | source3/smbd/posix_acls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index c5da33c9df..630e270de3 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4221,6 +4221,11 @@ BOOL can_delete_file_in_directory(connection_struct *conn, const char *fname) if (sbuf.st_mode & S_ISVTX) { SMB_STRUCT_STAT sbuf_file; if(SMB_VFS_STAT(conn, fname, &sbuf_file) != 0) { + if (errno == ENOENT) { + /* If the file doesn't already exist then + * yes we'll be able to delete it. */ + return True; + } return False; } /* |