summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2015-11-09 17:26:51 +0100
committerRalph Boehme <slow@samba.org>2016-01-22 07:52:21 +0100
commit780743d1b28d92352fa91322f9a14dc86055ea08 (patch)
tree32bed1f52e5001f5016387865c8d439345f4073a /source3/lib
parent83a557dfad713c0ab30c071ae4cdab0713337928 (diff)
downloadsamba-780743d1b28d92352fa91322f9a14dc86055ea08.tar.gz
smbstatus: show encrpytion state of tree connects
Show the encrpytion state of tcons in smbstatus. This is SMB3 only. CIFS UNIX extensions encryption will be added in a later commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/conn_tdb.c4
-rw-r--r--source3/lib/conn_tdb.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/conn_tdb.c b/source3/lib/conn_tdb.c
index bf66d7d7b66..8eca0a0271d 100644
--- a/source3/lib/conn_tdb.c
+++ b/source3/lib/conn_tdb.c
@@ -41,6 +41,7 @@ struct connections_forall_session {
gid_t gid;
fstring machine;
fstring addr;
+ uint16_t cipher;
};
static int collect_sessions_fn(struct smbXsrv_session_global0 *global,
@@ -62,6 +63,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;
status = dbwrap_store(state->session_by_pid,
make_tdb_data((void*)&id, sizeof(id)),
@@ -123,6 +125,8 @@ static int traverse_tcon_fn(struct smbXsrv_tcon_global0 *global,
fstrcpy(data.addr, sess.addr);
fstrcpy(data.machine, sess.machine);
data.start = nt_time_to_unix(global->creation_time);
+ data.encryption_flags = global->encryption_flags;
+ data.cipher = sess.cipher;
state->count++;
diff --git a/source3/lib/conn_tdb.h b/source3/lib/conn_tdb.h
index 217814faa54..b57fef8b79e 100644
--- a/source3/lib/conn_tdb.h
+++ b/source3/lib/conn_tdb.h
@@ -33,6 +33,8 @@ struct connections_data {
fstring addr;
fstring machine;
time_t start;
+ uint8_t encryption_flags;
+ uint16_t cipher;
};
/* The following definitions come from lib/conn_tdb.c */