1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

Fix detection of local users that use startx.

Reported by:	pav
This commit is contained in:
Joe Marcus Clarke 2006-12-20 20:41:20 +00:00
parent 97f45b1a15
commit c3a9c69883
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=180293
2 changed files with 6 additions and 3 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= gnome-volume-manager
PORTVERSION= 2.15.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= sysutils gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:R}

View File

@ -1,5 +1,5 @@
--- src/manager.c.orig Mon Jul 31 16:37:36 2006
+++ src/manager.c Fri Sep 15 01:32:32 2006
+++ src/manager.c Wed Dec 20 14:59:45 2006
@@ -23,9 +23,12 @@
#include <sys/types.h>
#include <sys/stat.h>
@ -31,7 +31,7 @@
setutent ();
while (!local && (utmp = getutent ())) {
@@ -3103,7 +3113,28 @@ gvm_local_user (void)
@@ -3103,7 +3113,31 @@ gvm_local_user (void)
}
endutent ();
@ -53,6 +53,9 @@
+ if (!utmp->ut_name[0] || strncmp (utmp->ut_name, user, ulen) != 0)
+ continue;
+ local = utmp->ut_line[0] == ':' && utmp->ut_line[1] >= '0' && utmp->ut_line[1] <= '9';
+ if (!local)
+ /* Handle vty logins */
+ local = strlen(utmp->ut_line) > 4 && strncmp(utmp->ut_line, "ttyv", 4) == 0 && utmp->ut_line[4] >= '0' && utmp->ut_line[4] <= '9';
+ }
+ }
+