summaryrefslogtreecommitdiff
path: root/sysutils/screen49/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/screen49/files')
-rw-r--r--sysutils/screen49/files/patch-attacher.c93
-rw-r--r--sysutils/screen49/files/patch-configure.ac75
-rw-r--r--sysutils/screen49/files/patch-doc__Makefile.in34
-rw-r--r--sysutils/screen49/files/patch-doc_screen.111
-rw-r--r--sysutils/screen49/files/patch-extern.h8
-rw-r--r--sysutils/screen49/files/patch-misc.c31
-rw-r--r--sysutils/screen49/files/patch-os.h33
-rw-r--r--sysutils/screen49/files/patch-osdef.h.in19
-rw-r--r--sysutils/screen49/files/patch-resize.c20
-rw-r--r--sysutils/screen49/files/patch-screen.c120
-rw-r--r--sysutils/screen49/files/patch-socket.c97
-rw-r--r--sysutils/screen49/files/patch-termcap.c15
-rw-r--r--sysutils/screen49/files/patch-terminfo__checktc.c18
-rw-r--r--sysutils/screen49/files/patch-utmp.c156
-rw-r--r--sysutils/screen49/files/screenrc.sample10
15 files changed, 0 insertions, 740 deletions
diff --git a/sysutils/screen49/files/patch-attacher.c b/sysutils/screen49/files/patch-attacher.c
deleted file mode 100644
index c5f670bb6ceb..000000000000
--- a/sysutils/screen49/files/patch-attacher.c
+++ /dev/null
@@ -1,93 +0,0 @@
---- attacher.c.orig 2023-08-16 00:29:26 UTC
-+++ attacher.c
-@@ -73,7 +73,6 @@ extern int multiattach, multi_uid, own_uid;
- #ifdef MULTIUSER
- extern char *multi;
- extern int multiattach, multi_uid, own_uid;
--extern int tty_mode, tty_oldmode;
- # ifndef USE_SETEUID
- static int multipipe[2];
- # endif
-@@ -160,9 +159,6 @@ int how;
-
- if (pipe(multipipe))
- Panic(errno, "pipe");
-- if (chmod(attach_tty, 0666))
-- Panic(errno, "chmod %s", attach_tty);
-- tty_oldmode = tty_mode;
- eff_uid = -1; /* make UserContext fork */
- real_uid = multi_uid;
- if ((ret = UserContext()) <= 0)
-@@ -174,11 +170,6 @@ int how;
- Panic(errno, "UserContext");
- close(multipipe[1]);
- read(multipipe[0], &dummy, 1);
-- if (tty_oldmode >= 0)
-- {
-- chmod(attach_tty, tty_oldmode);
-- tty_oldmode = -1;
-- }
- ret = UserStatus();
- #ifdef LOCK
- if (ret == SIG_LOCK)
-@@ -224,9 +215,6 @@ int how;
- xseteuid(multi_uid);
- xseteuid(own_uid);
- #endif
-- if (chmod(attach_tty, 0666))
-- Panic(errno, "chmod %s", attach_tty);
-- tty_oldmode = tty_mode;
- }
- # endif /* USE_SETEUID */
- #endif /* MULTIUSER */
-@@ -423,13 +411,6 @@ int how;
- ContinuePlease = 0;
- # ifndef USE_SETEUID
- close(multipipe[1]);
--# else
-- xseteuid(own_uid);
-- if (tty_oldmode >= 0)
-- if (chmod(attach_tty, tty_oldmode))
-- Panic(errno, "chmod %s", attach_tty);
-- tty_oldmode = -1;
-- xseteuid(real_uid);
- # endif
- }
- #endif
-@@ -505,14 +486,6 @@ AttacherFinit SIGDEFARG
- close(s);
- }
- }
--#ifdef MULTIUSER
-- if (tty_oldmode >= 0)
-- {
-- if (setuid(own_uid))
-- Panic(errno, "setuid");
-- chmod(attach_tty, tty_oldmode);
-- }
--#endif
- exit(0);
- SIGRETURN;
- }
-@@ -732,7 +705,7 @@ LockTerminal()
- printf("\n");
-
- prg = getenv("LOCKPRG");
-- if (prg && strcmp(prg, "builtin") && !access(prg, X_OK))
-+ if (prg && (strcmp(prg, "builtin") || strcmp(prg,"builtin-passwd")) && !access(prg, X_OK))
- {
- signal(SIGCHLD, SIG_DFL);
- debug1("lockterminal: '%s' seems executable, execl it!\n", prg);
-@@ -751,7 +724,11 @@ LockTerminal()
- Panic(errno, "setuid");
- #endif
- closeallfiles(0); /* important: /etc/shadow may be open */
-- execl(prg, "SCREEN-LOCK", NULL);
-+ if (strcmp(prg,"builtin-passwd"))
-+ /* use system passsword for lock */
-+ execl(prg, "SCREEN-LOCK", "-p", "-n", NULL);
-+ else
-+ execl(prg, "SCREEN-LOCK", NULL);
- exit(errno);
- }
- if (pid == -1)
diff --git a/sysutils/screen49/files/patch-configure.ac b/sysutils/screen49/files/patch-configure.ac
deleted file mode 100644
index 1fc7eb310d6a..000000000000
--- a/sysutils/screen49/files/patch-configure.ac
+++ /dev/null
@@ -1,75 +0,0 @@
---- configure.ac.orig 2023-08-16 00:29:26 UTC
-+++ configure.ac
-@@ -669,7 +669,7 @@ olibs="$LIBS"
- tgetent((char *)0, (char *)0);
- ],,
- olibs="$LIBS"
--LIBS="-lcurses $olibs"
-+LIBS="-lcurses $olibs"; CC="$CC -I/usr/local/include"
- AC_CHECKING(libcurses)
- AC_TRY_LINK([
- #include <curses.h>
-@@ -756,19 +756,6 @@ fi
- fi
- fi
-
--if test "$cross_compiling" = no ; then
--AC_CHECKING(for SVR4 ptys)
--sysvr4ptys=
--if test -c /dev/ptmx ; then
--AC_TRY_LINK([
-- #include <stdlib.h>
--], [
-- ptsname(0);grantpt(0);unlockpt(0);
--],[AC_DEFINE(HAVE_SVR4_PTYS)
--sysvr4ptys=1])
--fi
--fi
--
- AC_CHECK_FUNCS(getpt)
-
- dnl check for openpty()
-@@ -900,11 +887,11 @@ dnl
- dnl
- dnl **** utmp handling ****
- dnl
--AC_CHECKING(getutent)
-+AC_CHECKING(getutxent)
- AC_TRY_LINK([
- #include <time.h> /* to get time_t on SCO */
- #include <sys/types.h>
--#if defined(SVR4) && !defined(DGUX)
-+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
- #include <utmpx.h>
- #define utmp utmpx
- #else
-@@ -917,11 +904,11 @@ LIBS="$LIBS -lgen"
- [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
- olibs="$LIBS"
- LIBS="$LIBS -lgen"
--AC_CHECKING(getutent with -lgen)
-+AC_CHECKING(getutxent with -lgen)
- AC_TRY_LINK([
- #include <time.h>
- #include <sys/types.h>
--#if defined(SVR4) && !defined(DGUX)
-+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
- #include <utmpx.h>
- #define utmp utmpx
- #else
-@@ -931,13 +918,13 @@ AC_TRY_LINK([
- #define pututline _pututline
- #endif
- ],
--[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
-+[int x = DEAD_PROCESS; pututxline((struct utmp *)0); getutxent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
- )
- AC_CHECKING(ut_host)
- AC_TRY_COMPILE([
- #include <time.h>
- #include <sys/types.h>
--#if defined(SVR4) && !defined(DGUX)
-+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
- #include <utmpx.h>
- #define utmp utmpx
- #else
diff --git a/sysutils/screen49/files/patch-doc__Makefile.in b/sysutils/screen49/files/patch-doc__Makefile.in
deleted file mode 100644
index c90450268d09..000000000000
--- a/sysutils/screen49/files/patch-doc__Makefile.in
+++ /dev/null
@@ -1,34 +0,0 @@
---- doc/Makefile.in.orig 2023-08-16 00:29:26 UTC
-+++ doc/Makefile.in
-@@ -31,7 +31,10 @@ install: installdirs
- $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info
-
- install: installdirs
-+ifeq (${WITH_MAN},1)
- $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1
-+endif
-+ifeq (${WITH_INFO},1)
- -$(MAKE) screen.info
- -if test -f screen.info; then d=.; else d=$(srcdir); fi; \
- if test -f $$d/screen.info; then \
-@@ -40,13 +43,19 @@ install: installdirs
- install-info --info-dir=$(DESTDIR)$(infodir) $$d/screen.info; \
- else true; fi; \
- fi
-+endif
-
- uninstall:
- rm -f $(DESTDIR)$(mandir)/man1/screen.1
- rm -f $(DESTDIR)$(infodir)/screen.info*
-
- installdirs:
-- $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(infodir)
-+ifeq (${WITH_MAN},1)
-+ $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1
-+endif
-+ifeq (${WITH_INFO},1)
-+ $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(infodir)
-+endif
-
- mostlyclean:
- -rm -f *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.tp *.vr
diff --git a/sysutils/screen49/files/patch-doc_screen.1 b/sysutils/screen49/files/patch-doc_screen.1
deleted file mode 100644
index 59077d7be443..000000000000
--- a/sysutils/screen49/files/patch-doc_screen.1
+++ /dev/null
@@ -1,11 +0,0 @@
---- doc/screen.1.orig 2023-08-15 11:01:59 UTC
-+++ doc/screen.1
-@@ -241,7 +241,7 @@
- .IR screen ,
- but prints a list of
- .I pid.tty.host
--strings identifying your
-+strings and creation timestamps identifying your
- .I screen
- sessions.
- Sessions marked `detached' can be resumed with \*Qscreen \-r\*U. Those marked
diff --git a/sysutils/screen49/files/patch-extern.h b/sysutils/screen49/files/patch-extern.h
deleted file mode 100644
index 99e9063cdd0f..000000000000
--- a/sysutils/screen49/files/patch-extern.h
+++ /dev/null
@@ -1,8 +0,0 @@
---- extern.h.orig 2023-08-15 08:44:47 UTC
-+++ extern.h
-@@ -512,3 +512,5 @@
- /* layout.c */
- extern void RemoveLayout __P((struct layout *));
- extern int LayoutDumpCanvas __P((struct canvas *, char *));
-+
-+extern time_t SessionCreationTime __P((const char *));
diff --git a/sysutils/screen49/files/patch-misc.c b/sysutils/screen49/files/patch-misc.c
deleted file mode 100644
index 6ea949fbf7a4..000000000000
--- a/sysutils/screen49/files/patch-misc.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- misc.c.orig 2023-08-16 00:29:26 UTC
-+++ misc.c
-@@ -28,8 +28,10 @@
-
- #include <poll.h>
- #include <sys/types.h>
-+#include <sys/user.h>
- #include <sys/stat.h> /* mkdir() declaration */
- #include <signal.h>
-+#include <libutil.h>
-
- #include "config.h"
- #include "screen.h"
-@@ -720,3 +722,17 @@ xvsnprintf(char *s, int n, char *fmt, xva_list stack)
- }
-
- #endif
-+
-+time_t
-+SessionCreationTime(fifo)
-+const char *fifo;
-+{
-+ int pid = atoi(fifo);
-+ if (pid <= 0) return 0;
-+
-+ struct kinfo_proc * kip = kinfo_getproc(pid);
-+ if (kip == 0) return 0;
-+ time_t start = kip->ki_start.tv_sec;
-+ free (kip);
-+ return start;
-+}
diff --git a/sysutils/screen49/files/patch-os.h b/sysutils/screen49/files/patch-os.h
deleted file mode 100644
index ca0237af91ac..000000000000
--- a/sysutils/screen49/files/patch-os.h
+++ /dev/null
@@ -1,33 +0,0 @@
---- os.h.orig 2023-08-16 00:29:26 UTC
-+++ os.h
-@@ -250,9 +250,11 @@ extern int errno;
- #endif
-
- #if defined(UTMPOK) || defined(BUGGYGETLOGIN)
--# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
-+# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) || defined(__FreeBSD_version)
- # include <utmpx.h>
--# define UTMPFILE UTMPX_FILE
-+# ifdef UTMPX_FILE /* GNU extension */
-+# define UTMPFILE UTMPX_FILE
-+# endif
- # define utmp utmpx
- # define getutent getutxent
- # define getutid getutxid
-@@ -507,7 +509,7 @@ typedef struct fd_set { int fds_bits[1]; } fd_set;
- */
-
- #ifndef TERMCAP_BUFSIZE
--# define TERMCAP_BUFSIZE 1023
-+# define TERMCAP_BUFSIZE 1024
- #endif
-
- #ifndef MAXPATHLEN
-@@ -524,6 +526,6 @@ typedef struct fd_set { int fds_bits[1]; } fd_set;
- /* Changing those you won't be able to attach to your old sessions
- * when changing those values in official tree don't forget to bump
- * MSG_VERSION */
--#define MAXTERMLEN 32
-+#define MAXTERMLEN 63
- #define MAXLOGINLEN 256
-
diff --git a/sysutils/screen49/files/patch-osdef.h.in b/sysutils/screen49/files/patch-osdef.h.in
deleted file mode 100644
index c8249fc3d3bc..000000000000
--- a/sysutils/screen49/files/patch-osdef.h.in
+++ /dev/null
@@ -1,19 +0,0 @@
---- osdef.h.in.orig 2023-08-16 00:29:26 UTC
-+++ osdef.h.in
-@@ -28,6 +28,8 @@
- ****************************************************************
- */
-
-+#include <sys/param.h>
-+#if defined(__FreeBSD_version) && __FreeBSD_version < 1500020
- extern int printf __P((char *, ...));
- extern int fprintf __P((FILE *, char *, ...));
- extern int sprintf __P((char *, char *, ...));
-@@ -71,6 +73,7 @@ extern void bcopy __P((char *, char *, int));
- #else
- extern void bcopy __P((char *, char *, int));
- #endif
-+#endif /* __FreeBSD_version */
-
- #ifdef BSDWAIT
- struct rusage; /* for wait3 __P */
diff --git a/sysutils/screen49/files/patch-resize.c b/sysutils/screen49/files/patch-resize.c
deleted file mode 100644
index 216fec9c1ab6..000000000000
--- a/sysutils/screen49/files/patch-resize.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- resize.c.orig 2023-08-16 00:29:26 UTC
-+++ resize.c
-@@ -683,6 +683,17 @@ int wi, he, hi;
- he = MAXWIDTH;
- }
-
-+ if (wi > 1000)
-+ {
-+ Msg(0, "Window width too large, truncated");
-+ wi = 1000;
-+ }
-+ if (he > 1000)
-+ {
-+ Msg(0, "Window height too large, truncated");
-+ he = 1000;
-+ }
-+
- if (p->w_width == wi && p->w_height == he && p->w_histheight == hi)
- {
- debug("ChangeWindowSize: No change.\n");
diff --git a/sysutils/screen49/files/patch-screen.c b/sysutils/screen49/files/patch-screen.c
deleted file mode 100644
index bde83a3b06cc..000000000000
--- a/sysutils/screen49/files/patch-screen.c
+++ /dev/null
@@ -1,120 +0,0 @@
---- screen.c.orig 2023-08-16 00:29:26 UTC
-+++ screen.c
-@@ -230,8 +230,6 @@ int multiattach;
- int multi_uid;
- int own_uid;
- int multiattach;
--int tty_mode;
--int tty_oldmode = -1;
- #endif
-
- char HostName[MAXSTR];
-@@ -1009,9 +1007,6 @@ int main(int ac, char** av)
-
- /* ttyname implies isatty */
- SetTtyname(true, &st);
--#ifdef MULTIUSER
-- tty_mode = (int)st.st_mode & 0777;
--#endif
-
- fl = fcntl(0, F_GETFL, 0);
- if (fl != -1 && (fl & (O_RDWR|O_RDONLY|O_WRONLY)) == O_RDWR)
-@@ -1127,15 +1122,28 @@ int main(int ac, char** av)
- #endif
- }
-
-- if (stat(SockPath, &st) == -1)
-- Panic(errno, "Cannot access %s", SockPath);
-- else
-- if (!S_ISDIR(st.st_mode))
-+ if (stat(SockPath, &st) == -1) {
-+ if (eff_uid == real_uid) {
-+ Panic(errno, "Cannot access %s", SockPath);
-+ } else {
-+ Panic(0, "Error accessing %s", SockPath);
-+ }
-+ } else if (!S_ISDIR(st.st_mode)) {
-+ if (eff_uid == real_uid || st.st_uid == real_uid) {
- Panic(0, "%s is not a directory.", SockPath);
-+ } else {
-+ Panic(0, "Error accessing %s", SockPath);
-+ }
-+ }
- #ifdef MULTIUSER
- if (multi) {
-- if ((int)st.st_uid != multi_uid)
-- Panic(0, "%s is not the owner of %s.", multi, SockPath);
-+ if ((int)st.st_uid != multi_uid) {
-+ if (eff_uid == real_uid || st.st_uid == real_uid) {
-+ Panic(0, "%s is not the owner of %s.", multi, SockPath);
-+ } else {
-+ Panic(0, "Error accessing %s", SockPath);
-+ }
-+ }
- }
- else
- #endif
-@@ -1149,9 +1157,13 @@ int main(int ac, char** av)
- Panic(0, "You are not the owner of %s.", SockPath);
- #endif
- }
--
-- if ((st.st_mode & 0777) != 0700)
-- Panic(0, "Directory %s must have mode 700.", SockPath);
-+ if ((st.st_mode & 0777) != 0700) {
-+ if (eff_uid == real_uid || st.st_uid == real_uid) {
-+ Panic(0, "Directory %s must have mode 700.", SockPath);
-+ } else {
-+ Panic(0, "Error accessing %s", SockPath);
-+ }
-+ }
- if (SockMatch && index(SockMatch, '/'))
- Panic(0, "Bad session name '%s'", SockMatch);
- SockName = SockPath + strlen(SockPath) + 1;
-@@ -1189,8 +1201,14 @@ int main(int ac, char** av)
- else
- exit(9 + (fo || oth ? 1 : 0) + fo);
- }
-- if (fo == 0)
-- Panic(0, "No Sockets found in %s.\n", SockPath);
-+ if (fo == 0) {
-+ if (eff_uid == real_uid || st.st_uid == real_uid) {
-+ Panic(0, "No Sockets found in %s.\n", SockPath);
-+ } else {
-+ Panic(0, "Error accessing %s", SockPath);
-+ }
-+ }
-+
- Msg(0, "%d Socket%s in %s.", fo, fo > 1 ? "s" : "", SockPath);
- eexit(0);
- }
-@@ -2170,20 +2188,6 @@ DEFINE_VARARGS_FN(Panic)
- if (D_userpid)
- Kill(D_userpid, SIG_BYE);
- }
--#ifdef MULTIUSER
-- if (tty_oldmode >= 0) {
--
--# ifdef USE_SETEUID
-- if (setuid(own_uid))
-- xseteuid(own_uid); /* may be a loop. sigh. */
--# else
-- setuid(own_uid);
--# endif
--
-- debug1("Panic: changing back modes from %s\n", attach_tty);
-- chmod(attach_tty, tty_oldmode);
-- }
--#endif
- eexit(1);
- }
-
-@@ -2234,7 +2238,7 @@ static char *pad_expand(char *buf, char *p, int numpad
- pn2 = pn = p + padlen;
- r = winmsg_numrend;
- while (p >= buf) {
-- if (r && *p != 127 && p - buf == winmsg_rendpos[r - 1]) {
-+ if (r && p - buf == winmsg_rendpos[r - 1]) {
- winmsg_rendpos[--r] = pn - buf;
- continue;
- }
diff --git a/sysutils/screen49/files/patch-socket.c b/sysutils/screen49/files/patch-socket.c
deleted file mode 100644
index 01bd213ae5c4..000000000000
--- a/sysutils/screen49/files/patch-socket.c
+++ /dev/null
@@ -1,97 +0,0 @@
---- socket.c.orig 2025-05-13 14:58:03 UTC
-+++ socket.c
-@@ -171,8 +171,13 @@ bool *is_sock;
- xsetegid(real_gid);
- #endif
-
-- if ((dirp = opendir(SockPath)) == 0)
-- Panic(errno, "Cannot opendir %s", SockPath);
-+ if ((dirp = opendir(SockPath)) == 0) {
-+ if (eff_uid == real_uid) {
-+ Panic(errno, "Cannot opendir %s", SockPath);
-+ } else {
-+ Panic(0, "Error accessing %s", SockPath);
-+ }
-+ }
-
- slist = 0;
- slisttail = &slist;
-@@ -841,6 +846,11 @@ int pid;
- return UserStatus();
- }
-
-+static void KillUnpriv(pid_t pid, int sig) {
-+ UserContext();
-+ UserReturn(kill(pid, sig));
-+}
-+
- #ifdef hpux
- /*
- * From: "F. K. Bruner" <napalm@ugcs.caltech.edu>
-@@ -926,14 +936,14 @@ struct win *wi;
- {
- Msg(errno, "Could not perform necessary sanity checks on pts device.");
- close(i);
-- Kill(pid, SIG_BYE);
-+ KillUnpriv(pid, SIG_BYE);
- return -1;
- }
- if (strcmp(ttyname_in_ns, m->m_tty))
- {
- Msg(errno, "Attach: passed fd does not match tty: %s - %s!", ttyname_in_ns, m->m_tty[0] != '\0' ? m->m_tty : "(null)");
- close(i);
-- Kill(pid, SIG_BYE);
-+ KillUnpriv(pid, SIG_BYE);
- return -1;
- }
- /* m->m_tty so far contains the actual name of the pts device in the
-@@ -950,19 +960,19 @@ struct win *wi;
- {
- Msg(errno, "Attach: passed fd does not match tty: %s - %s!", m->m_tty, myttyname ? myttyname : "NULL");
- close(i);
-- Kill(pid, SIG_BYE);
-+ KillUnpriv(pid, SIG_BYE);
- return -1;
- }
- }
- else if ((i = secopen(m->m_tty, O_RDWR | O_NONBLOCK, 0)) < 0)
- {
- Msg(errno, "Attach: Could not open %s!", m->m_tty);
-- Kill(pid, SIG_BYE);
-+ KillUnpriv(pid, SIG_BYE);
- return -1;
- }
- #ifdef MULTIUSER
- if (attach)
-- Kill(pid, SIGCONT);
-+ KillUnpriv(pid, SIGCONT);
- #endif
-
- #if defined(ultrix) || defined(pyr) || defined(NeXT)
-@@ -975,7 +985,7 @@ struct win *wi;
- {
- write(i, "Attaching from inside of screen?\n", 33);
- close(i);
-- Kill(pid, SIG_BYE);
-+ KillUnpriv(pid, SIG_BYE);
- Msg(0, "Attach msg ignored: coming from inside.");
- return -1;
- }
-@@ -986,7 +996,7 @@ struct win *wi;
- {
- write(i, "Access to session denied.\n", 26);
- close(i);
-- Kill(pid, SIG_BYE);
-+ KillUnpriv(pid, SIG_BYE);
- Msg(0, "Attach: access denied for user %s.", user);
- return -1;
- }
-@@ -1304,7 +1314,7 @@ ReceiveMsg()
- Msg(0, "Query attempt with bad pid(%d)!", m.m.command.apid);
- }
- else {
-- Kill(m.m.command.apid,
-+ KillUnpriv(m.m.command.apid,
- (queryflag >= 0)
- ? SIGCONT
- : SIG_BYE); /* Send SIG_BYE if an error happened */
diff --git a/sysutils/screen49/files/patch-termcap.c b/sysutils/screen49/files/patch-termcap.c
deleted file mode 100644
index a7abaa54ce81..000000000000
--- a/sysutils/screen49/files/patch-termcap.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- termcap.c.orig 2023-08-16 00:29:26 UTC
-+++ termcap.c
-@@ -361,11 +361,7 @@ int he;
- if (D_CG0)
- {
- if (D_CS0 == 0)
--#ifdef TERMINFO
-- D_CS0 = "\033(%p1%c";
--#else
-- D_CS0 = "\033(%.";
--#endif
-+ D_CS0 = "\033(%p1%c"; /* Old ncurses can't handle %. */
- if (D_CE0 == 0)
- D_CE0 = "\033(B";
- D_AC = 0;
diff --git a/sysutils/screen49/files/patch-terminfo__checktc.c b/sysutils/screen49/files/patch-terminfo__checktc.c
deleted file mode 100644
index 7c38ac40c386..000000000000
--- a/sysutils/screen49/files/patch-terminfo__checktc.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- terminfo/checktc.c.orig 2023-08-16 00:29:26 UTC
-+++ terminfo/checktc.c
-@@ -171,6 +171,7 @@ char *s;
- fflush(stdout);
- }
-
-+#ifndef __FreeBSD__
- void CPutStr(s, c)
- char *s;
- int c;
-@@ -178,6 +179,7 @@ int c;
- tputs(tgoto(s, 0, c), 1, putcha);
- fflush(stdout);
- }
-+#endif /* __FreeBSD__ */
-
- void CCPutStr(s, x, y)
- char *s;
diff --git a/sysutils/screen49/files/patch-utmp.c b/sysutils/screen49/files/patch-utmp.c
deleted file mode 100644
index e019f8cedc09..000000000000
--- a/sysutils/screen49/files/patch-utmp.c
+++ /dev/null
@@ -1,156 +0,0 @@
---- utmp.c.orig 2023-08-16 00:29:26 UTC
-+++ utmp.c
-@@ -26,6 +26,7 @@
- ****************************************************************
- */
-
-+#include <sys/param.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-@@ -89,11 +90,13 @@ static struct utmp *getutslot __P((slot_t));
- static int pututslot __P((slot_t, struct utmp *, char *, struct win *));
- static struct utmp *getutslot __P((slot_t));
- #ifndef GETUTENT
-+#if 0
- static struct utmp *getutent __P((void));
- static void endutent __P((void));
- static int initutmp __P((void));
- static void setutent __P((void));
- #endif
-+#endif
- #if defined(linux) && defined(GETUTENT)
- static struct utmp *xpututline __P((struct utmp *utmp));
- # define pututline xpututline
-@@ -102,9 +105,7 @@ static char UtmpName[] = UTMPFILE;
-
- static int utmpok;
- static char UtmpName[] = UTMPFILE;
--#ifndef UTMP_HELPER
- static int utmpfd = -1;
--#endif
-
-
- # if defined(GETUTENT) && (!defined(SVR4) || defined(__hpux)) && ! defined(__CYGWIN__)
-@@ -409,12 +410,6 @@ struct win *wi;
- register slot_t slot;
- struct utmp u;
- int saved_ut;
--#ifdef UTHOST
-- char *p;
-- char host[sizeof(D_loginhost) + 15];
--#else
-- char *host = 0;
--#endif /* UTHOST */
-
- wi->w_slot = (slot_t)0;
- if (!utmpok || wi->w_type != W_TYPE_PTY)
-@@ -435,51 +430,13 @@ struct win *wi;
- makeuser(&u, stripdev(wi->w_tty), LoginName, wi->w_pid);
-
- #ifdef UTHOST
-- host[sizeof(host) - 15] = '\0';
-- if (display)
-- {
-- strncpy(host, D_loginhost, sizeof(host) - 15);
-- if (D_loginslot != (slot_t)0 && D_loginslot != (slot_t)-1 && host[0] != '\0')
-- {
-- /*
-- * we want to set our ut_host field to something like
-- * ":ttyhf:s.0" or
-- * "faui45:s.0" or
-- * "132.199.81.4:s.0" (even this may hurt..), but not
-- * "faui45.informati"......:s.0
-- * HPUX uses host:0.0, so chop at "." and ":" (Eric Backus)
-- */
-- for (p = host; *p; p++)
-- if ((*p < '0' || *p > '9') && (*p != '.'))
-- break;
-- if (*p)
-- {
-- for (p = host; *p; p++)
-- if (*p == '.' || (*p == ':' && p != host))
-- {
-- *p = '\0';
-- break;
-- }
-- }
-- }
-- else
-- {
-- strncpy(host + 1, stripdev(D_usertty), sizeof(host) - 15 - 1);
-- host[0] = ':';
-- }
-- }
-- else
-- strncpy(host, "local", sizeof(host) - 15);
--
-- sprintf(host + strlen(host), ":S.%d", wi->w_number);
-- debug1("rlogin hostname: '%s'\n", host);
--
- # if !defined(_SEQUENT_) && !defined(sequent)
-- strncpy(u.ut_host, host, sizeof(u.ut_host));
-+ if (display)
-+ strncpy(u.ut_host, D_loginhost, sizeof(u.ut_host));
- # endif
- #endif /* UTHOST */
-
-- if (pututslot(slot, &u, host, wi) == 0)
-+ if (pututslot(slot, &u, D_loginhost, wi) == 0)
- {
- Msg(errno,"Could not write %s", UtmpName);
- UT_CLOSE;
-@@ -607,7 +564,7 @@ struct utmp *u;
- struct utmp *u;
- {
- u->ut_type = DEAD_PROCESS;
--#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__)
-+#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
- u->ut_exit.e_termination = 0;
- u->ut_exit.e_exit = 0;
- #endif
-@@ -640,7 +597,11 @@ int pid;
- /* must use temp variable because of NetBSD/sparc64, where
- * ut_xtime is long(64) but time_t is int(32) */
- (void)time(&now);
-- u->ut_time = now;
-+#if defined(__FreeBSD_version) && __FreeBSD_version < 900000
-+ u->ut_time = now;
-+#else
-+ u->ut_tv.tv_sec = now;
-+#endif
- }
-
- static slot_t
-@@ -670,6 +631,7 @@ initutmp()
- return (utmpfd = open(UtmpName, O_RDWR)) >= 0;
- }
-
-+#if 0
- static void
- setutent()
- {
-@@ -694,6 +656,7 @@ getutent()
- return 0;
- return &uent;
- }
-+#endif
-
- static struct utmp *
- getutslot(slot)
-@@ -750,9 +713,13 @@ int pid;
- {
- time_t now;
- strncpy(u->ut_line, line, sizeof(u->ut_line));
-- strncpy(u->ut_name, user, sizeof(u->ut_name));
-+ strncpy(u->ut_user, user, sizeof(u->ut_user));
- (void)time(&now);
-- u->ut_time = now;
-+#if defined(__FreeBSD_version) && __FreeBSD_version < 900000
-+ u->ut_time = now;
-+#else
-+ u->ut_tv.tv_sec = now;
-+#endif
- }
-
- static slot_t
diff --git a/sysutils/screen49/files/screenrc.sample b/sysutils/screen49/files/screenrc.sample
deleted file mode 100644
index 1ce5561ebf31..000000000000
--- a/sysutils/screen49/files/screenrc.sample
+++ /dev/null
@@ -1,10 +0,0 @@
-startup_message off
-defscrollback 5000
-termcapinfo xterm ti@:te@
-termcapinfo xterm-color ti@:te@
-hardstatus alwayslastline
-hardstatus string '%{gk}[%{G}%H%{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=b C}[%m/%d/%y %C %A]%{W}'
-vbell off
-shell -$SHELL
-logtstamp on
-logtstamp after 1