From c5e11daa8bb00665efabbf7939062e7e60112ced Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 22 May 2004 11:16:21 +0000 Subject: r818: added server side SMB signing to Samba4 (This used to be commit 8e5ddf5e8eb74f667897f90baa2d00f02ca5818b) --- source4/include/context.h | 12 ++++++++++++ source4/include/smb.h | 2 ++ 2 files changed, 14 insertions(+) (limited to 'source4/include') diff --git a/source4/include/context.h b/source4/include/context.h index 17664c50f8..e533c6d243 100644 --- a/source4/include/context.h +++ b/source4/include/context.h @@ -114,6 +114,9 @@ struct request_context { /* how far through the chain of SMB commands have we gone? */ unsigned chain_count; + /* the sequence number for signing */ + large_t seq_num; + /* the async structure allows backend functions to delay replying to requests. To use this, the front end must set async.send_fn to a function to be called by the backend @@ -329,6 +332,13 @@ struct timers_context { time_t last_smb_conf_reload; }; + +struct signing_context { + DATA_BLOB mac_key; + large_t next_seq_num; + enum smb_signing_state signing_state; +}; + #include "smbd/process_model.h" /* smb context structure. This should contain all the state @@ -355,6 +365,8 @@ struct server_context { struct dcesrv_context dcesrv; + struct signing_context signing; + /* the pid of the process handling this session */ pid_t pid; diff --git a/source4/include/smb.h b/source4/include/smb.h index 911aa9bd41..0881469af3 100644 --- a/source4/include/smb.h +++ b/source4/include/smb.h @@ -37,6 +37,8 @@ #define True (1) #define Auto (2) +enum smb_signing_state {SMB_SIGNING_OFF, SMB_SIGNING_SUPPORTED, SMB_SIGNING_REQUIRED}; + #ifndef _BOOL typedef int BOOL; #define _BOOL /* So we don't typedef BOOL again in vfs.h */ -- cgit