struct messaging_context *msg_ctx,
int sock_fd,
bool interactive);
+bool valid_smb_header(const uint8_t *inbuf);
/* The following definitions come from smbd/quotas.c */
return (ret > 0);
}
-bool valid_smb_header(const uint8_t *inbuf)
-{
- if (is_encrypted_packet(inbuf)) {
- return true;
- }
- /*
- * This used to be (strncmp(smb_base(inbuf),"\377SMB",4) == 0)
- * but it just looks weird to call strncmp for this one.
- */
- return (IVAL(smb_base(inbuf), 0) == 0x424D53FF);
-}
-
/* Socket functions for smbd packet processing. */
static bool valid_packet_size(size_t len)
uint8_t *inbuf, size_t nread, size_t unread_bytes,
uint32_t seqnum, bool encrypted,
struct smb_perfcount_data *deferred_pcd);
-bool valid_smb_header(const uint8_t *inbuf);
void smbd_echo_init(struct smbXsrv_connection *xconn);
void construct_reply(struct smbXsrv_connection *xconn,
char *inbuf, int size, size_t unread_bytes,
req->outbuf = (uint8_t *)outbuf;
}
+bool valid_smb_header(const uint8_t *inbuf)
+{
+ if (is_encrypted_packet(inbuf)) {
+ return true;
+ }
+ /*
+ * This used to be (strncmp(smb_base(inbuf),"\377SMB",4) == 0)
+ * but it just looks weird to call strncmp for this one.
+ */
+ return (IVAL(smb_base(inbuf), 0) == 0x424D53FF);
+}
+
/****************************************************************************
Process an smb from the client
****************************************************************************/