summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/cpupdate/Makefile8
-rw-r--r--sysutils/cpupdate/distinfo10
-rw-r--r--sysutils/fastfetch/Makefile2
-rw-r--r--sysutils/fastfetch/distinfo6
-rw-r--r--sysutils/ipmitool/Makefile2
-rw-r--r--sysutils/ipmitool/files/patch-buffer-overrun-PR2433
-rw-r--r--sysutils/ipmitool/files/patch-dcmi57
-rw-r--r--sysutils/ipmitool/files/patch-fru-PR368296
-rw-r--r--sysutils/ipmitool/files/patch-lan-PR38933
-rw-r--r--sysutils/ipmitool/files/patch-lan-print36
-rw-r--r--sysutils/ipmitool/files/patch-lib_ipmi_sdr.c35
-rw-r--r--sysutils/ipmitool/files/patch-sdr75
-rw-r--r--sysutils/k9s/Makefile6
-rw-r--r--sysutils/k9s/distinfo10
-rw-r--r--sysutils/py-ansible-core/Makefile2
-rw-r--r--sysutils/screen49/Makefile6
-rw-r--r--sysutils/screen49/files/patch-attacher.c79
-rw-r--r--sysutils/screen49/files/patch-configure.ac14
-rw-r--r--sysutils/screen49/files/patch-doc__Makefile.in12
-rw-r--r--sysutils/screen49/files/patch-misc.c4
-rw-r--r--sysutils/screen49/files/patch-os.h8
-rw-r--r--sysutils/screen49/files/patch-osdef.h.in6
-rw-r--r--sysutils/screen49/files/patch-resize.c10
-rw-r--r--sysutils/screen49/files/patch-screen.c115
-rw-r--r--sysutils/screen49/files/patch-socket.c169
-rw-r--r--sysutils/screen49/files/patch-termcap.c6
-rw-r--r--sysutils/screen49/files/patch-terminfo__checktc.c8
-rw-r--r--sysutils/screen49/files/patch-utmp.c22
28 files changed, 912 insertions, 158 deletions
diff --git a/sysutils/cpupdate/Makefile b/sysutils/cpupdate/Makefile
index 9e37d8fdd51e..2af68aa68019 100644
--- a/sysutils/cpupdate/Makefile
+++ b/sysutils/cpupdate/Makefile
@@ -1,6 +1,6 @@
PORTNAME= cpupdate
DISTVERSION= g20180513
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= sysutils
MAINTAINER= eugen@FreeBSD.org
@@ -34,10 +34,10 @@ GH_TAGNAME= 48e42d5
PLIST_FILES= sbin/${PORTNAME} share/man/man8/${PORTNAME}.8.gz
-# MCE DB r312
+# MCE DB r332
CPM_ACCOUNT= platomav
CPM_PROJECT= CPUMicrocodes
-CPM_TAGNAME= 7d439dd
+CPM_TAGNAME= 2bcc2d8
OPTIONS_DEFINE= CPM INTEL
CPM_DESC= Download platomav/CPUMicrocodes collection
@@ -48,7 +48,7 @@ CPM_PACK?= ${CPM_ACCOUNT}-${CPM_PROJECT}-${CPM_TAGNAME}_GH0.tar.gz
CPM_DIR= ${WRKDIR}/${CPM_PROJECT}-${CPM_TAGNAME}
CPM_DATADIR= ${DATADIR}/CPUMicrocodes/secondary/Intel
-INTEL_PACK= microcode-20241112
+INTEL_PACK= microcode-20250512
INTEL_DESC= Download Intel microcode pack ${INTEL_PACK}
INTEL_PROJECT= Intel-Linux-Processor-Microcode-Data-Files
INTEL_MASTER_SITES= https://codeload.github.com/intel/${INTEL_PROJECT}/tar.gz/:intel
diff --git a/sysutils/cpupdate/distinfo b/sysutils/cpupdate/distinfo
index 0b439b7030aa..6471c007a185 100644
--- a/sysutils/cpupdate/distinfo
+++ b/sysutils/cpupdate/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1731442370
-SHA256 (microcode-20241112) = 37246208ef68039be752438c72400a688a2238df13a7f5282497c80be2d8366d
-SIZE (microcode-20241112) = 12923653
+TIMESTAMP = 1747230739
+SHA256 (microcode-20250512) = 041af7d2f5791a47c1e914abd7d6255de4d4fc61b0f8e49ada6ee7014bcc3614
+SIZE (microcode-20250512) = 14985022
SHA256 (kernschmelze-cpupdate-g20180513-48e42d5_GH0.tar.gz) = d28582fe7edfb57da99fb2466417033ee619c32de9c6b5f1a5fae7d9be8253da
SIZE (kernschmelze-cpupdate-g20180513-48e42d5_GH0.tar.gz) = 4566722
-SHA256 (platomav-CPUMicrocodes-7d439dd_GH0.tar.gz) = 0f1bbd9f14d9ae385a640c84e58e353cf644192e0c22dbd60ad20a58e9375b51
-SIZE (platomav-CPUMicrocodes-7d439dd_GH0.tar.gz) = 27372480
+SHA256 (platomav-CPUMicrocodes-2bcc2d8_GH0.tar.gz) = 85cc2c012cae9bc1916fb70652cd05d616cd08eb35969cbc19e29ed5f5a7fba1
+SIZE (platomav-CPUMicrocodes-2bcc2d8_GH0.tar.gz) = 31583994
diff --git a/sysutils/fastfetch/Makefile b/sysutils/fastfetch/Makefile
index 40a4c934ec25..da85017f7c06 100644
--- a/sysutils/fastfetch/Makefile
+++ b/sysutils/fastfetch/Makefile
@@ -1,5 +1,5 @@
PORTNAME= fastfetch
-DISTVERSION= 2.42.0
+DISTVERSION= 2.43.0
CATEGORIES= sysutils
MAINTAINER= pkubaj@FreeBSD.org
diff --git a/sysutils/fastfetch/distinfo b/sysutils/fastfetch/distinfo
index 4806dc109aef..186f86ab9e81 100644
--- a/sysutils/fastfetch/distinfo
+++ b/sysutils/fastfetch/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1745925528
-SHA256 (fastfetch-cli-fastfetch-2.42.0_GH0.tar.gz) = 9f94fdbe0642b2402517bba2fff4dd31099649d4e066f4c39b5b728cc3627f01
-SIZE (fastfetch-cli-fastfetch-2.42.0_GH0.tar.gz) = 1282221
+TIMESTAMP = 1747220428
+SHA256 (fastfetch-cli-fastfetch-2.43.0_GH0.tar.gz) = 192ddb57d021436d93ed8ad1fadaaeef20ce59a2296f31af65e12978b48feda5
+SIZE (fastfetch-cli-fastfetch-2.43.0_GH0.tar.gz) = 1301605
diff --git a/sysutils/ipmitool/Makefile b/sysutils/ipmitool/Makefile
index 259401ffafee..1f1d40910041 100644
--- a/sysutils/ipmitool/Makefile
+++ b/sysutils/ipmitool/Makefile
@@ -1,6 +1,6 @@
PORTNAME= ipmitool
PORTVERSION= 1.8.19
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= https://codeberg.org/IPMITool/${PORTNAME}/archive/:ipmi \
LOCAL/zi/:iana
diff --git a/sysutils/ipmitool/files/patch-buffer-overrun-PR24 b/sysutils/ipmitool/files/patch-buffer-overrun-PR24
new file mode 100644
index 000000000000..21369ef063a1
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-buffer-overrun-PR24
@@ -0,0 +1,33 @@
+From b4bc5c335159b1c272e06dba98e2916e3ecc0462 Mon Sep 17 00:00:00 2001
+From: Howitzer105mm <howitzer105mm@noreply.codeberg.org>
+Date: Tue, 26 Mar 2024 11:28:16 +0000
+Subject: [PATCH] open: Eliminate buffer overrun (#24)
+
+clangd reports a buffer overrun issue in `open` interface.
+
+The sprintf() used to fill ipmi_devfs2 requires 17 bytes to store the
+null terminated string. The character buffer is only 16 bytes in
+length.
+
+Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
+Reviewed-on: https://codeberg.org/IPMITool/ipmitool/pulls/24
+Reviewed-by: Alexander Amelkin <alexander@amelkin.msk.ru>
+Co-authored-by: Howitzer105mm <howitzer105mm@noreply.codeberg.org>
+Co-committed-by: Howitzer105mm <howitzer105mm@noreply.codeberg.org>
+---
+ src/plugins/open/open.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git src/plugins/open/open.c src/plugins/open/open.c
+index 39c8ea2..88cb6c3 100644
+--- src/plugins/open/open.c
++++ src/plugins/open/open.c
+@@ -94,7 +94,7 @@ ipmi_openipmi_open(struct ipmi_intf *intf)
+ {
+ char ipmi_dev[16];
+ char ipmi_devfs[16];
+- char ipmi_devfs2[16];
++ char ipmi_devfs2[17];
+ int devnum = 0;
+
+ devnum = intf->devnum;
diff --git a/sysutils/ipmitool/files/patch-dcmi b/sysutils/ipmitool/files/patch-dcmi
new file mode 100644
index 000000000000..0fc588c31360
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-dcmi
@@ -0,0 +1,57 @@
+From ab5ce5baff097ebb6e2a17a171858be213ee68d3 Mon Sep 17 00:00:00 2001
+From: Thang Tran <thuutran@amperecomputing.com>
+Date: Tue, 11 Jul 2023 17:27:12 +0700
+Subject: [PATCH] dcmi: update parameters to read temperature sensors
+
+Issue:
+When the system has number of CPU temperature sensors more than 8,
+"ipmitool dcmi get_temp_reading" can not show all of sensors.
+
+Root cause:
+To request to read multiple sensors for each message, ipmitool has to
+send "Get Temperature Readings" command with the "Entity Instance" always
+0 and the "Entity Instance Start" as the offset. But the current code is
+sending "Entity Instance" is offset and "Entity Instance Start" always is
+0. It makes ipmitool only read 1 sensor each time. Besides that, the
+"Entity Instance Start" value starts from 1 (not 0), therefore, the
+initialization has to be set to 1.
+
+Solution:
+This commit corrects the order of parameters and the initialization of
+"Entity Instance Start" byte.
+
+Resolves ipmitool/ipmitool#3
+
+Tested:
+1. Update BMC software to support 24 CPU temperature sensors
+2. Request to read the temperature sensors
+$ipmitool dcmi get_temp_reading
+3. Display full 24 CPU temperature sensors.
+
+Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
+---
+ lib/ipmi_dcmi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git lib/ipmi_dcmi.c lib/ipmi_dcmi.c
+index 8ed87a9..8cf6d66 100644
+--- lib/ipmi_dcmi.c
++++ lib/ipmi_dcmi.c
+@@ -1595,7 +1595,7 @@ ipmi_dcmi_prnt_get_temp_readings(struct ipmi_intf * intf)
+ continue;
+ }
+ /* Total number of available instances for the Entity ID */
+- offset = 0;
++ offset = 1;
+ tota_inst = rsp->data[1];
+ while (tota_inst > 0) {
+ get_inst = ((tota_inst / DCMI_MAX_BYTE_TEMP_READ_SIZE) ?
+@@ -1603,7 +1603,7 @@ ipmi_dcmi_prnt_get_temp_readings(struct ipmi_intf * intf)
+ (tota_inst % DCMI_MAX_BYTE_TEMP_READ_SIZE));
+ rsp = ipmi_dcmi_get_temp_readings(intf,
+ dcmi_temp_read_vals[i].val,
+- offset, 0);
++ 0, offset);
+ if (chk_rsp(rsp)) {
+ continue;
+ }
diff --git a/sysutils/ipmitool/files/patch-fru-PR368 b/sysutils/ipmitool/files/patch-fru-PR368
new file mode 100644
index 000000000000..bdef578767ec
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-fru-PR368
@@ -0,0 +1,296 @@
+From 81011685ea5e8897f8c0971eca5feb93c6880f09 Mon Sep 17 00:00:00 2001
+From: Andrew Liao <andrew8325@outlook.com>
+Date: Fri, 23 Sep 2022 10:11:04 +0800
+Subject: [PATCH 1/2] fru: Update the fru section offset only when they exist
+ (offset is not 0)
+
+---
+ lib/ipmi_fru.c | 52 ++++++++++++++++++++++++++++----------------------
+ 1 file changed, 29 insertions(+), 23 deletions(-)
+
+diff --git lib/ipmi_fru.c lib/ipmi_fru.c
+index 3d1d8a1a..a994f3cf 100644
+--- lib/ipmi_fru.c
++++ lib/ipmi_fru.c
+@@ -5052,35 +5052,41 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ /* Chassis type field */
+ if (f_type == 'c' )
+ {
+- printf("Moving Section Chassis, from %i to %i\n",
+- ((header.offset.board) * 8),
+- ((header.offset.board + change_size_by_8) * 8)
+- );
+- memcpy(
+- (fru_data_new + ((header.offset.board + change_size_by_8) * 8)),
+- (fru_data_old + (header.offset.board) * 8),
+- board_len
+- );
+- header.offset.board += change_size_by_8;
++ if (header.offset.board != 0) {
++ printf("Moving Section Chassis, from %i to %i\n",
++ ((header.offset.board) * 8),
++ ((header.offset.board + change_size_by_8) * 8)
++ );
++ memcpy(
++ (fru_data_new + ((header.offset.board + change_size_by_8) * 8)),
++ (fru_data_old + (header.offset.board) * 8),
++ board_len
++ );
++ header.offset.board += change_size_by_8;
++ }
+ }
+ /* Board type field */
+ if ((f_type == 'c' ) || (f_type == 'b' ))
+ {
+- printf("Moving Section Product, from %i to %i\n",
+- ((header.offset.product) * 8),
+- ((header.offset.product + change_size_by_8) * 8)
+- );
+- memcpy(
+- (fru_data_new + ((header.offset.product + change_size_by_8) * 8)),
+- (fru_data_old + (header.offset.product) * 8),
+- product_len
+- );
+- header.offset.product += change_size_by_8;
++ if (header.offset.product != 0) {
++ printf("Moving Section Product, from %i to %i\n",
++ ((header.offset.product) * 8),
++ ((header.offset.product + change_size_by_8) * 8)
++ );
++ memcpy(
++ (fru_data_new + ((header.offset.product + change_size_by_8) * 8)),
++ (fru_data_old + (header.offset.product) * 8),
++ product_len
++ );
++ header.offset.product += change_size_by_8;
++ }
+ }
+
+- if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) {
+- printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8);
+- header.offset.multi += change_size_by_8;
++ if (header.offset.multi != 0) {
++ if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) {
++ printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8);
++ header.offset.multi += change_size_by_8;
++ }
+ }
+
+ /* Adjust length of the section */
+
+From fe70e7d81334ba37614ca5cd0580b2a91a969fc1 Mon Sep 17 00:00:00 2001
+From: "Andrew.Liao" <andrew.liao@quantatw.com>
+Date: Mon, 26 Sep 2022 17:16:52 +0800
+Subject: [PATCH 2/2] fru: Adjust the fru section by their offset order
+
+Originally, ipmitool will assume the FRU section offset will follow a specific order, but this is not true (or not be defined in IPMI FRU SPEC). So change the FRU edit method, now it will:
+ - Calculate the section offset one by one according to their offset
+ - Ignore the FRU section offset if its offset is 00 (area does not exist)
+ - If the new FRU become smaller, reset the redundant data to 0
+Fixes #364
+---
+ lib/ipmi_fru.c | 151 +++++++++++++++++++++++++++++--------------------
+ 1 file changed, 90 insertions(+), 61 deletions(-)
+
+diff --git lib/ipmi_fru.c lib/ipmi_fru.c
+index a994f3cf..3bf8416d 100644
+--- lib/ipmi_fru.c
++++ lib/ipmi_fru.c
+@@ -4889,7 +4889,7 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ struct fru_info fru, struct fru_header header,
+ uint8_t f_type, uint8_t f_index, char *f_string)
+ {
+- int i = 0;
++ int i = 0, j;
+ uint8_t *fru_data_old = NULL;
+ uint8_t *fru_data_new = NULL;
+ uint8_t *fru_area = NULL;
+@@ -4901,6 +4901,7 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ uint32_t counter;
+ unsigned char cksum;
+ int rc = 1;
++ char section_list[] = {'i', 'c', 'b', 'p', 'm'};
+
+ fru_data_old = calloc( fru.size, sizeof(uint8_t) );
+
+@@ -5018,8 +5019,10 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ 5) Check if section must be resize. This occur when padding length is not between 0 and 7 */
+ if( (padding_len < 0) || (padding_len >= 8))
+ {
+- uint32_t remaining_offset = ((header.offset.product * 8) + product_len);
+- int change_size_by_8;
++ int change_size_by_8, section_len;
++ char *name;
++ uint8_t *section_offset_by_8;
++ uint8_t last_offset_by_8 = 0;
+
+ if(padding_len >= 8)
+ {
+@@ -5044,48 +5047,85 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ #endif
+
+ /* Must move sections */
+- /* Section that can be modified are as follow
+- Chassis
+- Board
+- product */
++ /* The IPMI FRU SPEC doesn't define the sequence of each FRU area.
++ * Therefore we need to find out the affected section in this change based on
++ * their current offset and adjust each of them.
++ */
+
+- /* Chassis type field */
+- if (f_type == 'c' )
+- {
+- if (header.offset.board != 0) {
+- printf("Moving Section Chassis, from %i to %i\n",
+- ((header.offset.board) * 8),
+- ((header.offset.board + change_size_by_8) * 8)
+- );
+- memcpy(
+- (fru_data_new + ((header.offset.board + change_size_by_8) * 8)),
+- (fru_data_old + (header.offset.board) * 8),
+- board_len
+- );
+- header.offset.board += change_size_by_8;
++ /* Find out the section behind the edited section and adjust them */
++ for (j = 0; j < sizeof(section_list); j++) {
++ section_offset_by_8 = NULL;
++ name = NULL;
++
++ switch (section_list[j]) {
++ case 'i':
++ section_offset_by_8 = &header.offset.internal;
++ name = "Internal";
++ break;
++ case 'c':
++ section_offset_by_8 = &header.offset.chassis;
++ name = "Chassis";
++ break;
++ case 'b':
++ section_offset_by_8 = &header.offset.board;
++ name = "Board";
++ break;
++ case 'p':
++ section_offset_by_8 = &header.offset.product;
++ name = "Product";
++ break;
++ case 'm':
++ section_offset_by_8 = &header.offset.multi;
++ name = "MitiRecord";
++ break;
++ default:
++ /* Should not go into here */
++ break;
+ }
+- }
+- /* Board type field */
+- if ((f_type == 'c' ) || (f_type == 'b' ))
+- {
+- if (header.offset.product != 0) {
+- printf("Moving Section Product, from %i to %i\n",
+- ((header.offset.product) * 8),
+- ((header.offset.product + change_size_by_8) * 8)
++
++ /* Should never happened */
++ if (section_offset_by_8 == NULL || name == NULL) {
++ continue;
++ }
++
++ /* Ignore the section that doesn't exist */
++ if (*section_offset_by_8 == 0) {
++ continue;
++ }
++
++ /* Store the last offset in case we need to reset the last part */
++ if (last_offset_by_8 < *section_offset_by_8) {
++ last_offset_by_8 = *section_offset_by_8;
++ }
++
++ /* Adjust the section offset that locates behind the current edit section */
++ if (*section_offset_by_8 > (header_offset / 8)) {
++
++ /* Make sure the adjusted offset range is still inside the FRU field */
++ section_len = *(fru_data_old + (*section_offset_by_8 * 8) + 1) * 8;
++ if (((*section_offset_by_8 * 8) + section_len + (change_size_by_8 * 8)) > fru.size)
++ {
++ /* Return error if oversize */
++ printf("Internal error, section %s out of FRU field. %i > %i\n",
++ name,
++ ((*section_offset_by_8 * 8) + section_len + (change_size_by_8 * 8)),
++ fru.size);
++ rc = -1;
++ goto ipmi_fru_set_field_string_rebuild_out;
++ }
++
++ /* Copy the section to adjusted offset */
++ printf("Moving Section %s, from %i to %i\n",
++ name,
++ ((*section_offset_by_8) * 8),
++ ((*section_offset_by_8 + change_size_by_8) * 8)
+ );
+ memcpy(
+- (fru_data_new + ((header.offset.product + change_size_by_8) * 8)),
+- (fru_data_old + (header.offset.product) * 8),
+- product_len
++ (fru_data_new + ((*section_offset_by_8 + change_size_by_8) * 8)),
++ (fru_data_old + (*section_offset_by_8) * 8),
++ section_len
+ );
+- header.offset.product += change_size_by_8;
+- }
+- }
+-
+- if (header.offset.multi != 0) {
+- if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) {
+- printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8);
+- header.offset.multi += change_size_by_8;
++ *section_offset_by_8 += change_size_by_8;
+ }
+ }
+
+@@ -5101,7 +5141,6 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ else if( f_type == 'p')
+ {
+ *(fru_data_new + product_offset + 1) += change_size_by_8;
+- product_len_new = *(fru_data_new + product_offset + 1) * 8;
+ }
+
+ /* Rebuild Header checksum */
+@@ -5116,26 +5155,16 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
+ memcpy(fru_data_new, pfru_header, sizeof(struct fru_header));
+ }
+
+- /* Move remaining sections in 1 copy */
+- printf("Moving Remaining Bytes (Multi-Rec , etc..), from %i to %i\n",
+- remaining_offset,
+- ((header.offset.product) * 8) + product_len_new
+- );
+- if(((header.offset.product * 8) + product_len_new - remaining_offset) < 0)
+- {
+- memcpy(
+- fru_data_new + (header.offset.product * 8) + product_len_new,
+- fru_data_old + remaining_offset,
+- fru.size - remaining_offset
+- );
+- }
+- else
+- {
+- memcpy(
+- fru_data_new + (header.offset.product * 8) + product_len_new,
+- fru_data_old + remaining_offset,
+- fru.size - ((header.offset.product * 8) + product_len_new)
+- );
++ /* Reset the last part to 0 if the new FRU is smaller them old one */
++ if (change_size_by_8 < 0) {
++ section_len = *(fru_data_old + (last_offset_by_8 * 8) + 1) * 8;
++
++ /* Get the reset start offset and reset size */
++ int reset_start = ((last_offset_by_8 * 8) + section_len + (change_size_by_8 * 8));
++ int reset_size = (change_size_by_8 * (-1)) * 8;
++
++ printf("Reset to 0 from %i to %i\n", reset_start, reset_start + reset_size);
++ memset(fru_data_new + reset_start, 0, reset_size);
+ }
+ }
+
diff --git a/sysutils/ipmitool/files/patch-lan-PR389 b/sysutils/ipmitool/files/patch-lan-PR389
new file mode 100644
index 000000000000..1684d43d5be4
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-lan-PR389
@@ -0,0 +1,33 @@
+From b293d87cac0183ca6872c450cb87d2dc873359a3 Mon Sep 17 00:00:00 2001
+From: Daniel Van Allen <dvanallen@google.com>
+Date: Wed, 21 Dec 2022 14:38:47 -0500
+Subject: [PATCH] lanp: Fix error response from Unsupported Parameter lookup
+
+Return a pointer to the lan_param instead of NULL in the case when the
+parameter is not supported.
+
+Resolves ipmitool/ipmitool#388
+Signed-off-by Daniel Van Allen <dvanallen@google.com>
+---
+ lib/ipmi_lanp.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git lib/ipmi_lanp.c lib/ipmi_lanp.c
+index 16c0d9a9..49dc697f 100644
+--- lib/ipmi_lanp.c
++++ lib/ipmi_lanp.c
+@@ -236,8 +236,12 @@ get_lan_param_select(struct ipmi_intf *intf, uint8_t chan, int param, int select
+ /* We treat them as valid but empty response */
+ p->data = NULL;
+ p->data_len = 0;
+- rc = p;
+- /* fall through */
++ lprintf(LOG_INFO, "Get LAN Parameter '%s' command unsupported: %s",
++ p->desc,
++ specific_val2str(rsp->ccode,
++ get_lan_cc_vals,
++ completion_code_vals));
++ return p;
+ default:
+ /* other completion codes are treated as error */
+ lprintf(LOG_INFO, "Get LAN Parameter '%s' command failed: %s",
diff --git a/sysutils/ipmitool/files/patch-lan-print b/sysutils/ipmitool/files/patch-lan-print
new file mode 100644
index 000000000000..858e27954b66
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-lan-print
@@ -0,0 +1,36 @@
+From 137aeb64cbb493d61d6945cac156aba5f0510780 Mon Sep 17 00:00:00 2001
+From: Miao Wang <shankerwangmiao@gmail.com>
+Date: Sat, 10 Feb 2024 12:51:15 +0800
+Subject: [PATCH] lan: fix lan print fails on unsupported parameters
+
+After upgrading to ipmitool 1.8.19, ipmitool lan print can only print out
+`Set in Progress` and other parameters are missing on our servers. After
+bisecting, commit:
+
+ 351dad24a26f lan: Add processing of get/set specific CCs
+
+is identified to be the source of the problem, where the function
+get_lan_param_select is expected to consider severial error codes it
+receives as empty response. It then constructs an empty response in `p`
+and assigns `p` to `rc` and the control flow falls through to the
+default case, which prints the error code in verbose mode and should
+return `rc` instead of `NULL`.
+
+Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
+---
+ lib/ipmi_lanp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git lib/ipmi_lanp.c lib/ipmi_lanp.c
+index fe0046f..26e7365 100644
+--- lib/ipmi_lanp.c
++++ lib/ipmi_lanp.c
+@@ -245,7 +245,7 @@ get_lan_param_select(struct ipmi_intf *intf, uint8_t chan, int param, int select
+ specific_val2str(rsp->ccode,
+ get_lan_cc_vals,
+ completion_code_vals));
+- return NULL;
++ return rc;
+ }
+
+ p->data = rsp->data + 1;
diff --git a/sysutils/ipmitool/files/patch-lib_ipmi_sdr.c b/sysutils/ipmitool/files/patch-lib_ipmi_sdr.c
new file mode 100644
index 000000000000..961168c879d3
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-lib_ipmi_sdr.c
@@ -0,0 +1,35 @@
+Description: Fix soensor reading
+Author: mareedu srinivasa rao
+Origin: upstream, https://sourceforge.net/p/ipmitool/bugs/490/
+Bug: https://sourceforge.net/p/ipmitool/bugs/490/
+Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983082
+Forwarded: not-needed
+Last-Update: 2022-10-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: lib/ipmi_sdr.c
+===================================================================
+--- lib/ipmi_sdr.c
++++ lib/ipmi_sdr.c
+@@ -1799,7 +1799,7 @@ ipmi_sdr_print_sensor_fc(struct ipmi_int
+ sr->s_a_units);
+ } else /* Discrete */
+ snprintf(sval, sizeof(sval),
+- "0x%02x", sr->s_reading);
++ "0x%02x", sr->s_data2);
+ }
+ else if (sr->s_scanning_disabled)
+ snprintf(sval, sizeof (sval), sr->full ? "disabled" : "Not Readable");
+Index: lib/ipmi_sensor.c
+===================================================================
+--- lib/ipmi_sensor.c
++++ lib/ipmi_sensor.c
+@@ -201,7 +201,7 @@ ipmi_sensor_print_fc_discrete(struct ipm
+ sr->s_a_str, sr->s_a_units, "ok");
+ } else {
+ printf("| 0x%-8x | %-10s | 0x%02x%02x",
+- sr->s_reading, "discrete",
++ sr->s_data2, "discrete",
+ sr->s_data2, sr->s_data3);
+ }
+ } else {
diff --git a/sysutils/ipmitool/files/patch-sdr b/sysutils/ipmitool/files/patch-sdr
new file mode 100644
index 000000000000..b7c2ef8c2e9a
--- /dev/null
+++ b/sysutils/ipmitool/files/patch-sdr
@@ -0,0 +1,75 @@
+From 202f7427e0a4d1f319fc4b914676cc2f08da6c6c Mon Sep 17 00:00:00 2001
+From: Alexander Amelkin <alexander@amelkin.msk.ru>
+Date: Tue, 17 Sep 2024 15:15:45 +0300
+Subject: [PATCH] sdr: Refix 6e037d6bfbbb93b349c8ca331ebde03a (#41)
+
+A bug was introduced by commit 6e037d6bfbbb93b349c8ca331ebde03a837f76bf
+due to which the command `ipmitool sdr type` stopped accepting raw
+hex values for the type and would only accept strings.
+
+Fix that by partially reverting the troublesome commit.
+
+Additionally, apply the logic of that commit to calls of
+`strcasecmp()` in ipmi_sdr.c.
+
+Resolves https://codeberg.org/IPMITool/ipmitool/issues/41
+
+Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
+---
+ lib/ipmi_sdr.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git lib/ipmi_sdr.c lib/ipmi_sdr.c
+index abd4ee1..4732762 100644
+--- lib/ipmi_sdr.c
++++ lib/ipmi_sdr.c
+@@ -4570,8 +4570,9 @@ ipmi_sdr_print_type(struct ipmi_intf *intf, char *type)
+ uint8_t sensor_type = 0;
+
+ if (!type ||
+- strcasecmp(type, "help") == 0 ||
+- strcasecmp(type, "list") == 0) {
++ !strcasecmp(type, "help") ||
++ !strcasecmp(type, "list"))
++ {
+ printf("Sensor Types:\n");
+ for (x = 1; x < SENSOR_TYPE_MAX; x += 2) {
+ printf("\t%-25s (0x%02x) %-25s (0x%02x)\n",
+@@ -4581,7 +4582,7 @@ ipmi_sdr_print_type(struct ipmi_intf *intf, char *type)
+ return 0;
+ }
+
+- if (!strcmp(type, "0x")) {
++ if (!strncmp(type, "0x", 2)) {
+ /* begins with 0x so let it be entered as raw hex value */
+ if (str2uchar(type, &sensor_type) != 0) {
+ lprintf(LOG_ERR,
+@@ -4591,7 +4592,7 @@ ipmi_sdr_print_type(struct ipmi_intf *intf, char *type)
+ }
+ } else {
+ for (x = 1; x < SENSOR_TYPE_MAX; x++) {
+- if (strcasecmp(sensor_type_desc[x], type) == 0) {
++ if (!strcasecmp(sensor_type_desc[x], type)) {
+ sensor_type = x;
+ break;
+ }
+@@ -4638,8 +4639,8 @@ ipmi_sdr_print_entity(struct ipmi_intf *intf, char *entitystr)
+ int rc = 0;
+
+ if (!entitystr ||
+- strcasecmp(entitystr, "help") == 0 ||
+- strcasecmp(entitystr, "list") == 0) {
++ !strcasecmp(entitystr, "help") ||
++ !strcasecmp(entitystr, "list")) {
+ print_valstr_2col(entity_id_vals, "Entity IDs", -1);
+ return 0;
+ }
+@@ -4654,7 +4655,7 @@ ipmi_sdr_print_entity(struct ipmi_intf *intf, char *entitystr)
+
+ /* now try string input */
+ for (i = 0; entity_id_vals[i].str; i++) {
+- if (strcasecmp(entitystr, entity_id_vals[i].str) == 0) {
++ if (!strcasecmp(entitystr, entity_id_vals[i].str)) {
+ entity.id = entity_id_vals[i].val;
+ entity.instance = 0x7f;
+ j=1;
diff --git a/sysutils/k9s/Makefile b/sysutils/k9s/Makefile
index 834e9d9eee01..1da043c3e578 100644
--- a/sysutils/k9s/Makefile
+++ b/sysutils/k9s/Makefile
@@ -1,6 +1,6 @@
PORTNAME= k9s
DISTVERSIONPREFIX= v
-DISTVERSION= 0.50.4
+DISTVERSION= 0.50.6
CATEGORIES= sysutils
MAINTAINER= gogolok@gmail.com
@@ -10,11 +10,11 @@ WWW= https://github.com/derailed/k9s
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= go:1.21,modules
+USES= go:1.24,modules
GO_MODULE= github.com/derailed/k9s
GO_BUILDFLAGS= -ldflags="-X github.com/derailed/k9s/cmd.version=${DISTVERSIONFULL} \
-X github.com/derailed/k9s/cmd.date=$$(date +'%Y-%m-%dT%H:%M:%SZ') \
- -X github.com/derailed/k9s/cmd.commit=e4e38161857a202f09488c7ab3603a27de464ad4"
+ -X github.com/derailed/k9s/cmd.commit=13cb55bb66272ac4c872a1f6bfa3e820d7d0ca5b"
PLIST_FILES= bin/${PORTNAME}
diff --git a/sysutils/k9s/distinfo b/sysutils/k9s/distinfo
index 057c925d0896..a9c0dc4bd8a6 100644
--- a/sysutils/k9s/distinfo
+++ b/sysutils/k9s/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1745214113
-SHA256 (go/sysutils_k9s/k9s-v0.50.4/v0.50.4.mod) = c94e084dc6f13e2e8cfc09af8745d99d3dcc8a04409eedc5daa4de2e6104f75b
-SIZE (go/sysutils_k9s/k9s-v0.50.4/v0.50.4.mod) = 19254
-SHA256 (go/sysutils_k9s/k9s-v0.50.4/v0.50.4.zip) = 617ace92bcdc51d63a63888c070cac98c696345e11bb45be46e4e5fe75a5eaaa
-SIZE (go/sysutils_k9s/k9s-v0.50.4/v0.50.4.zip) = 7485788
+TIMESTAMP = 1747190791
+SHA256 (go/sysutils_k9s/k9s-v0.50.6/v0.50.6.mod) = c41f2e178e3e345e07d729f0b53d7f9c3f69f41cbb51ff8550df54bb3d742172
+SIZE (go/sysutils_k9s/k9s-v0.50.6/v0.50.6.mod) = 19270
+SHA256 (go/sysutils_k9s/k9s-v0.50.6/v0.50.6.zip) = 027bb14ec2a3c7211a2233f0eb5ed176de37ef21e4181ac76bf69962dc6b0471
+SIZE (go/sysutils_k9s/k9s-v0.50.6/v0.50.6.zip) = 7496880
diff --git a/sysutils/py-ansible-core/Makefile b/sysutils/py-ansible-core/Makefile
index 993c3ca2df07..d334c5a230f1 100644
--- a/sysutils/py-ansible-core/Makefile
+++ b/sysutils/py-ansible-core/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ansible-core
DISTVERSION= 2.18.5
+PORTREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -20,6 +21,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0.0:devel/py-Jinja2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}resolvelib>=0.5.3<1.1.0:devel/py-resolvelib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}toml>0:textproc/py-toml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}passlib>0:security/py-passlib@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyyaml>=5.1:devel/py-pyyaml@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bcrypt>=0:security/py-bcrypt@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} \
diff --git a/sysutils/screen49/Makefile b/sysutils/screen49/Makefile
index e05d5edb29f6..580f13c0a7c1 100644
--- a/sysutils/screen49/Makefile
+++ b/sysutils/screen49/Makefile
@@ -1,6 +1,6 @@
PORTNAME= screen
PORTVERSION= 4.9.1
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= GNU \
ftp://ftp.gnu.org/gnu/screen/ \
@@ -21,10 +21,6 @@ WWW= https://www.gnu.org/software/screen/
CONFLICTS+= screen-devel*
-FORBIDDEN= Contains multiple CVEs
-DEPRECATED= Contains multiple CVEs, use screen50 instead
-EXPIRATION_DATE=2025-06-31
-
LICENSE= GPLv3
OPTIONS_DEFINE= INFO NETHACK XTERM_256 SYSTEM_SCREENRC MULTIUSER \
diff --git a/sysutils/screen49/files/patch-attacher.c b/sysutils/screen49/files/patch-attacher.c
index 0f89189898e3..c5f670bb6ceb 100644
--- a/sysutils/screen49/files/patch-attacher.c
+++ b/sysutils/screen49/files/patch-attacher.c
@@ -1,6 +1,75 @@
---- attacher.c.orig 2003-09-08 07:24:48.000000000 -0700
-+++ attacher.c 2011-01-02 21:42:39.547897531 -0800
-@@ -662,7 +662,7 @@
+--- 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");
@@ -9,8 +78,8 @@
{
signal(SIGCHLD, SIG_DFL);
debug1("lockterminal: '%s' seems executable, execl it!\n", prg);
-@@ -676,7 +676,11 @@
- setuid(real_uid); /* this should be done already */
+@@ -751,7 +724,11 @@ LockTerminal()
+ Panic(errno, "setuid");
#endif
closeallfiles(0); /* important: /etc/shadow may be open */
- execl(prg, "SCREEN-LOCK", NULL);
diff --git a/sysutils/screen49/files/patch-configure.ac b/sysutils/screen49/files/patch-configure.ac
index 1f32616b3797..1fc7eb310d6a 100644
--- a/sysutils/screen49/files/patch-configure.ac
+++ b/sysutils/screen49/files/patch-configure.ac
@@ -1,6 +1,6 @@
---- configure.ac.orig 2023-08-15 17:29:26.000000000 -0700
-+++ configure.ac 2024-01-02 18:30:11.205776000 -0800
-@@ -669,7 +669,7 @@
+--- 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"
@@ -9,7 +9,7 @@
AC_CHECKING(libcurses)
AC_TRY_LINK([
#include <curses.h>
-@@ -756,19 +756,6 @@
+@@ -756,19 +756,6 @@ fi
fi
fi
@@ -29,7 +29,7 @@
AC_CHECK_FUNCS(getpt)
dnl check for openpty()
-@@ -900,11 +887,11 @@
+@@ -900,11 +887,11 @@ dnl
dnl
dnl **** utmp handling ****
dnl
@@ -43,7 +43,7 @@
#include <utmpx.h>
#define utmp utmpx
#else
-@@ -917,11 +904,11 @@
+@@ -917,11 +904,11 @@ LIBS="$LIBS -lgen"
[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
olibs="$LIBS"
LIBS="$LIBS -lgen"
@@ -57,7 +57,7 @@
#include <utmpx.h>
#define utmp utmpx
#else
-@@ -931,13 +918,13 @@
+@@ -931,13 +918,13 @@ AC_TRY_LINK([
#define pututline _pututline
#endif
],
diff --git a/sysutils/screen49/files/patch-doc__Makefile.in b/sysutils/screen49/files/patch-doc__Makefile.in
index 8666be063fe5..c90450268d09 100644
--- a/sysutils/screen49/files/patch-doc__Makefile.in
+++ b/sysutils/screen49/files/patch-doc__Makefile.in
@@ -1,7 +1,7 @@
---- doc/Makefile.in.orig 2014-04-29 20:26:42.618832001 -0700
-+++ doc/Makefile.in 2014-04-29 20:29:26.379384101 -0700
-@@ -31,7 +31,10 @@
- $(MAKEINFO) --no-split $(srcdir)/screen.texinfo -o screen.info
+--- 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)
@@ -11,8 +11,8 @@
-$(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-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/screen.info; \
+@@ -40,13 +43,19 @@ install: installdirs
+ install-info --info-dir=$(DESTDIR)$(infodir) $$d/screen.info; \
else true; fi; \
fi
+endif
diff --git a/sysutils/screen49/files/patch-misc.c b/sysutils/screen49/files/patch-misc.c
index 1364b230d55a..6ea949fbf7a4 100644
--- a/sysutils/screen49/files/patch-misc.c
+++ b/sysutils/screen49/files/patch-misc.c
@@ -1,4 +1,4 @@
---- misc.c.orig 2022-01-28 14:06:02 UTC
+--- misc.c.orig 2023-08-16 00:29:26 UTC
+++ misc.c
@@ -28,8 +28,10 @@
@@ -11,7 +11,7 @@
#include "config.h"
#include "screen.h"
-@@ -796,3 +798,17 @@
+@@ -720,3 +722,17 @@ xvsnprintf(char *s, int n, char *fmt, xva_list stack)
}
#endif
diff --git a/sysutils/screen49/files/patch-os.h b/sysutils/screen49/files/patch-os.h
index 80e7ec3c0bcb..ca0237af91ac 100644
--- a/sysutils/screen49/files/patch-os.h
+++ b/sysutils/screen49/files/patch-os.h
@@ -1,6 +1,6 @@
---- os.h.orig 2019-10-01 15:08:00.000000000 -0700
-+++ os.h 2019-10-28 19:37:41.585526000 -0700
-@@ -250,9 +250,11 @@
+--- 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)
@@ -23,7 +23,7 @@
#endif
#ifndef MAXPATHLEN
-@@ -524,6 +526,6 @@
+@@ -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 */
diff --git a/sysutils/screen49/files/patch-osdef.h.in b/sysutils/screen49/files/patch-osdef.h.in
index 3b32fe80ed81..c8249fc3d3bc 100644
--- a/sysutils/screen49/files/patch-osdef.h.in
+++ b/sysutils/screen49/files/patch-osdef.h.in
@@ -1,5 +1,5 @@
---- osdef.h.in.orig 2023-08-15 17:29:26.000000000 -0700
-+++ osdef.h.in 2024-07-17 20:59:56.936179000 -0700
+--- osdef.h.in.orig 2023-08-16 00:29:26 UTC
++++ osdef.h.in
@@ -28,6 +28,8 @@
****************************************************************
*/
@@ -9,7 +9,7 @@
extern int printf __P((char *, ...));
extern int fprintf __P((FILE *, char *, ...));
extern int sprintf __P((char *, char *, ...));
-@@ -71,6 +73,7 @@
+@@ -71,6 +73,7 @@ extern void bcopy __P((char *, char *, int));
#else
extern void bcopy __P((char *, char *, int));
#endif
diff --git a/sysutils/screen49/files/patch-resize.c b/sysutils/screen49/files/patch-resize.c
index a2af125f12ff..216fec9c1ab6 100644
--- a/sysutils/screen49/files/patch-resize.c
+++ b/sysutils/screen49/files/patch-resize.c
@@ -1,8 +1,8 @@
---- resize.c.orig Mon Sep 8 07:26:31 2003
-+++ resize.c Mon Dec 1 17:16:29 2003
-@@ -682,6 +682,17 @@
- if (wi == 0)
- he = hi = 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)
+ {
diff --git a/sysutils/screen49/files/patch-screen.c b/sysutils/screen49/files/patch-screen.c
index 50b28c02a955..bde83a3b06cc 100644
--- a/sysutils/screen49/files/patch-screen.c
+++ b/sysutils/screen49/files/patch-screen.c
@@ -1,6 +1,115 @@
---- screen.c.orig 2017-07-10 12:26:25.000000000 -0700
-+++ screen.c 2017-08-25 20:20:20.471073000 -0700
-@@ -2214,7 +2214,7 @@
+--- 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) {
diff --git a/sysutils/screen49/files/patch-socket.c b/sysutils/screen49/files/patch-socket.c
index cfa52856c2e7..01bd213ae5c4 100644
--- a/sysutils/screen49/files/patch-socket.c
+++ b/sysutils/screen49/files/patch-socket.c
@@ -1,84 +1,97 @@
---- socket.c.orig 2022-01-28 14:06:02 UTC
+--- socket.c.orig 2025-05-13 14:58:03 UTC
+++ socket.c
-@@ -141,12 +141,14 @@
- char *firstn = NULL;
- int nfound = 0, ngood = 0, ndead = 0, nwipe = 0, npriv = 0;
- int nperfect = 0;
-+ char timestr[64];
- struct sent
- {
- struct sent *next;
- int mode;
- char *name;
-- } *slist, **slisttail, *sent, *nsent;
-+ time_t time_created;
-+ } *slist, **slisttail, *sent, *nsent, *schosen;
+@@ -171,8 +171,13 @@ bool *is_sock;
+ xsetegid(real_gid);
+ #endif
- if (match)
- {
-@@ -258,8 +260,13 @@
- sent->next = 0;
- sent->name = SaveStr(name);
- sent->mode = mode;
-+ sent->time_created = SessionCreationTime(name);
-+ for (slisttail = &slist; *slisttail; slisttail = &((*slisttail)->next))
-+ {
-+ if ((*slisttail)->time_created < sent->time_created) break;
-+ }
-+ sent->next = *slisttail;
- *slisttail = sent;
-- slisttail = &sent->next;
- nfound++;
- sockfd = MakeClientSocket(0, *is_sock);
- #ifdef USE_SETEUID
-@@ -359,34 +366,42 @@
- }
- for (sent = slist; sent; sent = sent->next)
+- 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;
{
-+ if (sent->time_created == 0)
-+ {
-+ sprintf(timestr, "??" "?");
-+ }
-+ else
-+ {
-+ strftime(timestr, 64, "%x %X", localtime(&sent->time_created));
-+ }
- switch (sent->mode)
- {
- case 0700:
-- printf("\t%s\t(Attached)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Attached)\n", sent->name, timestr);
- break;
- case 0600:
-- printf("\t%s\t(Detached)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Detached)\n", sent->name, timestr);
- break;
+ 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
- case 0701:
-- printf("\t%s\t(Multi, attached)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Multi, attached)\n", sent->name, timestr);
- break;
- case 0601:
-- printf("\t%s\t(Multi, detached)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Multi, detached)\n", sent->name, timestr);
- break;
+ if (attach)
+- Kill(pid, SIGCONT);
++ KillUnpriv(pid, SIGCONT);
#endif
- case -1:
- /* No trigraphs here! */
-- printf("\t%s\t(Dead ?%c?)\n", sent->name, '?');
-+ printf("\t%s\t(%s)\t(Dead ?%c?)\n", sent->name, timestr, '?');
- break;
- case -2:
-- printf("\t%s\t(Removed)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Removed)\n", sent->name, timestr);
- break;
- case -3:
-- printf("\t%s\t(Remote or dead)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Remote or dead)\n", sent->name, timestr);
- break;
- case -4:
-- printf("\t%s\t(Private)\n", sent->name);
-+ printf("\t%s\t(%s)\t(Private)\n", sent->name, timestr);
- break;
- }
+
+ #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
index cbe7a90f11a2..a7abaa54ce81 100644
--- a/sysutils/screen49/files/patch-termcap.c
+++ b/sysutils/screen49/files/patch-termcap.c
@@ -1,6 +1,6 @@
---- termcap.c.orig 2020-02-05 12:09:38.000000000 -0800
-+++ termcap.c 2020-02-11 20:10:12.747990000 -0800
-@@ -361,11 +361,7 @@
+--- 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)
diff --git a/sysutils/screen49/files/patch-terminfo__checktc.c b/sysutils/screen49/files/patch-terminfo__checktc.c
index d4ffb75cc0c1..7c38ac40c386 100644
--- a/sysutils/screen49/files/patch-terminfo__checktc.c
+++ b/sysutils/screen49/files/patch-terminfo__checktc.c
@@ -1,6 +1,6 @@
---- terminfo/checktc.c.orig Fri Sep 29 09:13:22 1995
-+++ terminfo/checktc.c Tue Apr 22 20:37:18 2003
-@@ -171,6 +171,7 @@
+--- terminfo/checktc.c.orig 2023-08-16 00:29:26 UTC
++++ terminfo/checktc.c
+@@ -171,6 +171,7 @@ char *s;
fflush(stdout);
}
@@ -8,7 +8,7 @@
void CPutStr(s, c)
char *s;
int c;
-@@ -178,6 +179,7 @@
+@@ -178,6 +179,7 @@ int c;
tputs(tgoto(s, 0, c), 1, putcha);
fflush(stdout);
}
diff --git a/sysutils/screen49/files/patch-utmp.c b/sysutils/screen49/files/patch-utmp.c
index 0573d96ceab5..e019f8cedc09 100644
--- a/sysutils/screen49/files/patch-utmp.c
+++ b/sysutils/screen49/files/patch-utmp.c
@@ -1,5 +1,5 @@
---- utmp.c.orig 2023-08-15 17:29:26.000000000 -0700
-+++ utmp.c 2023-08-19 08:57:48.376313000 -0700
+--- utmp.c.orig 2023-08-16 00:29:26 UTC
++++ utmp.c
@@ -26,6 +26,7 @@
****************************************************************
*/
@@ -8,7 +8,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-@@ -89,11 +90,13 @@
+@@ -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
@@ -22,7 +22,7 @@
#if defined(linux) && defined(GETUTENT)
static struct utmp *xpututline __P((struct utmp *utmp));
# define pututline xpututline
-@@ -102,9 +105,7 @@
+@@ -102,9 +105,7 @@ static char UtmpName[] = UTMPFILE;
static int utmpok;
static char UtmpName[] = UTMPFILE;
@@ -32,7 +32,7 @@
# if defined(GETUTENT) && (!defined(SVR4) || defined(__hpux)) && ! defined(__CYGWIN__)
-@@ -409,12 +410,6 @@
+@@ -409,12 +410,6 @@ struct win *wi;
register slot_t slot;
struct utmp u;
int saved_ut;
@@ -45,7 +45,7 @@
wi->w_slot = (slot_t)0;
if (!utmpok || wi->w_type != W_TYPE_PTY)
-@@ -435,51 +430,13 @@
+@@ -435,51 +430,13 @@ struct win *wi;
makeuser(&u, stripdev(wi->w_tty), LoginName, wi->w_pid);
#ifdef UTHOST
@@ -100,7 +100,7 @@
{
Msg(errno,"Could not write %s", UtmpName);
UT_CLOSE;
-@@ -607,7 +564,7 @@
+@@ -607,7 +564,7 @@ struct utmp *u;
struct utmp *u;
{
u->ut_type = DEAD_PROCESS;
@@ -109,7 +109,7 @@
u->ut_exit.e_termination = 0;
u->ut_exit.e_exit = 0;
#endif
-@@ -640,7 +597,11 @@
+@@ -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);
@@ -122,7 +122,7 @@
}
static slot_t
-@@ -670,6 +631,7 @@
+@@ -670,6 +631,7 @@ initutmp()
return (utmpfd = open(UtmpName, O_RDWR)) >= 0;
}
@@ -130,7 +130,7 @@
static void
setutent()
{
-@@ -694,6 +656,7 @@
+@@ -694,6 +656,7 @@ getutent()
return 0;
return &uent;
}
@@ -138,7 +138,7 @@
static struct utmp *
getutslot(slot)
-@@ -750,9 +713,13 @@
+@@ -750,9 +713,13 @@ int pid;
{
time_t now;
strncpy(u->ut_line, line, sizeof(u->ut_line));