summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-13 20:41:09 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-15 12:12:27 +0200
commita00f543aa61971bc38de385d8db85337e9b52e65 (patch)
treed0f2ff59ed0c985f0bcecf4d1897518464a35563
parenta1e2affd0fed1efba7f4b892e7b9abfa01abc2c8 (diff)
downloadsamba-a00f543aa61971bc38de385d8db85337e9b52e65.tar.gz
samba-a00f543aa61971bc38de385d8db85337e9b52e65.tar.bz2
samba-a00f543aa61971bc38de385d8db85337e9b52e65.zip
s3:libsmb: add cli_state_server_challenge() and cli_state_server_gss_blob()
metze
-rw-r--r--source3/libsmb/clientgen.c16
-rw-r--r--source3/libsmb/proto.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 170a2ca5f7..80d99a7b66 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -566,6 +566,22 @@ uint16_t cli_state_max_requests(struct cli_state *cli)
return cli->conn.smb1.server.max_mux;
}
+const uint8_t *cli_state_server_challenge(struct cli_state *cli)
+{
+ static const uint8_t zero;
+
+ if (cli->secblob.length == 8)
+ return cli->secblob.data;
+ }
+
+ return zero;
+}
+
+const DATA_BLOB *cli_state_server_gss_blob(struct cli_state *cli)
+{
+ return &cli->secblob;
+}
+
uint16_t cli_state_security_mode(struct cli_state *cli)
{
return cli->conn.smb1.server.security_mode;
diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h
index 88035ffa6b..469246e8ad 100644
--- a/source3/libsmb/proto.h
+++ b/source3/libsmb/proto.h
@@ -184,6 +184,8 @@ enum protocol_types cli_state_protocol(struct cli_state *cli);
uint32_t cli_state_capabilities(struct cli_state *cli);
uint32_t cli_state_available_size(struct cli_state *cli, uint32_t ofs);
uint16_t cli_state_max_requests(struct cli_state *cli);
+const uint8_t *cli_state_server_challenge(struct cli_state *cli);
+const DATA_BLOB *cli_state_server_gss_blob(struct cli_state *cli);
uint16_t cli_state_security_mode(struct cli_state *cli);
int cli_state_server_time_zone(struct cli_state *cli);
time_t cli_state_server_time(struct cli_state *cli);