[BACK]Return to dgamelaunch.c CVS log [TXT][DIR] Up to [contributed] / dgamelaunch-openbsd

Diff for /dgamelaunch-openbsd/dgamelaunch.c between version 1.1 and 1.2

version 1.1, 2021/03/09 14:36:01 version 1.2, 2021/03/09 14:48:42
Line 70 
Line 70 
 # include <libutil.h>  # include <libutil.h>
 #elif defined(__NetBSD__)  #elif defined(__NetBSD__)
 # include <util.h>  # include <util.h>
   #elif defined(__OpenBSD__)
   # include <unistd.h>
 #elif defined(__APPLE__)  #elif defined(__APPLE__)
 # include <unistd.h>  # include <unistd.h>
 #else  #else
Line 1554  changepw (int dowrite)
Line 1556  changepw (int dowrite)
     }      }
   
   free(me->password);    free(me->password);
   #if defined(__OpenBSD__)
     me->password = (char *) malloc((_PASSWORD_LEN+1)*sizeof(char));
    if ( crypt_newhash(buf, "blowfish,12", me->password, _PASSWORD_LEN) != 0)
     graceful_exit(1);
   #else
   me->password = strdup (crypt (buf, buf));    me->password = strdup (crypt (buf, buf));
   #endif
   
   if (dowrite)    if (dowrite)
     writefile (0);      writefile (0);
Line 2051  newuser ()
Line 2059  newuser ()
 int  int
 passwordgood (char *cpw)  passwordgood (char *cpw)
 {  {
   #if defined(__OpenBSD__)
     if ( crypt_checkpass(cpw, me->password) == 0)
         return 1;
     return 0;
   #else
   char *crypted;    char *crypted;
   assert (me != NULL);    assert (me != NULL);
   
Line 2063  passwordgood (char *cpw)
Line 2076  passwordgood (char *cpw)
     return 1;      return 1;
   
   return 0;    return 0;
   #endif
 }  }
   
 /* ************************************************************* */  /* ************************************************************* */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb