summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-03-02 04:41:55 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-03-02 04:41:55 +0000
commite51c3224d0b8b5760c48ebe4f859f27cf3c202b6 (patch)
tree7bea972ff7feb2d7c8cbcda4e0b043a1be5cfa13 /source3/libsmb
parent0bc19c0bdbcfac2cad9029bcf36d3d00d82a074b (diff)
downloadsamba-e51c3224d0b8b5760c48ebe4f859f27cf3c202b6.tar.gz
samba-e51c3224d0b8b5760c48ebe4f859f27cf3c202b6.tar.bz2
samba-e51c3224d0b8b5760c48ebe4f859f27cf3c202b6.zip
Add a dash of const here and there...
(This used to be commit 413a46292b4e963343abce2428955305052e9cb4)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/credentials.c6
-rw-r--r--source3/libsmb/smbdes.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/libsmb/credentials.c b/source3/libsmb/credentials.c
index fb874fc1db..0d521bae8a 100644
--- a/source3/libsmb/credentials.c
+++ b/source3/libsmb/credentials.c
@@ -23,7 +23,7 @@
/****************************************************************************
represent a credential as a string
****************************************************************************/
-char *credstr(uchar *cred)
+char *credstr(const uchar *cred)
{
static fstring buf;
slprintf(buf, sizeof(buf) - 1, "%02X%02X%02X%02X%02X%02X%02X%02X",
@@ -41,7 +41,7 @@ Input: 8 byte challenge block
Output:
8 byte session key
****************************************************************************/
-void cred_session_key(DOM_CHAL *clnt_chal, DOM_CHAL *srv_chal, char *pass,
+void cred_session_key(const DOM_CHAL *clnt_chal, const DOM_CHAL *srv_chal, const uchar *pass,
uchar session_key[8])
{
uint32 sum[2];
@@ -53,7 +53,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(session_key, sum2,(unsigned char *)pass);
+ cred_hash1(session_key, sum2, pass);
/* debug output */
DEBUG(4,("cred_session_key\n"));
diff --git a/source3/libsmb/smbdes.c b/source3/libsmb/smbdes.c
index dd50feb44d..440121d126 100644
--- a/source3/libsmb/smbdes.c
+++ b/source3/libsmb/smbdes.c
@@ -330,7 +330,7 @@ void E_old_pw_hash( unsigned char *p14, const unsigned char *in, unsigned char *
smbhash(out+8, in+8, p14+7, 1);
}
-void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key)
+void cred_hash1(unsigned char *out, const unsigned char *in, const unsigned char *key)
{
unsigned char buf[8];
@@ -338,7 +338,7 @@ void cred_hash1(unsigned char *out, const unsigned char *in,unsigned char *key)
smbhash(out, buf, key+9, 1);
}
-void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key)
+void cred_hash2(unsigned char *out, const unsigned char *in, const unsigned char *key)
{
unsigned char buf[8];
static unsigned char key2[8];
@@ -348,7 +348,7 @@ void cred_hash2(unsigned char *out, const unsigned char *in,unsigned char *key)
smbhash(out, buf, key2, 1);
}
-void cred_hash3(unsigned char *out,unsigned char *in,unsigned char *key, int forw)
+void cred_hash3(unsigned char *out, unsigned char *in, const unsigned char *key, int forw)
{
static unsigned char key2[8];