martin      98/12/23 03:17:21

  Modified:    src/os/bs2000 bs2login.c
  Log:
  Use regular fork() when calling user is not root.
  
  Revision  Changes    Path
  1.7       +10 -1     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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- bs2login.c        1998/10/28 19:26:25     1.6
  +++ bs2login.c        1998/12/23 11:17:21     1.7
  @@ -194,9 +194,18 @@
   {
       struct utsname os_version;
   
  +    /*
  +     * When we run as a normal user (and bypass setuid() and _rini()),
  +     * we use the regular fork().
  +     */
  +    if (getuid() != 0) {
  +     return fork();
  +    }
  +
       if (uname(&os_version) >= 0)
       {
  -     /* Old versions (before XPG4 SPEC1170) don't work with Apache
  +     /*
  +      * Old versions (before XPG4 SPEC1170) don't work with Apache
         * and they require a fork(), not a _rfork()
         */
        if (strcmp(os_version.release, "01.0A") == 0 ||
  
  
  

Reply via email to