summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-10-20 02:50:12 +0000
committerAndrew Tridgell <tridge@samba.org>1997-10-20 02:50:12 +0000
commitf4b4b3e6e35916dc5e280542f5f914e40b25dd21 (patch)
tree5b5ec7d180ed210ca68cfbd989b82b12f28846d3 /source3/libsmb
parent7d711a6d0d3e2a974c00cdaa622f8b8d9fd35def (diff)
downloadsamba-f4b4b3e6e35916dc5e280542f5f914e40b25dd21.tar.gz
samba-f4b4b3e6e35916dc5e280542f5f914e40b25dd21.tar.bz2
samba-f4b4b3e6e35916dc5e280542f5f914e40b25dd21.zip
casting cleanups
(This used to be commit ab849a97821c9e1f199eea8ea2ec477687bed947)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/credentials.c12
-rw-r--r--source3/libsmb/smbdes.c12
2 files changed, 12 insertions, 12 deletions
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];