1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-28 05:29:48 +00:00

- Update to 0.6.1

PR:		146238
Submitted by:	Anonymous <swell.k@gmail.com>
Approved by:	timeout
This commit is contained in:
Martin Wilke 2010-06-05 21:02:50 +00:00
parent 43b24b8190
commit 21e8c1ba62
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=255842
3 changed files with 4 additions and 100 deletions

View File

@ -5,8 +5,7 @@
# $FreeBSD$
PORTNAME= jfbterm
PORTVERSION= 0.6.0
PORTREVISION= 2
PORTVERSION= 0.6.1
CATEGORIES= sysutils
MASTER_SITES= http://www.ac.auone-net.jp/~baba/jfbterm/ \
http://chirashi-no-ura.net/files/

View File

@ -1,3 +1,3 @@
MD5 (jfbterm-FreeBSD-0.6.0.tar.gz) = 6b29125e987e11d779093bfe22c16792
SHA256 (jfbterm-FreeBSD-0.6.0.tar.gz) = adad94867d07e4f29020c31144786de9927d97752529b9ff6f7d81d1fc402915
SIZE (jfbterm-FreeBSD-0.6.0.tar.gz) = 203682
MD5 (jfbterm-FreeBSD-0.6.1.tar.gz) = fc5946d2ee0a9dae0d5aa6fc806416c3
SHA256 (jfbterm-FreeBSD-0.6.1.tar.gz) = 8cd44a8adcf3e329fdff762e7395ad1f37bcc23702a655802175d9baf5416026
SIZE (jfbterm-FreeBSD-0.6.1.tar.gz) = 218596

View File

@ -1,95 +0,0 @@
--- term.c.orig 2009-02-07 12:30:17.000000000 -0500
+++ term.c 2010-01-28 13:40:25.000000000 -0500
@@ -59,7 +59,11 @@
#include <termios.h>
#include <time.h>
#include <unistd.h>
+#ifdef HAVE_UTMP_H
#include <utmp.h>
+#else
+#include <utmpx.h>
+#endif
#if defined (__linux__)
#include <sys/vt.h>
@@ -523,6 +527,41 @@ static void writeLoginRecord(void)
pututline(&utmp);
endutent();
privilege_off();
+#elif defined (__FreeBSD__) && (__FreeBSD_version >= 900007)
+ struct utmpx utmp;
+ struct passwd *pw;
+ char *tn;
+
+ assert(initialized);
+
+ bzero(&utmp, sizeof(utmp));
+ pw = getpwuid(privilege_getUID());
+ if (pw == NULL) {
+ warnx("who are you?");
+ return; /* give up */
+ }
+ if (strncmp(self->device, "/dev/pts/", 9) == 0 ||
+ strncmp(self->device, "/dev/tty", 8) == 0) {
+ /* Unix98 style: "/dev/pts/\*" */
+ /* BSD style: "/dev/tty[l-sL-S][0-9a-v]" */
+ tn = self->device + strlen("/dev/");
+ if (strlen(tn) < 5)
+ return; /* bad format */
+ strncpy(utmp.ut_id, tn, sizeof(utmp.ut_id));
+ } else
+ return; /* bad format */
+ utmp.ut_type = DEAD_PROCESS;
+ privilege_on();
+ setutxent();
+ getutxid(&utmp);
+ utmp.ut_type = USER_PROCESS;
+ utmp.ut_pid = getpid();
+ strncpy(utmp.ut_line, tn, sizeof(utmp.ut_line));
+ strncpy(utmp.ut_user, pw->pw_name, sizeof(utmp.ut_user));
+ gettimeofday(&(utmp.ut_tv), NULL);
+ pututxline(&utmp);
+ endutxent();
+ privilege_off();
#elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
struct utmp utmp;
struct passwd *pw;
@@ -600,6 +639,38 @@ static void eraseLoginRecord(void)
pututline(utp);
endutent();
privilege_off();
+#elif defined (__FreeBSD__) && (__FreeBSD_version >= 900007)
+ struct utmpx utmp, *utp;
+ char *tn;
+
+ assert(initialized);
+
+ bzero(&utmp, sizeof(utmp));
+ if (strncmp(self->device, "/dev/pts/", 9) == 0 ||
+ strncmp(self->device, "/dev/tty", 8) == 0) {
+ /* Unix98 style: "/dev/pts/\*" */
+ /* BSD style: "/dev/tty[l-sL-S][0-9a-v]" */
+ tn = self->device + strlen("/dev/");
+ if (strlen(tn) < 5)
+ return; /* bad format */
+ strncpy(utmp.ut_id, tn, sizeof(utmp.ut_id));
+ } else
+ return; /* bad format */
+ utmp.ut_type = USER_PROCESS;
+ privilege_on();
+ setutxent();
+ utp = getutxid(&utmp);
+ if (utp == NULL) {
+ endutxent();
+ privilege_off();
+ return; /* give up */
+ }
+ utp->ut_type = DEAD_PROCESS;
+ bzero(utp->ut_user, sizeof(utmp.ut_user));
+ gettimeofday(&(utp->ut_tv), NULL);
+ pututxline(utp);
+ endutxent();
+ privilege_off();
#elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
struct utmp utmp;
char *tn;