diff options
author | Jeremy Allison <jra@samba.org> | 2013-11-12 15:17:26 -0800 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-11-14 19:29:00 +0100 |
commit | 7d8e22c7c1cf0041fa638f3bb345e00fc339486b (patch) | |
tree | fb73089ccaba31631a123ad8d7ca7cdc2ba9719a | |
parent | 0d5f217cfe03df7258be37adf0f20067a8e30fa8 (diff) | |
download | samba-7d8e22c7c1cf0041fa638f3bb345e00fc339486b.tar.gz samba-7d8e22c7c1cf0041fa638f3bb345e00fc339486b.tar.xz samba-7d8e22c7c1cf0041fa638f3bb345e00fc339486b.zip |
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@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r-- | source3/smbd/dir.c | 6 | ||||
-rw-r--r-- | source3/smbd/proto.h | 2 | ||||
-rw-r--r-- | 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 d99eec21540..6b7cce266be 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 a15d5206d0c..a373cd6e665 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 3f59df8a261..b160290345c 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; } |