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
48
49
50
51
52
53
54
55
56
57
58
59
60
|
Index: lightdm-1.10.3/src/session-child.c
===================================================================
--- lightdm-1.10.3.orig/src/session-child.c
+++ lightdm-1.10.3/src/session-child.c
@@ -13,7 +13,6 @@
#include <grp.h>
#include <glib.h>
#include <security/pam_appl.h>
-#include <utmp.h>
#include <utmpx.h>
#include <sys/mman.h>
@@ -199,9 +198,9 @@ read_xauth (void)
/* GNU provides this but we can't rely on that so let's make our own version */
static void
-updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
+lightdm_updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
{
- struct utmp u;
+ struct utmpx u;
memset (&u, 0, sizeof (u));
u.ut_type = ut->ut_type;
@@ -217,7 +216,7 @@ updwtmpx (const gchar *wtmp_file, struct
u.ut_tv.tv_sec = ut->ut_tv.tv_sec;
u.ut_tv.tv_usec = ut->ut_tv.tv_usec;
- updwtmp (wtmp_file, &u);
+ updwtmpx (wtmp_file, &u);
}
int
@@ -385,7 +384,7 @@ session_child_run (int argc, char **argv
ut.ut_tv.tv_sec = tv.tv_sec;
ut.ut_tv.tv_usec = tv.tv_usec;
- updwtmpx ("/var/log/btmp", &ut);
+ lightdm_updwtmpx ("/var/log/btmp", &ut);
}
/* Check account is valid */
@@ -703,7 +702,7 @@ session_child_run (int argc, char **argv
if (!pututxline (&ut))
g_printerr ("Failed to write utmpx: %s\n", strerror (errno));
endutxent ();
- updwtmpx ("/var/log/wtmp", &ut);
+ lightdm_updwtmpx ("/var/log/wtmp", &ut);
}
waitpid (child_pid, &return_code, 0);
@@ -739,7 +738,7 @@ session_child_run (int argc, char **argv
if (!pututxline (&ut))
g_printerr ("Failed to write utmpx: %s\n", strerror (errno));
endutxent ();
- updwtmpx ("/var/log/wtmp", &ut);
+ lightdm_updwtmpx ("/var/log/wtmp", &ut);
}
}
|