From: Günter Kukkukk Date: Fri, 6 Feb 2009 03:48:58 +0000 (-0800) Subject: Don't try and delete a default ACL from a file. X-Git-Tag: samba-3.0.36~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ee9e31a71ab7942bb2c38ce695e8ace1b4235ed;p=thirdparty%2Fsamba.git Don't try and delete a default ACL from a file. (cherry picked from commit 04fc826efb290ba4b1f173752efb37a4b87281f2) --- diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index ed38ffcae15..d679304d901 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -3960,10 +3960,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) {