summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authormax <max@FreeBSD.org>1997-01-06 08:51:05 +0000
committermax <max@FreeBSD.org>1997-01-06 08:51:05 +0000
commit0191d68a1c99e3954bc417350743fc8c6f4e9df6 (patch)
tree0ec4b0b367c1e5c5339c3f04ffc824a98ff9bc92 /net
parent800f36c2622e4aecf5ce93109219d81e514515c2 (diff)
downloadFreeBSD-ports-0191d68a1c99e3954bc417350743fc8c6f4e9df6.zip
FreeBSD-ports-0191d68a1c99e3954bc417350743fc8c6f4e9df6.tar.gz
Merge patch-ag, patch-ah into patch-ab as they all change the same file.
Diffstat (limited to 'net')
-rw-r--r--net/gnu-finger/files/patch-ab56
-rw-r--r--net/gnu-finger/files/patch-ag51
2 files changed, 52 insertions, 55 deletions
diff --git a/net/gnu-finger/files/patch-ab b/net/gnu-finger/files/patch-ab
index 6d2ea29..0fb89a3 100644
--- a/net/gnu-finger/files/patch-ab
+++ b/net/gnu-finger/files/patch-ab
@@ -1,6 +1,15 @@
---- lib/os.c.org Sat Jul 6 14:18:18 1996
-+++ lib/os.c Sat Aug 26 23:38:18 1995
-@@ -70,7 +70,11 @@
+--- lib/os.c.orig Fri Oct 23 06:01:10 1992
++++ lib/os.c Mon Jan 6 17:47:01 1997
+@@ -26,6 +26,8 @@
+ #include <sys/acct.h>
+ #include <time.h>
+ #include <packet.h>
++#include <sys/socket.h>
++#include <netdb.h>
+
+ #ifdef HAVE_UTMPX_H
+ #include <utmpx.h>
+@@ -70,8 +72,12 @@
/* Where the utmp file is located. */
#ifndef HAVE_GETUTENT
@@ -8,7 +17,46 @@
+#define UTMP_FILE "/var/run/utmp"
+#else
#define UTMP_FILE "/etc/utmp"
-+#endif
#endif
++#endif
/* A non-null value is the address of the utmp entry which contains the
+ information for the user using the console. */
+@@ -485,6 +491,7 @@
+
+ UTMP **result;
+ int result_size = 0;
++ struct hostent *hp; u_long l;
+
+ #ifndef HAVE_GETUTENT
+ file = open (UTMP_FILE, O_RDONLY);
+@@ -529,6 +536,19 @@
+ continue;
+ #endif /* sun */
+
++#ifdef __FreeBSD__
++ if (UT(entry, ut_host)[0]) {
++ if (isdigit(UT(entry, ut_host)[0]) &&
++ (long)(l = inet_addr(UT(entry, ut_host))) != -1 &&
++ (hp = gethostbyaddr((char *)&l, sizeof(l), AF_INET))) {
++ if (hp->h_name) {
++ strncpy(UT(entry, ut_host), hp->h_name, UT_HOSTSIZE);
++ UT(entry, ut_host)[UT_HOSTSIZE - 1] = '\0';
++ } /* valid hostname */
++ } /* IP addr */
++ } /* UTMP */
++#endif
++
+ for (i = 0; result[i]; i++)
+ {
+ /* If the same person is logged in more than once, we are
+@@ -552,6 +572,9 @@
+ finding the tty location. `v0' is what X window terminals
+ use for the console login window. */
+ if ((strcmp (result[i]->ut_line, "console") == 0) ||
++#ifdef __FreeBSD__
++ (strstr (result[i]->ut_line, "ttyv") != NULL) ||
++#endif
+ (strcmp (result[i]->ut_line, "v0") == 0))
+ {
+ console_user = result[i];
diff --git a/net/gnu-finger/files/patch-ag b/net/gnu-finger/files/patch-ag
deleted file mode 100644
index 173cb80..0000000
--- a/net/gnu-finger/files/patch-ag
+++ /dev/null
@@ -1,51 +0,0 @@
-Patch for utmp ut_host.
-
- GNU finger uses ut_host information in utmp.
-
- From src/usr.bin/login/login.c CVS log, after 2.2 source tree,
- login.c write numerical address to ut_host.
- (1.12 comment of login.c)
-
- So this patch is to translate numerical address to hostname.
-
-Special Thanks to Tung-Hui Hu <hhui@arcfour.com>.
-
---- lib/os.c.orig Mon Dec 30 00:54:57 1996
-+++ lib/os.c Mon Dec 30 10:51:30 1996
-@@ -26,6 +26,8 @@
- #include <sys/acct.h>
- #include <time.h>
- #include <packet.h>
-+#include <sys/socket.h>
-+#include <netdb.h>
-
- #ifdef HAVE_UTMPX_H
- #include <utmpx.h>
-@@ -489,6 +491,7 @@
-
- UTMP **result;
- int result_size = 0;
-+ struct hostent *hp; u_long l;
-
- #ifndef HAVE_GETUTENT
- file = open (UTMP_FILE, O_RDONLY);
-@@ -533,6 +536,19 @@
- continue;
- #endif /* sun */
-
-+#ifdef __FreeBSD__
-+ if (UT(entry, ut_host)[0]) {
-+ if (isdigit(UT(entry, ut_host)[0]) &&
-+ (long)(l = inet_addr(UT(entry, ut_host))) != -1 &&
-+ (hp = gethostbyaddr((char *)&l, sizeof(l), AF_INET))) {
-+ if (hp->h_name) {
-+ strncpy(UT(entry, ut_host), hp->h_name, UT_HOSTSIZE);
-+ UT(entry, ut_host)[UT_HOSTSIZE - 1] = '\0';
-+ } /* valid hostname */
-+ } /* IP addr */
-+ } /* UTMP */
-+#endif
-+
- for (i = 0; result[i]; i++)
- {
- /* If the same person is logged in more than once, we are
OpenPOWER on IntegriCloud