ports/122718: Study sysutils/screen to 512 PTYs, and one new useful option

Valentin Nechayev netch at netch.kiev.ua
Sun Apr 13 13:50:01 UTC 2008


>Number:         122718
>Category:       ports
>Synopsis:       Study sysutils/screen to 512 PTYs, and one new useful option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 13 13:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Valentin Nechayev
>Release:        FreeBSD 6.3-RELEASE-p1 i386
>Organization:
Dark side of coredump
>Environment:
System: FreeBSD segfault.kiev.ua 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #0: Tue Apr 1 19:36:38 EEST 2008 root at segfault.kiev.ua:/usr/BSD/obj/usr/BSD/src/sys/sf62 i386

>Description:

This is change request to sysutils/screen to:

1. Know about 512 PTYs, according to last FreeBSD changes.
2. Allow to print host in locked message, which is quite useful in cascaded
screen usage (e.g. screen contains terminal with ssh session to another host
also with screen).

>How-To-Repeat:

>Fix:

Apply the following patch.

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

diff -rNu 0/ports/sysutils/screen/Makefile 1/ports/sysutils/screen/Makefile
--- 0/ports/sysutils/screen/Makefile	2007-11-13 12:16:38.000000000 +0200
+++ 1/ports/sysutils/screen/Makefile	2008-04-13 16:25:13.000000000 +0300
@@ -22,7 +22,8 @@
 		INFO "Build and install info documentation" ON \
 		MAN "Build and install man pages" ON \
 		NETHACK "Enable nethack-style messages" ON \
-		XTERM_256 "Enable support for 256 colour xterm" OFF
+		XTERM_256 "Enable support for 256 colour xterm" OFF \
+		HOSTINLOCKED "Print user at host in locked message" OFF
 
 NO_PACKAGE=	Tends to loop using 100% CPU when used from package - perhaps it hard-codes information about the build host
 
@@ -62,6 +63,10 @@
 EXTRA_PATCHES+=	${FILESDIR}/opt-cjkwidth
 .endif
 
+.if defined(WITH_HOSTINLOCKED)
+EXTRA_PATCHES+= ${FILESDIR}/opt-hostinlocked
+.endif
+
 post-patch:
 	@${RM} ${WRKSRC}/doc/screen.info*
 
diff -rNu 0/ports/sysutils/screen/files/opt-hostinlocked 1/ports/sysutils/screen/files/opt-hostinlocked
--- 0/ports/sysutils/screen/files/opt-hostinlocked	1970-01-01 03:00:00.000000000 +0300
+++ 1/ports/sysutils/screen/files/opt-hostinlocked	2008-04-13 16:24:49.000000000 +0300
@@ -0,0 +1,21 @@
+--- attacher.c	Sun Oct  2 10:29:36 2005
++++ attacher.c	Sun Oct  2 10:30:18 2005
+@@ -809,6 +809,7 @@
+ #else
+   char *pass, mypass[16 + 1], salt[3];
+ #endif
++  extern char HostName[];
+ 
+ #ifndef USE_PAM
+   pass = ppp->pw_passwd;
+@@ -859,8 +860,8 @@
+ 	*cp1 -= 'a' - 'A';
+     }
+ 
+-  sprintf(message, "Screen used by %s <%s>.\nPassword:\007",
+-          fullname, ppp->pw_name);
++  sprintf(message, "Screen used by %s@%s.\nPassword:\007",
++          ppp->pw_name, HostName);
+ 
+   /* loop here to wait for correct password */
+   for (;;)
diff -rNu 0/ports/sysutils/screen/files/patch-ad 1/ports/sysutils/screen/files/patch-ad
--- 0/ports/sysutils/screen/files/patch-ad	2006-05-30 14:55:35.000000000 +0300
+++ 1/ports/sysutils/screen/files/patch-ad	2008-04-13 16:22:45.000000000 +0300
@@ -79,7 +79,7 @@
 +
  cat >>confdefs.h <<_ACEOF
 -#define PTYRANGE0 "$p0"
-+#define PTYRANGE0 "pqrsPQRS"
++#define PTYRANGE0 "pqrsPQRSlmnoLMNO"
  _ACEOF
  
  cat >>confdefs.h <<_ACEOF



More information about the freebsd-ports-bugs mailing list