summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h7
-rw-r--r--source3/lib/util.c3
-rw-r--r--source3/libsmb/credentials.c12
-rw-r--r--source3/libsmb/smbdes.c12
-rw-r--r--source3/smbd/password.c2
5 files changed, 18 insertions, 18 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 29252f16e3..224aaa5a79 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -833,11 +833,10 @@ BOOL smb_shm_get_usage(int *bytes_free,
/*The following definitions come from smbdes.c */
-void str_to_key(unsigned char *str,unsigned char *key);
void E_P16(unsigned char *p14,unsigned char *p16);
void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24);
-void cred_hash1(char *out, char *in, char *key);
-void cred_hash2(char *out, char *in, char *key);
+void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key);
+void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key);
/*The following definitions come from smbencrypt.c */
@@ -1115,5 +1114,5 @@ void pstrcpy(char *dest, char *src);
char *align4(char *q, char *base);
char *align2(char *q, char *base);
char *align_offset(char *q, char *base, int align_offset_len);
-void dump_data(int level,unsigned char *buf,int len);
+void dump_data(int level,char *buf1,int len);
char *tab_depth(int depth);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 36e9e326ac..5c243204d0 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -4414,8 +4414,9 @@ static void print_asc(int level, unsigned char *buf,int len)
DEBUG(level,("%c", isprint(buf[i])?buf[i]:'.'));
}
-void dump_data(int level,unsigned char *buf,int len)
+void dump_data(int level,char *buf1,int len)
{
+ unsigned char *buf = (unsigned char *)buf1;
int i=0;
if (len<=0) return;
diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c
index f1a41b0b3b..ee7b1493e1 100644
--- a/source3/libsmb/credentials.c
+++ b/source3/libsmb/credentials.c
@@ -34,8 +34,8 @@ void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
uint32 session_key[2])
{
uint32 sum[2];
- char sum2[8];
- char netsesskey[8];
+ unsigned char sum2[8];
+ unsigned char netsesskey[8];
sum[0] = IVAL(clnt_chal->data, 0) + IVAL(srv_chal->data, 0);
sum[1] = IVAL(clnt_chal->data, 4) + IVAL(srv_chal->data, 4);
@@ -43,7 +43,7 @@ void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
SIVAL(sum2,0,sum[0]);
SIVAL(sum2,4,sum[1]);
- cred_hash1(netsesskey, sum2, pass);
+ cred_hash1(netsesskey, sum2,(unsigned char *)pass);
session_key[0] = IVAL(netsesskey, 0);
session_key[1] = IVAL(netsesskey, 4);
@@ -72,9 +72,9 @@ Output:
void cred_create(uint32 session_key[2], DOM_CHAL *stor_cred, UTIME timestamp,
DOM_CHAL *cred)
{
- char calc_cred[8];
- char timecred[8];
- char netsesskey[8];
+ unsigned char calc_cred[8];
+ unsigned char timecred[8];
+ unsigned char netsesskey[8];
SIVAL(netsesskey, 0, session_key[0]);
SIVAL(netsesskey, 4, session_key[1]);
diff --git a/source3/libsmb/smbdes.c b/source3/libsmb/smbdes.c
index 90bad778c5..67e27016c3 100644
--- a/source3/libsmb/smbdes.c
+++ b/source3/libsmb/smbdes.c
@@ -257,7 +257,7 @@ static void dohash(char *out, char *in, char *key)
permute(out, rl, perm6, 64);
}
-void str_to_key(unsigned char *str,unsigned char *key)
+static void str_to_key(unsigned char *str,unsigned char *key)
{
int i;
@@ -317,18 +317,18 @@ void E_P24(unsigned char *p21, unsigned char *c8, unsigned char *p24)
smbhash(p24+16, c8, p21+14);
}
-void cred_hash1(char *out, char *in, char *key)
+void cred_hash1(unsigned char *out,unsigned char *in,unsigned char *key)
{
- char buf[8];
+ unsigned char buf[8];
smbhash(buf, in, key);
smbhash(out, buf, key+9);
}
-void cred_hash2(char *out, char *in, char *key)
+void cred_hash2(unsigned char *out,unsigned char *in,unsigned char *key)
{
- char buf[8];
- static char key2[8];
+ unsigned char buf[8];
+ static unsigned char key2[8];
smbhash(buf, in, key);
key2[0] = key[7];
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 9f4f0abcae..2da8a8f936 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -1657,7 +1657,7 @@ BOOL server_cryptkey(char *buf)
}
/****************************************************************************
-attempted support for server level security
+support for server level security
****************************************************************************/
BOOL server_validate(char *buf)
{