martin      99/07/26 00:21:37

  Modified:    src/os/bs2000 bs2login.c
  Log:
  When BS2000 ufork() fails because of EPERM, there's no use in retrying.
  Bail out.
  
  Revision  Changes    Path
  1.10      +12 -0     apache-1.3/src/os/bs2000/bs2login.c
  
  Index: bs2login.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/os/bs2000/bs2login.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- bs2login.c        1999/01/28 18:27:21     1.9
  +++ bs2login.c        1999/07/26 07:21:36     1.10
  @@ -255,6 +255,7 @@
   pid_t os_fork(const char *user)
   {
       pid_t pid;
  +    char  username[USER_LEN+1];
   
       switch (os_forktype()) {
         case bs2_FORK:
  @@ -267,7 +268,18 @@
        break;
   
         case bs2_UFORK:
  +     ap_cpystrn(username, user, sizeof username);
  +
  +     /* Make user name all upper case - for some versions of ufork() */
  +     ap_str_toupper(username);
  +
        pid = ufork(user);
  +     if (pid == -1 && errno == EPERM) {
  +         ap_log_error(APLOG_MARK, APLOG_EMERG,
  +                      NULL, "ufork: Possible mis-configuration "
  +                      "for user %s - Aborting.", user);
  +         clean_parent_exit(1);
  +     }
        break;
   
         default:
  
  
  

Reply via email to