Don't allow read/write raw when signing is active.
authorJeremy Allison <jra@samba.org>
Thu, 17 Jul 2003 00:53:37 +0000 (00:53 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 17 Jul 2003 00:53:37 +0000 (00:53 +0000)
Jeremy.

source/smbd/reply.c

index e7f01ad02fe667713d1a91c386bef57ecc7619ee..61323e8b56f2985e728bf738ac62ab292b8d06de 100644 (file)
@@ -1472,6 +1472,10 @@ int reply_readbraw(connection_struct *conn, char *inbuf, char *outbuf, int dum_s
        files_struct *fsp;
        START_PROFILE(SMBreadbraw);
 
+       if (srv_signing_active()) {
+               exit_server("reply_readbraw: SMB signing is active - raw reads/writes are disallowed.");
+       }
+
        /*
         * Special check if an oplock break has been issued
         * and the readraw request croses on the wire, we must
@@ -1870,6 +1874,10 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
        int outsize = 0;
        START_PROFILE(SMBwritebraw);
 
+       if (srv_signing_active()) {
+               exit_server("reply_readbraw: SMB signing is active - raw reads/writes are disallowed.");
+       }
+
        CHECK_FSP(fsp,conn);
        CHECK_WRITE(fsp);