diff options
author | marcus <marcus@FreeBSD.org> | 2007-10-17 12:16:59 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2007-10-17 12:16:59 +0800 |
commit | cee7071d6dc2fdcff29b1b8774de00e5bdb0db85 (patch) | |
tree | 3db9290cac1852f130706f1550b4c98e8b56148c /sysutils/gnome-volume-manager | |
parent | 6529df778f403a0ea6f30d60906725ab8cab32dc (diff) | |
download | freebsd-ports-gnome-cee7071d6dc2fdcff29b1b8774de00e5bdb0db85.tar.gz freebsd-ports-gnome-cee7071d6dc2fdcff29b1b8774de00e5bdb0db85.tar.zst freebsd-ports-gnome-cee7071d6dc2fdcff29b1b8774de00e5bdb0db85.zip |
Fix a dumb bug where we would not be able to detect the local user properly.
This bug was exposed when the integer overflow bug was fixed. This should
prevent g-v-m from terminating on startup.
Diffstat (limited to 'sysutils/gnome-volume-manager')
-rw-r--r-- | sysutils/gnome-volume-manager/Makefile | 2 | ||||
-rw-r--r-- | sysutils/gnome-volume-manager/files/patch-src_manager.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sysutils/gnome-volume-manager/Makefile b/sysutils/gnome-volume-manager/Makefile index 4cefad007494..43fcb70ae3c1 100644 --- a/sysutils/gnome-volume-manager/Makefile +++ b/sysutils/gnome-volume-manager/Makefile @@ -8,7 +8,7 @@ PORTNAME= gnome-volume-manager PORTVERSION= 2.17.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/${PORTVERSION:R} diff --git a/sysutils/gnome-volume-manager/files/patch-src_manager.c b/sysutils/gnome-volume-manager/files/patch-src_manager.c index 6f7256d534fe..13e0cbf7fd9d 100644 --- a/sysutils/gnome-volume-manager/files/patch-src_manager.c +++ b/sysutils/gnome-volume-manager/files/patch-src_manager.c @@ -1,5 +1,5 @@ ---- src/manager.c.orig Tue Nov 7 13:01:17 2006 -+++ src/manager.c Sun Dec 31 15:33:44 2006 +--- src/manager.c.orig 2006-11-07 13:01:17.000000000 -0500 ++++ src/manager.c 2007-10-17 00:14:10.000000000 -0400 @@ -23,9 +23,12 @@ #include <sys/types.h> #include <sys/stat.h> @@ -221,7 +221,7 @@ + for (utmp = &buf[bytes / sizeof(buf[0]) - 1]; !local && utmp >= buf; --utmp) { + if (!utmp->ut_name[0] || strncmp (utmp->ut_name, user, n) != 0) + continue; -+ local = utmp->ut_line[0] == ':' && utmp->ut_line[1] >= '0' && utmp->ut_line[1] <= '9' || !strncmp (utmp->ut_line, "ttyv", 4) ? LOCAL_USER_FOUND : 0; ++ local = utmp->ut_host[0] == ':' && utmp->ut_host[1] >= '0' && utmp->ut_host[1] <= '9' || !strncmp (utmp->ut_line, "ttyv", 4) ? LOCAL_USER_FOUND : 0; + } + } + |