Fix some compile warnings and errors in the !USE_PAM case.
authorPaul Mackerras <paulus@samba.org>
Wed, 30 Jan 2008 05:24:04 +0000 (05:24 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 30 Jan 2008 05:24:04 +0000 (05:24 +0000)
pppd/session.c

index 05dcb769994190879741a83dca51fe952113ad6d..f9f8fc011b1b27b3098a80cec3364dfa9f2bc910 100644 (file)
 #include <string.h>
 #include <pwd.h>
 #include <crypt.h>
+#include <shadow.h>
+#include <time.h>
+#include <utmp.h>
+#include <fcntl.h>
+#include <unistd.h>
 #include "pppd.h"
 #include "session.h"
 
@@ -164,8 +169,8 @@ session_start(flags, user, passwd, ttyName, msg)
     const char *ttyName;
     char **msg;
 {
-    bool ok = 1;
 #ifdef USE_PAM
+    bool ok = 1;
     const char *usr;
     int pam_error;
     bool try_session = 0;