summaryrefslogtreecommitdiff
path: root/system/sysvinit
diff options
context:
space:
mode:
Diffstat (limited to 'system/sysvinit')
-rw-r--r--system/sysvinit/APKBUILD10
-rw-r--r--system/sysvinit/bounds.patch19
-rw-r--r--system/sysvinit/utmpx.patch22
3 files changed, 36 insertions, 15 deletions
diff --git a/system/sysvinit/APKBUILD b/system/sysvinit/APKBUILD
index 1532dfd35..bc7db3d00 100644
--- a/system/sysvinit/APKBUILD
+++ b/system/sysvinit/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=sysvinit
-pkgver=3.11
+pkgver=3.14
pkgrel=0
pkgdesc="System V-style init programs"
url="https://savannah.nongnu.org/projects/sysvinit"
@@ -14,8 +14,9 @@ install="sysvinit.post-upgrade sysvinit.post-install"
provides="/sbin/init=0"
subpackages="$pkgname-doc"
source="https://github.com/slicer69/sysvinit/releases/download/$pkgver/$pkgname-$pkgver.tar.xz
- inittab-2.88
+ bounds.patch
utmpx.patch
+ inittab-2.88
s6-svscanboot
"
@@ -71,7 +72,8 @@ package() {
_install_s6_stuff
}
-sha512sums="12e2d11b76702b493e8f083e5409b98a1daf41a8d9fb7ef8a36416bb0310d5a26b92eaee0c9396c03cf08842258b953f79541ae147ef730f3bc54530da4d1029 sysvinit-3.11.tar.xz
+sha512sums="d2b7279523b301b3d7325c5cf9acef8f9fcc35199dc0f284eee22306c2cb96b42f9a27375a7877033c4d3b16b30fb32c1be32c3665fd2cba183630e008a682a3 sysvinit-3.14.tar.xz
+f845750b21d5504e56b0841f3b299ae33770399456da9db6a155d1294a1f27daa68ccc4b078ccb83f1f72d559b87674207b6703043e9a85d1479ec857ecf2c09 bounds.patch
+033fb17f7e02bddf1068e5565e3a578abfd2c8caba4a67640a4da8d25e40fd38d3d2d624ebf8818465ebd1d0cd83424608df57c57730ab4283a20aead9023f70 utmpx.patch
87668b49690091a227c0384fd2400f1006d24c27cc27a25efa7eba56839ccb1eead00b58ce4b654eab9c0208d68aa2cbb888fd5f2990905845aa9688442a69a0 inittab-2.88
-78d04e33099de13b40243ac0be3e93bf4f2addcee3155c799e711ffec0dc003bf416d956d302aba92ec3e80d2dc6b2d73da0133e3466fce49531f672190ca2d9 utmpx.patch
e52fd49daa5abfc583f1973f3428b1e00a71e7136a8bc6418e94b345d53ef250b3b3c3bee389fe37872b26a78d0957ae852e221428f33b2c728dfd3d50b59634 s6-svscanboot"
diff --git a/system/sysvinit/bounds.patch b/system/sysvinit/bounds.patch
new file mode 100644
index 000000000..bf30d56e2
--- /dev/null
+++ b/system/sysvinit/bounds.patch
@@ -0,0 +1,19 @@
+--- sysvinit-3.14/src/dowall.c.old 2025-06-24 02:38:56.414501867 -0500
++++ sysvinit-3.14/src/dowall.c 2025-06-25 01:36:34.943110622 -0500
+@@ -44,6 +44,7 @@
+ #ifndef HOST_NAME_MAX
+ # define HOST_NAME_MAX 255
+ #endif
++#define MIN(a,b) (((a)<(b))?(a):(b))
+
+ static sigjmp_buf jbuf;
+
+@@ -226,7 +227,7 @@
+ utmp->ut_user[0] == 0) continue;
+ if (strncmp(utmp->ut_line, _PATH_DEV, strlen(_PATH_DEV)) == 0) {
+ term[0] = 0;
+- strncat(term, utmp->ut_line, sizeof(term)-1);
++ strncat(term, utmp->ut_line, MIN(UT_LINESIZE,sizeof(term)-1));
+ } else
+ snprintf(term, sizeof(term), _PATH_DEV "%.*s",
+ UT_LINESIZE, utmp->ut_line);
diff --git a/system/sysvinit/utmpx.patch b/system/sysvinit/utmpx.patch
index e839a0834..195532b4c 100644
--- a/system/sysvinit/utmpx.patch
+++ b/system/sysvinit/utmpx.patch
@@ -10,7 +10,7 @@ diff -ur a/src/dowall.c b/src/dowall.c
#include <pwd.h>
#include <fcntl.h>
#include <signal.h>
-@@ -160,7 +160,7 @@
+@@ -161,7 +161,7 @@
{
FILE *tp;
struct sigaction sa;
@@ -19,7 +19,7 @@ diff -ur a/src/dowall.c b/src/dowall.c
time_t t;
char term[UT_LINESIZE+ strlen(_PATH_DEV) + 1];
char line[256];
-@@ -217,9 +217,9 @@
+@@ -220,9 +220,9 @@
sigemptyset(&sa.sa_mask);
sigaction(SIGALRM, &sa, NULL);
@@ -31,7 +31,7 @@ diff -ur a/src/dowall.c b/src/dowall.c
if(utmp->ut_type != USER_PROCESS ||
utmp->ut_user[0] == 0) continue;
if (strncmp(utmp->ut_line, _PATH_DEV, strlen(_PATH_DEV)) == 0) {
-@@ -253,7 +253,7 @@
+@@ -256,7 +256,7 @@
if (fd >= 0) close(fd);
if (tp != NULL) fclose(tp);
}
@@ -105,7 +105,7 @@ diff -ur a/src/init.c b/src/init.c
char *console_dev; /* Console device. */
int pipe_fd = -1; /* /run/initctl */
int did_boot = 0; /* Did we already do BOOT* stuff? */
-@@ -2332,12 +2328,6 @@
+@@ -2367,12 +2363,6 @@
static
void redo_utmp_wtmp(void)
{
@@ -118,7 +118,7 @@ diff -ur a/src/init.c b/src/init.c
if ((wrote_wtmp_reboot == 0) || (wrote_utmp_reboot == 0))
write_utmp_wtmp("reboot", "~~", 0, BOOT_TIME, "~");
-@@ -2879,8 +2869,6 @@
+@@ -2914,8 +2904,6 @@
console_init();
if (!reload) {
@@ -127,7 +127,7 @@ diff -ur a/src/init.c b/src/init.c
/* Close whatever files are open, and reset the console. */
close(0);
close(1);
-@@ -2894,13 +2882,6 @@
+@@ -2929,13 +2917,6 @@
setenv("PATH", PATH_DEFAULT, 1 /* Overwrite */);
/*
@@ -198,7 +198,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c
#include <syslog.h>
#include "paths.h"
#include "reboot.h"
-@@ -355,6 +351,9 @@
+@@ -358,6 +354,9 @@
for(i = 3; i < 20; i++) close(i);
close(255);
@@ -208,7 +208,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c
/* First idle init. */
if (kill(1, SIGTSTP) < 0) {
fprintf(stderr, "shutdown: can't idle init: %s.\r\n", strerror(errno));
-@@ -381,9 +380,6 @@
+@@ -384,9 +383,6 @@
/* Give init the chance to collect zombies. */
/* sleep(1); */
@@ -218,7 +218,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c
/* This is for those who have quota installed. */
#if defined(ACCTON_OFF)
# if (ACCTON_OFF > 1) && (_BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500))
-@@ -514,7 +510,7 @@
+@@ -517,7 +513,7 @@
struct sigaction sa;
struct tm *lt;
struct stat st;
@@ -227,7 +227,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c
time_t t, target_time;
char *halttype;
char *downusers[32];
-@@ -634,7 +630,7 @@
+@@ -637,7 +633,7 @@
fclose(fp);
/* Now walk through /var/run/utmp to find logged in users. */
@@ -236,7 +236,7 @@ diff -ur a/src/shutdown.c b/src/shutdown.c
/* See if this is a user process on a VC. */
if (ut->ut_type != USER_PROCESS) continue;
-@@ -660,7 +656,7 @@
+@@ -663,7 +659,7 @@
break;
}
}