From d9cc4c39504534da0f4cd2569c724de4909ebd79 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Wed, 1 Dec 1999 18:47:29 +0000 Subject: improving createuser account command to be able to add workstations and then set a default random password. (This used to be commit 7846818432a93295651c8c67445a2d6a0f3b21d8) --- source3/rpc_client/cli_connect.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source3/rpc_client/cli_connect.c') diff --git a/source3/rpc_client/cli_connect.c b/source3/rpc_client/cli_connect.c index d2d23864c3..d9ae71e6c9 100644 --- a/source3/rpc_client/cli_connect.c +++ b/source3/rpc_client/cli_connect.c @@ -304,6 +304,21 @@ BOOL cli_pol_link(POLICY_HND *to, const POLICY_HND *from) return register_policy_hnd(to) && set_policy_con(to, con, NULL); } +/**************************************************************************** +get a user session key associated with a connection associated with a +policy handle. +****************************************************************************/ +BOOL cli_get_con_usr_sesskey(struct cli_connection *con, uchar usr_sess_key[16]) +{ + if (con == NULL) + { + return False; + } + memcpy(usr_sess_key, con->cli->usr.pwd.sess_key, 16); + + return True; +} + /**************************************************************************** get a user session key associated with a connection associated with a policy handle. @@ -343,6 +358,22 @@ BOOL cli_con_get_srvname(struct cli_connection *con, char *srv_name) return True; } +/**************************************************************************** +get a user session key associated with a connection associated with a +policy handle. +****************************************************************************/ +BOOL cli_get_usr_sesskey(const POLICY_HND *pol, uchar usr_sess_key[16]) +{ + struct cli_connection *con = NULL; + + if (!cli_connection_get(pol, &con)) + { + return False; + } + + return cli_get_con_usr_sesskey(con, usr_sess_key); +} + /**************************************************************************** get a user session key associated with a connection associated with a policy handle. -- cgit