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

Diff for /dgamelaunch-openbsd/dgamelaunch.c between version 1.3 and 1.5

version 1.3, 2021/03/14 19:25:49 version 1.5, 2021/03/25 21:01:26
Line 1560  changepw (int dowrite)
Line 1560  changepw (int dowrite)
 #if defined(__OpenBSD__)  #if defined(__OpenBSD__)
   me->password = (char *) malloc((_PASSWORD_LEN+1)*sizeof(char));    me->password = (char *) malloc((_PASSWORD_LEN+1)*sizeof(char));
  if ( crypt_newhash(buf, "blowfish,12", me->password, _PASSWORD_LEN) != 0)   if ( crypt_newhash(buf, "blowfish,12", me->password, _PASSWORD_LEN) != 0)
   graceful_exit(1);    graceful_exit(300);
 #else  #else
   me->password = strdup (crypt (buf, buf));    me->password = strdup (crypt (buf, buf));
 #endif  #endif
Line 2865  main (int argc, char** argv)
Line 2865  main (int argc, char** argv)
           graceful_exit (3);            graceful_exit (3);
         }          }
   
   
   
       /* shed privs. this is done immediately after chroot. */        /* shed privs. this is done immediately after chroot. */
       if (setgroups (1, &globalconfig.shed_gid) == -1)        if (setgroups (1, &globalconfig.shed_gid) == -1)
         {          {
Line 2883  main (int argc, char** argv)
Line 2885  main (int argc, char** argv)
           perror ("setuid");            perror ("setuid");
           graceful_exit (6);            graceful_exit (6);
         }          }
   
   #ifdef __OpenBSD__
         if ( pledge("stdio rpath wpath cpath fattr flock "
             "tty proc exec ps", NULL )==-1 )
           {
             perror("pledge");
             graceful_exit (301);
           }
   #endif
   
     }      }
   
   if (globalconfig.locale) {    if (globalconfig.locale) {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

CVSweb