]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/auth.c
make it compile under sunos
[ppp.git] / pppd / auth.c
index 2d1256b68e8d6ac1d93b134c8562cdd4323e6686..778397d7b02df33237c7e159f68a7378ad33b9e6 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: auth.c,v 1.48 1999/03/30 06:02:21 paulus Exp $";
+static char rcsid[] = "$Id: auth.c,v 1.50 1999/04/01 07:08:47 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -623,7 +623,7 @@ check_idle(arg)
     itime = MIN(idle.xmit_idle, idle.recv_idle);
     if (itime >= idle_time_limit) {
        /* link is idle: shut it down. */
-       info("Terminating connection due to lack of activity.");
+       notice("Terminating connection due to lack of activity.");
        lcp_close(0, "Link inactive");
     } else {
        TIMEOUT(check_idle, NULL, idle_time_limit - itime);
@@ -891,6 +891,7 @@ static int PAM_conv (int num_msg, const struct pam_message **msg,
     *resp = reply;     
     return PAM_SUCCESS;
 }
+
 static struct pam_conv PAM_conversation = {
     &PAM_conv,
     NULL
@@ -921,7 +922,8 @@ plogin(user, passwd, msg, msglen)
 
     pam_error = pam_start ("ppp", user, &PAM_conversation, &pamh);
     if (pam_error != PAM_SUCCESS) {
-        *msg = (char *) pam_strerror (pamh, pam_error);  
+        *msg = (char *) pam_strerror (pamh, pam_error);
+       reopen_log();
        return UPAP_AUTHNAK;
     }
     /*
@@ -944,9 +946,11 @@ plogin(user, passwd, msg, msglen)
     }
 
     *msg = (char *) pam_strerror (pamh, pam_error);
+
     /*
      * Clean up the mess
      */
+    reopen_log();      /* apparently the PAM stuff does closelog() */
     PAM_username = NULL;
     PAM_password = NULL;
     if (pam_error != PAM_SUCCESS)
@@ -1039,6 +1043,8 @@ plogout()
        pam_end (pamh, pam_error);
        pamh = NULL;
     }
+    /* Apparently the pam stuff does closelog(). */
+    reopen_log();
 #else /* ! USE_PAM */   
     char *tty;