From 04fc826efb290ba4b1f173752efb37a4b87281f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Kukkukk?= Date: Thu, 5 Feb 2009 19:48:58 -0800 Subject: [PATCH] Don't try and delete a default ACL from a file. --- source/smbd/posix_acls.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index 2fd047b2d07..5f1c2d9b639 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -3958,10 +3958,14 @@ BOOL set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_ { SMB_ACL_T def_acl = NULL; - if (num_def_acls && !S_ISDIR(psbuf->st_mode)) { - DEBUG(5,("set_unix_posix_default_acl: Can't set default ACL on non-directory file %s\n", fname )); - errno = EISDIR; - return False; + if (!S_ISDIR(psbuf->st_mode)) { + if (num_def_acls) { + DEBUG(5,("set_unix_posix_default_acl: Can't set default ACL on non-directory file %s\n", fname )); + errno = EISDIR; + return false; + } else { + return true; + } } if (!num_def_acls) { -- 2.47.2