[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3136-g5a58a4f

Jeremy Allison jra at samba.org
Tue Nov 11 22:21:26 GMT 2008


The branch, v3-2-test has been updated
       via  5a58a4f2b689571c52c90d04c969fe3c56551c5c (commit)
      from  058d1e2d0a4985825a62d2adc336a48d91ae4771 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 5a58a4f2b689571c52c90d04c969fe3c56551c5c
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Nov 11 14:20:53 2008 -0800

    Fix bug  5889. "delete veto files = no" seems to break.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/reply.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 2d271ab..7aeefea 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -5046,8 +5046,16 @@ NTSTATUS rmdir_internals(TALLOC_CTX *ctx,
 			}
 		}
 
-		/* We only have veto files/directories. Recursive delete. */
+		/* We only have veto files/directories.
+		 * Are we allowed to delete them ? */
 
+		if(!lp_recursive_veto_delete(SNUM(conn))) {
+			TALLOC_FREE(dir_hnd);
+			errno = ENOTEMPTY;
+			goto err;
+		}
+
+		/* Do a recursive delete. */
 		RewindDir(dir_hnd,&dirpos);
 		while ((dname = ReadDirName(dir_hnd,&dirpos))) {
 			char *fullname = NULL;
@@ -5073,9 +5081,8 @@ NTSTATUS rmdir_internals(TALLOC_CTX *ctx,
 				break;
 			}
 			if(st.st_mode & S_IFDIR) {
-				if(lp_recursive_veto_delete(SNUM(conn))) {
-					if(!recursive_rmdir(ctx, conn, fullname))
-						break;
+				if(!recursive_rmdir(ctx, conn, fullname)) {
+					break;
 				}
 				if(SMB_VFS_RMDIR(conn,fullname) != 0) {
 					break;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list