diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-06 20:16:04 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-08 10:42:28 +0100 |
commit | 8637dd12325369e0056d77924cac577a67f2a0ab (patch) | |
tree | 7a10611c83011d8bcb56ffe1bdd888d73ccdbdd0 /source3 | |
parent | 807ad174b288e4c3d36ed02e5ef02cd7a848ce0e (diff) | |
download | samba-8637dd12325369e0056d77924cac577a67f2a0ab.tar.gz |
change CHECK_READ to use smb_request instead of inbuf
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/smb_macros.h | 4 | ||||
-rw-r--r-- | source3/smbd/reply.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 46ca2365533..119ceeb158c 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -52,8 +52,8 @@ return ERROR_NT(NT_STATUS_INVALID_HANDLE); \ } while(0) -#define CHECK_READ(fsp,inbuf) (((fsp)->fh->fd != -1) && ((fsp)->can_read || \ - ((SVAL((inbuf),smb_flg2) & FLAGS2_READ_PERMIT_EXECUTE) && \ +#define CHECK_READ(fsp,req) (((fsp)->fh->fd != -1) && ((fsp)->can_read || \ + ((req->flags2 & FLAGS2_READ_PERMIT_EXECUTE) && \ (fsp->access_mask & FILE_EXECUTE)))) #define CHECK_WRITE(fsp) ((fsp)->can_write && ((fsp)->fh->fd != -1)) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 377ba4e530e..be39fd464d9 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2894,7 +2894,7 @@ void reply_lockread(struct smb_request *req) return; } - if (!CHECK_READ(fsp,req->inbuf)) { + if (!CHECK_READ(fsp,req)) { reply_doserror(req, ERRDOS, ERRbadaccess); END_PROFILE(SMBlockread); return; @@ -3002,7 +3002,7 @@ void reply_read(struct smb_request *req) return; } - if (!CHECK_READ(fsp,req->inbuf)) { + if (!CHECK_READ(fsp,req)) { reply_doserror(req, ERRDOS, ERRbadaccess); END_PROFILE(SMBread); return; @@ -3255,7 +3255,7 @@ void reply_read_and_X(struct smb_request *req) return; } - if (!CHECK_READ(fsp,req->inbuf)) { + if (!CHECK_READ(fsp,req)) { reply_doserror(req, ERRDOS,ERRbadaccess); END_PROFILE(SMBreadX); return; |