summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c2
-rw-r--r--source3/libsmb/namequery.c8
-rw-r--r--source3/libsmb/pwd_cache.c9
3 files changed, 9 insertions, 10 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 89caad419f..30f7dc5d99 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -1879,7 +1879,7 @@ BOOL cli_establish_connection(struct cli_state *cli,
/* attempt encrypted session */
if (!cli_session_setup(cli, cli->user_name,
(char*)lm_sess_pwd, sizeof(lm_sess_pwd),
- nt_sess_pwd, sizeof(nt_sess_pwd),
+ (char*)nt_sess_pwd, sizeof(nt_sess_pwd),
cli->domain))
{
DEBUG(1,("failed session setup\n"));
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 5e189020ad..f988504bba 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -102,8 +102,8 @@ BOOL name_status(int fd,char *name,int name_type,BOOL recurse,
bzero((char *)&p,sizeof(p));
- if (!name_trn_id) name_trn_id = (time(NULL)%(unsigned)0x7FFF) +
- (getpid()%(unsigned)100);
+ if (!name_trn_id) name_trn_id = ((unsigned)time(NULL)%(unsigned)0x7FFF) +
+ ((unsigned)getpid()%(unsigned)100);
name_trn_id = (name_trn_id+1) % (unsigned)0x7FFF;
nmb->header.name_trn_id = name_trn_id;
@@ -210,8 +210,8 @@ struct in_addr *name_query(int fd,char *name,int name_type, BOOL bcast,BOOL recu
bzero((char *)&p,sizeof(p));
(*count) = 0;
- if (!name_trn_id) name_trn_id = (time(NULL)%(unsigned)0x7FFF) +
- (getpid()%(unsigned)100);
+ if (!name_trn_id) name_trn_id = ((unsigned)time(NULL)%(unsigned)0x7FFF) +
+ ((unsigned)getpid()%(unsigned)100);
name_trn_id = (name_trn_id+1) % (unsigned)0x7FFF;
nmb->header.name_trn_id = name_trn_id;
diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c
index e799a5458c..92eee015b3 100644
--- a/source3/libsmb/pwd_cache.c
+++ b/source3/libsmb/pwd_cache.c
@@ -133,7 +133,7 @@ void pwd_get_cleartext(struct pwd_info *pwd, char *clr)
/****************************************************************************
stores lm and nt hashed passwords
****************************************************************************/
-void pwd_set_lm_nt_16(struct pwd_info *pwd, char lm_pwd[16], char nt_pwd[16])
+void pwd_set_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16])
{
pwd_init(pwd);
@@ -165,7 +165,7 @@ void pwd_set_lm_nt_16(struct pwd_info *pwd, char lm_pwd[16], char nt_pwd[16])
/****************************************************************************
gets lm and nt hashed passwords
****************************************************************************/
-void pwd_get_lm_nt_16(struct pwd_info *pwd, char lm_pwd[16], char nt_pwd[16])
+void pwd_get_lm_nt_16(struct pwd_info *pwd, uchar lm_pwd[16], uchar nt_pwd[16])
{
pwd_deobfuscate(pwd);
memcpy(lm_pwd, pwd->smb_lm_pwd, 16);
@@ -191,7 +191,7 @@ void pwd_make_lm_nt_16(struct pwd_info *pwd, char *clr)
/****************************************************************************
makes lm and nt OWF crypts
****************************************************************************/
-void pwd_make_lm_nt_owf(struct pwd_info *pwd, char cryptkey[8])
+void pwd_make_lm_nt_owf(struct pwd_info *pwd, uchar cryptkey[8])
{
pwd_deobfuscate(pwd);
@@ -226,11 +226,10 @@ void pwd_make_lm_nt_owf(struct pwd_info *pwd, char cryptkey[8])
/****************************************************************************
gets lm and nt crypts
****************************************************************************/
-void pwd_get_lm_nt_owf(struct pwd_info *pwd, char lm_owf[24], char nt_owf[24])
+void pwd_get_lm_nt_owf(struct pwd_info *pwd, uchar lm_owf[24], uchar nt_owf[24])
{
pwd_deobfuscate(pwd);
memcpy(lm_owf, pwd->smb_lm_owf, 24);
memcpy(nt_owf, pwd->smb_nt_owf, 24);
pwd_obfuscate(pwd);
}
-