force the salt to be a maximum of 2 characters long in calls
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Oct 1997 04:04:38 +0000 (04:04 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 15 Oct 1997 04:04:38 +0000 (04:04 +0000)
to crypt()

This might solve some password problems, particulary on HPUX
(This used to be commit 45f4ae4327a8836cad22bbf64f1effba6a6eb7f5)

source3/smbd/password.c

index af9be289c7dc16e61559971e5f4742d771a901b1..1b1bd34bccada1d12b455e60c8241f4405e30667 100644 (file)
@@ -1047,6 +1047,7 @@ BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd)
   /* extract relevant info */
   strcpy(this_user,pass->pw_name);  
   strcpy(this_salt,pass->pw_passwd);
+  this_salt[2] = 0;
   strcpy(this_crypted,pass->pw_passwd);
  
   if (!*this_crypted) {