summaryrefslogtreecommitdiff
path: root/core/shadow/write-utmp-wtmp-entries.patch
blob: b4272ca6178f5681e787d10465dd0b6611d6604c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Index: upstream/trunk/src/login.c
===================================================================
--- a/src/login.c	(revision 3437)
+++ b/src/login.c	(revision 3438)
@@ -126,10 +126,12 @@
 static void setup_tty (void);
 static void process_flags (int argc, char *const *argv);
 static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *user);
+#ifndef USE_PAM
 static void update_utmp (const char *user,
                          const char *tty,
                          const char *host,
                          /*@null@*/const struct utmp *utent);
+#endif				/* ! USE_PAM */
 
 #ifndef USE_PAM
 static struct faillog faillog;
@@ -471,6 +473,7 @@
 	return failent_user;
 }
 
+#ifndef USE_PAM
 /*
  * update_utmp - Update or create an utmp entry in utmp, wtmp, utmpw, and
  *               wtmpx
@@ -496,6 +499,7 @@
 	free (utx);
 #endif				/* USE_UTMPX */
 }
+#endif				/* ! USE_PAM */
 
 /*
  * login - create a new login session for a user
@@ -1208,11 +1212,13 @@
 		}
 	}
 
+#ifndef USE_PAM
 	/*
 	 * The utmp entry needs to be updated to indicate the new status
 	 * of the session, the new PID and SID.
 	 */
 	update_utmp (username, tty, hostname, utent);
+#endif				/* ! USE_PAM */
 
 	/* The pwd and spwd entries for the user have been copied.
 	 *