cleanups to make thinsg compile cleanly
authorAndrew Tridgell <tridge@samba.org>
Wed, 29 May 1996 07:47:47 +0000 (07:47 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 29 May 1996 07:47:47 +0000 (07:47 +0000)
(This used to be commit 39fbeb04ae938594c380d97ebe67c012fa0dd51a)

source3/libsmb/smbencrypt.c
source3/passdb/smbpass.c
source3/smbd/password.c
source3/utils/smbpasswd.c

index a0683b5d2829fd83a25910cc07b3353f69138b8b..0221520ce650648046d1e7f608e1f75259cb0605 100644 (file)
@@ -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 */
index 2dec15ffb43fb2c11e8d6b0d82cc693767e12f7e..ca86d95618d3bc7201575306380768456de33473 100644 (file)
@@ -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;
                        }
                }
index fcfe1b4a2ceed66aa2b6c063f3ed82a78508a24a..6031daf5f160eec70572aa15ff0f474b834d114e 100644 (file)
@@ -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"));
     }
index 167eb2ed5f3695458f584caa5a51cae545454c4c..2b3a48a75bf123c5fa48d9239740ab9781f66549 100644 (file)
@@ -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;