s3:lib/conn_tdb: store the connection dialect
authorRalph Boehme <slow@samba.org>
Mon, 30 Nov 2015 10:14:34 +0000 (11:14 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 22 Jan 2016 06:52:21 +0000 (07:52 +0100)
This will be used in a subsequent commit that will print the signing
cipher in smbstatus. We need the connection dialect for that.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/conn_tdb.c
source3/lib/conn_tdb.h

index 8eca0a0271d989b75ec6a109273cecbda0aebcd8..b6dd11fad6bbcce7ba2debef7e3106c11737fc8c 100644 (file)
@@ -42,6 +42,7 @@ struct connections_forall_session {
        fstring machine;
        fstring addr;
        uint16_t cipher;
+       uint16_t dialect;
 };
 
 static int collect_sessions_fn(struct smbXsrv_session_global0 *global,
@@ -64,6 +65,7 @@ static int collect_sessions_fn(struct smbXsrv_session_global0 *global,
        fstrcpy(sess.machine, global->channels[0].remote_name);
        fstrcpy(sess.addr, global->channels[0].remote_address);
        sess.cipher = global->channels[0].encryption_cipher;
+       sess.dialect = global->connection_dialect;
 
        status = dbwrap_store(state->session_by_pid,
                              make_tdb_data((void*)&id, sizeof(id)),
@@ -127,6 +129,7 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global,
        data.start = nt_time_to_unix(global->creation_time);
        data.encryption_flags = global->encryption_flags;
        data.cipher = sess.cipher;
+       data.dialect = sess.dialect;
 
        state->count++;
 
index b57fef8b79ebd87175cff60a76292f58e2bfba39..c760ab77388dbd7963f9a923372955cda6955761 100644 (file)
@@ -35,6 +35,7 @@ struct connections_data {
        time_t start;
        uint8_t encryption_flags;
        uint16_t cipher;
+       uint16_t dialect;
 };
 
 /* The following definitions come from lib/conn_tdb.c  */