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 | 029635885825a5562e7974a6f5675cce3bf1b5dc (patch) | |
tree | ae65d6961dc3d80b1b9cd9ca2eccb7664253ce3e /source/smbd/posix_acls.c | |
parent | eda76ecf07a4d2f9bb5544e2c031cfad14d93e85 (diff) | |
download | samba-029635885825a5562e7974a6f5675cce3bf1b5dc.tar.gz samba-029635885825a5562e7974a6f5675cce3bf1b5dc.tar.xz samba-029635885825a5562e7974a6f5675cce3bf1b5dc.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.
Diffstat (limited to 'source/smbd/posix_acls.c')
-rw-r--r-- | source/smbd/posix_acls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index c5da33c9df7..630e270de35 100644 --- a/source/smbd/posix_acls.c +++ b/source/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; } /* |