*** modules/mod_auth.c.orig	Tue May 26 21:24:39 1998
--- modules/mod_auth.c	Thu Jul  2 14:33:59 1998
***************
*** 177,183 ****
    /* Is this the proper behavior when timing out? */
    send_response_async(R_421,"Login Timeout (%d seconds): closing control connection.",
                        TimeoutLogin);
!   schedule(main_exit,0,(void*)LOG_NOTICE,"FTP login timed out, disconnected.",
             (void*)0,NULL);
    remove_timer(TIMER_IDLE,ANY_MODULE);
    remove_timer(TIMER_NOXFER,ANY_MODULE);
--- 177,183 ----
    /* Is this the proper behavior when timing out? */
    send_response_async(R_421,"Login Timeout (%d seconds): closing control connection.",
                        TimeoutLogin);
!   schedule(main_exit,0,(void*)LOG_INFO,"FTP login timed out, disconnected.",
             (void*)0,NULL);
    remove_timer(TIMER_IDLE,ANY_MODULE);
    remove_timer(TIMER_NOXFER,ANY_MODULE);
***************
*** 763,772 ****
    }
  
    if(c)
!     log_auth(LOG_NOTICE,"ANONYMOUS FTP login as '%s' from %s [%s]",
      origuser,session.c->remote_name,inet_ntoa(*session.c->remote_ipaddr));
    else
!     log_auth(LOG_NOTICE,"FTP login as '%s' from %s [%s]",
      origuser,session.c->remote_name,inet_ntoa(*session.c->remote_ipaddr));
  
    session.user = pstrdup(permanent_pool,auth_map_uid(pw->pw_uid));
--- 763,772 ----
    }
  
    if(c)
!     log_auth(LOG_INFO,"ANONYMOUS FTP login as '%s' from %s [%s]",
      origuser,session.c->remote_name,inet_ntoa(*session.c->remote_ipaddr));
    else
!     log_auth(LOG_INFO,"FTP login as '%s' from %s [%s]",
      origuser,session.c->remote_name,inet_ntoa(*session.c->remote_ipaddr));
  
    session.user = pstrdup(permanent_pool,auth_map_uid(pw->pw_uid));
***************
*** 869,881 ****
      end_login(1);
    }
  
!   if(setregid(pw->pw_gid,pw->pw_gid) == -1 ||
!      setreuid(pw->pw_uid,pw->pw_uid) == -1) {
  
      PRIVS_RELINQUISH
  
      send_response(R_530,"Unable to set user privileges.");
!     log_pri(LOG_ERR,"%s setregid() or setreuid(): %s",
              session.user,strerror(errno));
  
      end_login(1);
--- 869,881 ----
      end_login(1);
    }
  
!   if(setgid(pw->pw_gid) == -1 ||
!      setuid(pw->pw_uid) == -1) {
  
      PRIVS_RELINQUISH
  
      send_response(R_530,"Unable to set user privileges.");
!     log_pri(LOG_ERR,"%s setgid() or setuid(): %s",
              session.user,strerror(errno));
  
      end_login(1);
***************
*** 987,993 ****
        send_response(R_530,"%s",
                      sreplace(cmd->tmp_pool,maxstr,"%m",maxn,NULL));
  
!       log_auth(LOG_NOTICE,"connection refused (max clients %d)",
                 max);
        end_login(0);
      }
--- 987,993 ----
        send_response(R_530,"%s",
                      sreplace(cmd->tmp_pool,maxstr,"%m",maxn,NULL));
  
!       log_auth(LOG_INFO,"connection refused (max clients %d)",
                 max);
        end_login(0);
      }
