Third part of fix for bug #8837 - smbd crashes when deleting directory and veto files...
authorJeremy Allison <jra@samba.org>
Wed, 4 Apr 2012 21:57:12 +0000 (14:57 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 7 May 2012 13:09:03 +0000 (15:09 +0200)
Use correct check to see if veto files has been enabled. Even if not
set lp_veto_files() returns a valid string address (to a '\0' character).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr  5 01:36:04 CEST 2012 on sn-devel-104
(cherry picked from commit 704ea4729b499ae2716cfe6ad5d952bcb1251a3b)

source3/smbd/close.c

index a431a5de5615bfe730d30a97b25cd9698811d134..a307f7020c63f8ddac59f8486532f4286efaed93 100644 (file)
@@ -817,7 +817,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp)
                return NT_STATUS_OK;
        }
 
-       if(((errno == ENOTEMPTY)||(errno == EEXIST)) && lp_veto_files(SNUM(conn))) {
+       if(((errno == ENOTEMPTY)||(errno == EEXIST)) && *lp_veto_files(SNUM(conn))) {
                /*
                 * Check to see if the only thing in this directory are
                 * vetoed files/directories. If so then delete them and