summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_login.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-05-11 06:38:36 +0000
committerAndrew Tridgell <tridge@samba.org>1998-05-11 06:38:36 +0000
commit3dfc0c847240ac7e12c39f4ed9c31a888949ade1 (patch)
tree305f006b62ed9dcdca0f751dbf40d2a34ee054df /source3/rpc_client/cli_login.c
parentffc88e2d26217f99c34ce24c0836bec3c809ca1a (diff)
downloadsamba-3dfc0c847240ac7e12c39f4ed9c31a888949ade1.tar.gz
samba-3dfc0c847240ac7e12c39f4ed9c31a888949ade1.tar.bz2
samba-3dfc0c847240ac7e12c39f4ed9c31a888949ade1.zip
changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes. (This used to be commit ee09e9dadb69aaba5a751dd20ccc6d587d841bd6)
Diffstat (limited to 'source3/rpc_client/cli_login.c')
-rw-r--r--source3/rpc_client/cli_login.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_client/cli_login.c b/source3/rpc_client/cli_login.c
index b4cdf3ae50..42363e4ca5 100644
--- a/source3/rpc_client/cli_login.c
+++ b/source3/rpc_client/cli_login.c
@@ -52,7 +52,7 @@ BOOL cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16])
/**************** Long-term Session key **************/
/* calculate the session key */
- cred_session_key(&clnt_chal, &srv_chal, mach_pwd, cli->sess_key);
+ cred_session_key(&clnt_chal, &srv_chal, (char *)mach_pwd, cli->sess_key);
bzero(cli->sess_key+8, 8);
/******************* Authenticate 2 ********************/
@@ -113,7 +113,7 @@ BOOL cli_nt_login_interactive(struct cli_state *cli, char *domain, char *usernam
DEBUG(5,("cli_nt_login_interactive: %d\n", __LINE__));
- nt_lm_owf_gen(password, nt_owf_user_pwd, lm_owf_user_pwd);
+ nt_lm_owf_gen(password, (char *)nt_owf_user_pwd, (char *)lm_owf_user_pwd);
#ifdef DEBUG_PASSWORD
@@ -134,7 +134,7 @@ BOOL cli_nt_login_interactive(struct cli_state *cli, char *domain, char *usernam
make_id_info1(&ctr->auth.id1, domain, 0,
smb_userid_low, 0,
username, cli->clnt_name_slash,
- cli->sess_key, lm_owf_user_pwd, nt_owf_user_pwd);
+ (char *)cli->sess_key, lm_owf_user_pwd, nt_owf_user_pwd);
/* Ensure we overwrite all the plaintext password
equivalents. */
@@ -170,7 +170,7 @@ BOOL cli_nt_login_network(struct cli_state *cli, char *domain, char *username,
make_id_info2(&ctr->auth.id2, domain, 0,
smb_userid_low, 0,
username, cli->clnt_name_slash,
- lm_chal, lm_chal_resp, nt_chal_resp);
+ (uchar *)lm_chal, (uchar *)lm_chal_resp, (uchar *)nt_chal_resp);
/* Send client sam-logon request - update credentials on success. */
return cli_net_sam_logon(cli, ctr, user_info3);