8166
|
1 |
--- manager.c-orig 2006-09-19 15:29:52.179060000 -0500
|
|
2 |
+++ manager.c 2006-09-19 15:42:01.749377000 -0500
|
|
3 |
@@ -25,7 +25,7 @@
|
|
4 |
#include <dirent.h>
|
|
5 |
#include <signal.h>
|
|
6 |
#include <unistd.h>
|
|
7 |
-#include <utmp.h>
|
|
8 |
+#include <utmpx.h>
|
|
9 |
|
|
10 |
#include <locale.h>
|
|
11 |
|
|
12 |
@@ -3087,7 +3087,7 @@ static gboolean
|
|
13 |
gvm_local_user (void)
|
|
14 |
{
|
|
15 |
gboolean local = FALSE;
|
|
16 |
- struct utmp *utmp;
|
|
17 |
+ struct utmpx *utmp;
|
|
18 |
const char *user;
|
|
19 |
size_t ulen;
|
|
20 |
|
|
21 |
@@ -3096,12 +3096,12 @@ gvm_local_user (void)
|
|
22 |
|
|
23 |
setutent ();
|
|
24 |
|
|
25 |
- while (!local && (utmp = getutent ())) {
|
|
26 |
+ while (!local && (utmp = getutxent ())) {
|
|
27 |
if (utmp->ut_type != USER_PROCESS || strncmp (utmp->ut_user, user, ulen) != 0)
|
|
28 |
continue;
|
|
29 |
|
|
30 |
/* only accept local X sessions */
|
|
31 |
- local = utmp->ut_line[0] == ':' && utmp->ut_line[1] >= '0' && utmp->ut_line[1] <= '9';
|
|
32 |
+ local = utmp->ut_host[0] == ':' && utmp->ut_host[1] >= '0' && utmp->ut_host[1] <= '9';
|
|
33 |
}
|
|
34 |
|
|
35 |
endutent ();
|