summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-05-29 07:47:47 +0000
committerAndrew Tridgell <tridge@samba.org>1996-05-29 07:47:47 +0000
commit39fbeb04ae938594c380d97ebe67c012fa0dd51a (patch)
tree4a188f8dc01ec27b77c879a9bfadc40677126564
parent2f793c48a9447955195620c891d30d93b518ee0d (diff)
downloadsamba-39fbeb04ae938594c380d97ebe67c012fa0dd51a.tar.gz
cleanups to make thinsg compile cleanly
-rw-r--r--source/libsmb/smbencrypt.c2
-rw-r--r--source/passdb/smbpass.c4
-rw-r--r--source/smbd/password.c17
-rw-r--r--source/utils/smbpasswd.c18
4 files changed, 22 insertions, 19 deletions
diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c
index a0683b5d282..0221520ce65 100644
--- a/source/libsmb/smbencrypt.c
+++ b/source/libsmb/smbencrypt.c
@@ -166,7 +166,7 @@ void E_md4hash(uchar *passwd, uchar *p16)
MDstruct MD;
/* Password cannot be longer than 128 characters */
- len = strlen(passwd);
+ len = strlen((char *)passwd);
if(len > 128)
len = 128;
/* Password must be converted to NT unicode */
diff --git a/source/passdb/smbpass.c b/source/passdb/smbpass.c
index 2dec15ffb43..ca86d95618d 100644
--- a/source/passdb/smbpass.c
+++ b/source/passdb/smbpass.c
@@ -262,7 +262,7 @@ get_smbpwnam(char *name)
if (!strncasecmp((char *) p, "NO PASSWORD", 11)) {
pw_buf.smb_passwd = NULL;
} else {
- if(!gethexpwd(p,smbpwd)) {
+ if(!gethexpwd((char *)p,(char *)smbpwd)) {
DEBUG(0, ("Malformed Lanman password entry (non hex chars)\n"));
fclose(fp);
pw_file_unlock(lockfd);
@@ -280,7 +280,7 @@ get_smbpwnam(char *name)
the lanman password. */
if ((linebuf_len >= (PTR_DIFF(p, linebuf) + 33)) && (p[32] == ':')) {
if (*p != '*' && *p != 'X') {
- if(gethexpwd(p,smbntpwd))
+ if(gethexpwd((char *)p,(char *)smbntpwd))
pw_buf.smb_nt_passwd = smbntpwd;
}
}
diff --git a/source/smbd/password.c b/source/smbd/password.c
index fcfe1b4a2ce..6031daf5f16 100644
--- a/source/smbd/password.c
+++ b/source/smbd/password.c
@@ -52,7 +52,7 @@ void generate_next_challenge(char *challenge)
v2 = (counter++) * getpid() + tval.tv_usec;
SIVAL(challenge,0,v1);
SIVAL(challenge,4,v2);
- E1(challenge,"SAMBA",saved_challenge);
+ E1(challenge,"SAMBA",(char *)saved_challenge);
memcpy(challenge,saved_challenge,8);
challenge_sent = True;
}
@@ -684,7 +684,9 @@ BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd, BOOL
if(smb_pass->smb_nt_passwd != NULL)
{
DEBUG(4,("Checking NT MD4 password\n"));
- if(smb_password_check(password, smb_pass->smb_nt_passwd, challenge))
+ if(smb_password_check(password,
+ smb_pass->smb_nt_passwd,
+ (char *)challenge))
{
update_protected_database(user,True);
return(True);
@@ -696,11 +698,12 @@ BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd, BOOL
/* Try against the lanman password */
- if(smb_password_check(password, smb_pass->smb_passwd, challenge))
- {
- update_protected_database(user,True);
- return(True);
- }
+ if (smb_password_check(password,
+ smb_pass->smb_passwd,
+ (char *)challenge)) {
+ update_protected_database(user,True);
+ return(True);
+ }
DEBUG(3,("Error smb_password_check failed\n"));
}
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index 167eb2ed5f3..2b3a48a75bf 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -152,8 +152,8 @@ _my_get_smbpwnam(FILE * fp, char *name, BOOL * valid_old_pwd,
/* NT Entry was valid - even if 'X' or '*', can be overwritten */
*got_valid_nt_entry = True;
if (*p != '*' && *p != 'X') {
- if(gethexpwd(p,smbntpwd))
- pw_buf.smb_nt_passwd = smbntpwd;
+ if (gethexpwd((char *)p,(char *)smbntpwd))
+ pw_buf.smb_nt_passwd = smbntpwd;
}
}
pw_buf.smb_name = user_name;
@@ -167,12 +167,12 @@ _my_get_smbpwnam(FILE * fp, char *name, BOOL * valid_old_pwd,
if (p[32] != ':')
return (False);
- if (!strncasecmp(p, "NO PASSWORD", 11)) {
- pw_buf.smb_passwd = NULL; /* No password */
+ if (!strncasecmp((char *)p, "NO PASSWORD", 11)) {
+ pw_buf.smb_passwd = NULL; /* No password */
} else {
- if(!gethexpwd(p,smbpwd))
- return False;
- pw_buf.smb_passwd = smbpwd;
+ if(!gethexpwd((char *)p,(char *)smbpwd))
+ return False;
+ pw_buf.smb_passwd = smbpwd;
}
pw_buf.smb_name = user_name;
@@ -189,8 +189,8 @@ _my_get_smbpwnam(FILE * fp, char *name, BOOL * valid_old_pwd,
/* NT Entry was valid - even if 'X' or '*', can be overwritten */
*got_valid_nt_entry = True;
if (*p != '*' && *p != 'X') {
- if(gethexpwd(p,smbntpwd))
- pw_buf.smb_nt_passwd = smbntpwd;
+ if (gethexpwd((char *)p,(char *)smbntpwd))
+ pw_buf.smb_nt_passwd = smbntpwd;
}
}
return &pw_buf;