diff options
author | Luke Leighton <lkcl@samba.org> | 1999-12-01 18:47:29 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-12-01 18:47:29 +0000 |
commit | d9cc4c39504534da0f4cd2569c724de4909ebd79 (patch) | |
tree | eea6f3546c9862fe53434a7120bff7a5356d2070 /source3/rpc_client/cli_connect.c | |
parent | 106fe88be01f7ac7d1369e97a6468dcd80c0a813 (diff) | |
download | samba-d9cc4c39504534da0f4cd2569c724de4909ebd79.tar.gz samba-d9cc4c39504534da0f4cd2569c724de4909ebd79.tar.bz2 samba-d9cc4c39504534da0f4cd2569c724de4909ebd79.zip |
improving createuser account command to be able to add workstations
and then set a default random password.
(This used to be commit 7846818432a93295651c8c67445a2d6a0f3b21d8)
Diffstat (limited to 'source3/rpc_client/cli_connect.c')
-rw-r--r-- | source3/rpc_client/cli_connect.c | 31 |
1 files changed, 31 insertions, 0 deletions
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 @@ -308,6 +308,21 @@ BOOL cli_pol_link(POLICY_HND *to, const POLICY_HND *from) 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. +****************************************************************************/ BOOL cli_get_con_sesskey(struct cli_connection *con, uchar sess_key[16]) { if (con == NULL) @@ -347,6 +362,22 @@ BOOL cli_con_get_srvname(struct cli_connection *con, char *srv_name) 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. +****************************************************************************/ BOOL cli_get_sesskey(const POLICY_HND *pol, uchar sess_key[16]) { struct cli_connection *con = NULL; |