[Pkg-samba-maint] [samba] 03/135: s3-smbd: smbclient shows no error if deleting a directory with del failed

Ivo De Decker ivodd at moszumanska.debian.org
Sat Jan 11 21:30:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

ivodd pushed a commit to branch master
in repository samba.

commit 845055c0019c6ac841effb3310e5886847e09810
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Nov 12 15:17:26 2013 -0800

    s3-smbd: smbclient shows no error if deleting a directory with del failed
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10260
    
    Remove unneeded conn argument to dir_check_ftype().
    Move to correct uint32_t types.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 7d8e22c7c1cf0041fa638f3bb345e00fc339486b)
---
 source3/smbd/dir.c   | 6 +++---
 source3/smbd/proto.h | 2 +-
 source3/smbd/reply.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index d99eec2..6b7cce2 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -966,9 +966,9 @@ struct dptr_struct *dptr_fetch_lanman2(struct smbd_server_connection *sconn,
  Check that a file matches a particular file type.
 ****************************************************************************/
 
-bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype)
+bool dir_check_ftype(uint32_t mode, uint32_t dirtype)
 {
-	uint32 mask;
+	uint32_t mask;
 
 	/* Check the "may have" search bits. */
 	if (((mode & ~dirtype) & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY)) != 0)
@@ -1106,7 +1106,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
 			continue;
 		}
 
-		if (!dir_check_ftype(conn, mode, dirtype)) {
+		if (!dir_check_ftype(mode, dirtype)) {
 			DEBUG(5,("[%s] attribs 0x%x didn't match 0x%x\n",
 				fname, (unsigned int)mode, (unsigned int)dirtype));
 			TALLOC_FREE(dname);
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 9c76609..91ef3ed 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -218,7 +218,7 @@ struct dptr_struct *dptr_fetch(struct smbd_server_connection *sconn,
 			       char *buf,int *num);
 struct dptr_struct *dptr_fetch_lanman2(struct smbd_server_connection *sconn,
 				       int dptr_num);
-bool dir_check_ftype(connection_struct *conn, uint32 mode, uint32 dirtype);
+bool dir_check_ftype(uint32_t mode, uint32_t dirtype);
 bool get_dir_entry(TALLOC_CTX *ctx,
 		struct dptr_struct *dirptr,
 		const char *mask,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 2ae3ff4..03c8414 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2655,7 +2655,7 @@ static NTSTATUS do_unlink(connection_struct *conn,
 		return NT_STATUS_NO_SUCH_FILE;
 	}
 
-	if (!dir_check_ftype(conn, fattr, dirtype)) {
+	if (!dir_check_ftype(fattr, dirtype)) {
 		if (fattr & FILE_ATTRIBUTE_DIRECTORY) {
 			return NT_STATUS_FILE_IS_A_DIRECTORY;
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list