=================================================================== RCS file: /cvs2/dgamelaunch-openbsd/dgamelaunch.c,v retrieving revision 1.5 retrieving revision 1.9 diff -u -p -r1.5 -r1.9 --- dgamelaunch-openbsd/dgamelaunch.c 2021/03/25 21:01:26 1.5 +++ dgamelaunch-openbsd/dgamelaunch.c 2021/04/02 12:19:39 1.9 @@ -2163,14 +2163,20 @@ readfile (int nolock) b = n; /* pw field */ + /* OpenBSD's implementation stores the password in hashed form. + * crypt_checkpass takes care of validating the hashing so we + * don't have to ensure the password field has a valid length */ + while (*b != ':') { users[f_num]->password[(b - n)] = *b; b++; +#if !defined(__OpenBSD__) if ((b - n) >= DGL_PASSWDLEN) { debug_write("passwd field too long"); graceful_exit (102); } +#endif } /* advance to next field */ @@ -2886,7 +2892,7 @@ main (int argc, char** argv) graceful_exit (6); } -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) if ( pledge("stdio rpath wpath cpath fattr flock " "tty proc exec ps", NULL )==-1 ) {