Skip to content

Commit

Permalink
sysutils/screen: Update 4.9.0 --> 4.9.1
Browse files Browse the repository at this point in the history
Version 4.9.1 (20/08/2023):
  * Support stop/parity bits on serial port (#23952)
  * Add needed system headers in checks and return values
    for implicit function declarations
  * Fixes:
    - Avoid zombies after shell exit (#25089)
    - Missed signal sending permission check on failed
      query messages (CVE-2023-24626)
    - manpage fixes
    - source code fixes during cleanup
    - UTF-8 encoding can emit invalid UTF-8 sequences
      for out of range unicode values (#62097)
  • Loading branch information
cschuber committed Aug 20, 2023
1 parent e749d4e commit bfae663
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 29 deletions.
3 changes: 1 addition & 2 deletions sysutils/screen/Makefile
@@ -1,6 +1,5 @@
PORTNAME= screen
PORTVERSION= 4.9.0
PORTREVISION= 7
PORTVERSION= 4.9.1
CATEGORIES= sysutils
MASTER_SITES= GNU \
ftp://ftp.gnu.org/gnu/screen/ \
Expand Down
6 changes: 3 additions & 3 deletions sysutils/screen/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1647532509
SHA256 (screen-4.9.0.tar.gz) = f9335281bb4d1538ed078df78a20c2f39d3af9a4e91c57d084271e0289c730f4
SIZE (screen-4.9.0.tar.gz) = 798229
TIMESTAMP = 1692454303
SHA256 (screen-4.9.1.tar.gz) = 26cef3e3c42571c0d484ad6faf110c5c15091fbf872b06fa7aa4766c7405ac69
SIZE (screen-4.9.1.tar.gz) = 1040785
39 changes: 22 additions & 17 deletions sysutils/screen/files/patch-configure.ac
@@ -1,38 +1,43 @@
--- configure.ac.orig 2022-01-28 06:06:02.670611602 -0800
+++ configure.ac 2022-03-17 10:09:55.599298000 -0700
@@ -811,11 +811,11 @@
--- configure.ac.orig 2023-08-15 17:29:26.000000000 -0700
+++ configure.ac 2023-08-19 07:32:42.246552000 -0700
@@ -669,7 +669,7 @@
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>
@@ -900,11 +900,11 @@
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>
#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>
+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -825,14 +825,14 @@
#define pututline _pututline
#endif
],
-[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
+[int x = DEAD_PROCESS; pututxline((struct utmp *)0); getutxent();], AC_DEFINE(GETUTENT),
@@ -917,11 +917,11 @@
[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>
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__)
#include <utmpx.h>
#include <utmpx.h>
#define utmp utmpx
#else
@@ -842,13 +842,13 @@
@@ -931,13 +931,13 @@
#define pututline _pututline
#endif
],
Expand Down
55 changes: 49 additions & 6 deletions sysutils/screen/files/patch-utmp.c
@@ -1,5 +1,5 @@
--- utmp.c.orig 2017-01-17 11:28:29.397404660 -0800
+++ utmp.c 2017-02-10 16:48:34.902236000 -0800
--- utmp.c.orig 2023-08-15 17:29:26.000000000 -0700
+++ utmp.c 2023-08-19 08:57:48.376313000 -0700
@@ -26,6 +26,7 @@
****************************************************************
*/
Expand All @@ -8,6 +8,30 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -89,11 +90,13 @@
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 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 @@
register slot_t slot;
struct utmp u;
Expand Down Expand Up @@ -76,7 +100,7 @@
{
Msg(errno,"Could not write %s", UtmpName);
UT_CLOSE;
@@ -598,7 +555,7 @@
@@ -607,7 +564,7 @@
struct utmp *u;
{
u->ut_type = DEAD_PROCESS;
Expand All @@ -85,7 +109,7 @@
u->ut_exit.e_termination = 0;
u->ut_exit.e_exit = 0;
#endif
@@ -631,7 +588,11 @@
@@ -640,7 +597,11 @@
/* must use temp variable because of NetBSD/sparc64, where
* ut_xtime is long(64) but time_t is int(32) */
(void)time(&now);
Expand All @@ -98,9 +122,28 @@
}

static slot_t
@@ -743,7 +704,11 @@
@@ -670,6 +631,7 @@
return (utmpfd = open(UtmpName, O_RDWR)) >= 0;
}

+#if 0
static void
setutent()
{
@@ -694,6 +656,7 @@
return 0;
return &uent;
}
+#endif

static struct utmp *
getutslot(slot)
@@ -750,9 +713,13 @@
{
time_t now;
strncpy(u->ut_line, line, sizeof(u->ut_line));
strncpy(u->ut_name, user, sizeof(u->ut_name));
- 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
Expand Down
2 changes: 1 addition & 1 deletion sysutils/screen/pkg-plist
@@ -1,5 +1,5 @@
bin/screen
%%MULTISUID%%bin/screen-4.9.0
%%MULTISUID%%bin/screen-4.9.1
man/man1/screen.1.gz
%%DATADIR%%/utf8encodings/01
%%DATADIR%%/utf8encodings/02
Expand Down

0 comments on commit bfae663

Please sign in to comment.