Skip site navigation (1)Skip section navigation (2)
Date:      10 Mar 2000 23:49:44 +1100
From:      john@nlc.net.au
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/17300: New version of radiusd-cistron port
Message-ID:  <20000310124944.51259.qmail@grunt.nlc.net.au>

next in thread | raw e-mail | index | archive | help

>Number:         17300
>Category:       ports
>Synopsis:       New version of radiusd-cistron port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 10 04:50:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     John Saunders
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
NORTHLINK COMMUNICATIONS
>Environment:

	N/A

>Description:

	Version 1.6.2 of radiusd-cistron is now available. Also included is
	a patch to fix a couple of formatting bugs in radwho. And while I
	was there, allow a wider display output when using large windows.

>How-To-Repeat:

	N/A

>Fix:

Apply the following patch from the /usr/ports/net directory.

diff -urN radiusd-cistron.orig/Makefile radiusd-cistron/Makefile
--- radiusd-cistron.orig/Makefile	Tue Nov  2 16:27:35 1999
+++ radiusd-cistron/Makefile	Fri Mar 10 20:27:35 2000
@@ -1,13 +1,13 @@
 # New ports collection makefile for:	radiusd-cistron
-# Version required:	cistron radiusd 1.6.1 (stable)
+# Version required:	cistron radiusd 1.6.2 (stable)
 # Date created:		15 Jan 1999
 # Whom:			john@nlc.net.au
 #
 # $FreeBSD: ports/net/radiusd-cistron/Makefile,v 1.9 1999/11/02 05:27:35 billf Exp $
 #
 
-DISTNAME=	radiusd-cistron-1.6.1-stable
-PKGNAME=	radiusd-cistron-1.6.1
+DISTNAME=	radiusd-cistron-1.6.2-stable
+PKGNAME=	radiusd-cistron-1.6.2
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.cistron.nl/pub/people/miquels/radius/
 
diff -urN radiusd-cistron.orig/files/md5 radiusd-cistron/files/md5
--- radiusd-cistron.orig/files/md5	Tue Nov  2 16:27:36 1999
+++ radiusd-cistron/files/md5	Fri Mar 10 20:28:51 2000
@@ -1 +1 @@
-MD5 (radiusd-cistron-1.6.1-stable.tar.gz) = 6723d5eb24ac80f9beb457e7aa1c343f
+MD5 (radiusd-cistron-1.6.2-stable.tar.gz) = d535fc95b7044b47f4f276d8d7ef6b6b
diff -urN radiusd-cistron.orig/patches/patch-ad radiusd-cistron/patches/patch-ad
--- radiusd-cistron.orig/patches/patch-ad	Thu Jan  1 10:00:00 1970
+++ radiusd-cistron/patches/patch-ad	Fri Mar 10 23:41:12 2000
@@ -0,0 +1,128 @@
+--- src/radwho.c.orig	Wed Oct  6 23:13:29 1999
++++ src/radwho.c	Fri Mar 10 23:06:27 2000
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <sys/utsname.h>
++#include <sys/ioctl.h>
+ #include <time.h>
+ #include <ctype.h>
+ #include <netinet/in.h>
+@@ -34,18 +35,20 @@
+  *	Header above output and format.
+  */
+ char *hdr1 = 
+-"Login      Name              What  TTY  When      From      Location";
+-char *ufmt1 = "%-10.10s %-17.17s %-5.5s %-4.4s %-9.9s %-9.9s %-.16s%s";
++"Login            Name              What  TTY  When      From      Location";
++char *ufmt1  = "%-16.16s %-17.17s %-5.5s %-4.4s %-9.9s %-9.9s %-.*s%s";
+ char *ufmt1r = "%s,%s,%s,%s,%s,%s,%s%s";
+-char *rfmt1 = "%-10.10s %-17.17s %-5.5s S%-3d %-9.9s %-9.9s %-.19s%s";
++char *rfmt1  = "%-16.16s %-17.17s %-5.5s S%-3d %-9.9s %-9.9s %-.*s%s";
+ char *rfmt1r = "%s,%s,%s,S%d,%s,%s,%s%s";
++#define FMT1_HOST_SIZE	13
+ 
+ char *hdr2 = 
+-"Login      Port    What      When          From       Location";
+-char *ufmt2 = "%-10.10s %-7.7d %-9.9s %-13.13s %-10.10s %-.16s%s";
++"Login            Port    What      When          From       Location";
++char *ufmt2  = "%-16.16s %-7.7s %-9.9s %-13.13s %-10.10s %-.*s%s";
+ char *ufmt2r = "%s,%d,%s,%s,%s,%s%s";
+-char *rfmt2 = "%-10.10s S%-5d  %-9.9s %-13.13s %-10.10s %-.28s%s";
++char *rfmt2  = "%-16.16s S%-6d %-9.9s %-13.13s %-10.10s %-.*s%s";
+ char *rfmt2r = "%s,S%d,%s,%s,%s,%s%s";
++#define FMT2_HOST_SIZE	19
+ 
+ char *eol = "\n";
+ NAS *naslist;
+@@ -301,7 +304,8 @@
+ 		return tmp;
+ 	}
+ 	if (strncmp(tty, "cu", 2) == 0) {
+-		return tmp + 2;
++		sprintf(tmp, "%.15s", tty + 2);
++		return tmp;
+ 	}
+ 	return "??";
+ }
+@@ -363,6 +367,8 @@
+  */
+ int main(int argc, char **argv)
+ {
++	struct winsize	ws;
++	int extra_width = 0;
+ 	FILE *fp;
+ 	struct radutmp rt;
+ 	struct utmp ut;
+@@ -378,6 +384,11 @@
+ 	char *p, *q;
+ 	int c;
+ 
++	ioctl(0, TIOCGWINSZ, &ws);
++	if (ws.ws_col >= 80) {
++		extra_width = ws.ws_col - 80;
++	}
++
+ 	while((c = getopt(argc, argv, "flhnsipcr")) != EOF) switch(c) {
+ 		case 'f':
+ 			fingerd++;
+@@ -465,14 +476,17 @@
+ 		while(fread(&ut, sizeof(ut), 1, fp) == 1) {
+ #ifdef USER_PROCESS
+ 			if (ut.ut_user[0] && ut.ut_line[0] &&
+-				ut.ut_type == USER_PROCESS) {
++				ut.ut_type == USER_PROCESS)
+ #else
+-			if (ut.ut_user[0] && ut.ut_line[0]) {
++			if (ut.ut_user[0] && ut.ut_line[0])
+ #endif
+-			   if (showname)
++							    {
++			    strncpy(inbuf, ut.ut_name, UT_NAMESIZE);
++			    inbuf[UT_NAMESIZE] = '\0';
++			    if (showname)
+ 				printf((rawoutput == 0? ufmt1: ufmt1r),
+-					ut.ut_name,
+-					fullname(ut.ut_name),
++					inbuf,
++					fullname(inbuf),
+ 					"shell",
+ 					ttyshort(ut.ut_line),
+ #ifdef __svr4__
+@@ -481,10 +495,11 @@
+ 					dotime(ut.ut_time),
+ #endif
+ 					ut.ut_host,
++					FMT1_HOST_SIZE + extra_width,
+ 					myname, eol);
+ 			    else
+ 				printf((rawoutput==0? ufmt2:ufmt2r),
+-					ut.ut_name,
++					inbuf,
+ 					ttyshort(ut.ut_line),
+ 					"shell",
+ #ifdef __svr4__
+@@ -493,6 +508,7 @@
+ 					dotime(ut.ut_time),
+ #endif
+ 					ut.ut_host,
++					FMT2_HOST_SIZE + extra_width,
+ 					myname, eol);
+ 			}
+ 		}
+@@ -530,6 +546,7 @@
+ 				rt.nas_port,
+ 				dotime(rt.time),
+ 				nasname(ntohl(rt.nas_address)),
++				FMT1_HOST_SIZE + extra_width,
+ 				hostname(rt.framed_address), eol);
+ 			else
+ 			    printf((rawoutput == 0? rfmt2: rfmt2r),
+@@ -538,6 +555,7 @@
+ 				proto(rt.proto, rt.porttype),
+ 				dotime(rt.time),
+ 				nasname(ntohl(rt.nas_address)),
++				FMT2_HOST_SIZE + extra_width,
+ 				hostname(rt.framed_address), eol);
+ 		}
+ 	}


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000310124944.51259.qmail>