Difference for server/main.c from version 1.61 to 1.62


version 1.61 version 1.62
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_main_c =   * static char *rcsid_main_c =
  *    "$Id: main.c,v 1.61 2002/06/15 07:47:36 mwedel Exp $";   *    "$Id: main.c,v 1.62 2002/06/19 04:33:25 mwedel Exp $";
  */   */
   
 /*  /*
Line 150
 
Line 150
   }    }
 }  }
   
 char *crypt_string(char *str, char *salt) {  /* Really, there is no reason to crypt the passwords  any system.  But easier
 /* Really, there is no reason to use this on any system.  But easier to   * to just leave this enabled for backward compatibility.  Put the
  * just leave this enabled for backward compatibility.   * simple case at top - no encryption - makes it easier to read.
  */   */
 #if !defined(WIN32) && !defined(__FreeBSD__)  char *crypt_string(char *str, char *salt) {
   #if defined(WIN32) || (defined(__FreeBSD__) && !defined(HAVE_LIBDES))
       return(str);
   #else
   static char *c=    static char *c=
     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";      "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
   char s[2];    char s[2];
   
   if(salt==NULL)    if(salt==NULL)
     s[0]= c[RANDOM() % (int)strlen(c)],      s[0]= c[RANDOM() % (int)strlen(c)],
     s[1]= c[RANDOM() % (int)strlen(c)];      s[1]= c[RANDOM() % (int)strlen(c)];
   else    else
     s[0]= salt[0],      s[0]= salt[0],
     s[1]= salt[1];      s[1]= salt[1];
   
 #ifdef HAVE_LIBDES  #ifdef HAVE_LIBDES
   return (char*)des_crypt(str,s);    return (char*)des_crypt(str,s);
 #else  
   return (char*)crypt(str,s);  
 #endif  #endif
 #endif /* win32 */  #endif
   return(str);      /* Default case - just use crypt */
       return (char*)crypt(str,s);
 }  }
   
 int check_password(char *typed,char *crypted) {  int check_password(char *typed,char *crypted) {


Legend:
line(s) removed in v.1.61 
line(s) changed
 line(s) added in v.1.62

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:36