mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b7478ff43 | ||
|
|
6c4c16cbdb | ||
|
|
e539dbfe37 | ||
|
|
90c6bcd365 | ||
|
|
c9c268f218 | ||
|
|
3feff37ba5 | ||
|
|
c67d15e272 | ||
|
|
8984c655f8 | ||
|
|
1a7b26bac3 | ||
|
|
1f47718012 | ||
|
|
fa13cddc28 |
@@ -3,6 +3,19 @@ Change Log
|
|||||||
|
|
||||||
All relevant changes are documented in this file.
|
All relevant changes are documented in this file.
|
||||||
|
|
||||||
|
|
||||||
|
[4.12][] - 2025-04-28
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Improve notify:s6 readiness compatibility, by Aaron Andersen
|
||||||
|
- Update `runparts` usage text
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Fix variable overloading in urandom plugin
|
||||||
|
- Fix buffer overwrite in urandom plugin, reported by Aaron Andersen
|
||||||
|
|
||||||
|
|
||||||
[4.11][] - 2025-03-27
|
[4.11][] - 2025-03-27
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
@@ -1785,6 +1798,7 @@ Major bug fix release.
|
|||||||
* Initial release
|
* Initial release
|
||||||
|
|
||||||
[UNRELEASED]: https://github.com/troglobit/finit/compare/4.11...HEAD
|
[UNRELEASED]: https://github.com/troglobit/finit/compare/4.11...HEAD
|
||||||
|
[4.12]: https://github.com/troglobit/finit/compare/4.11...4.12
|
||||||
[4.11]: https://github.com/troglobit/finit/compare/4.10...4.11
|
[4.11]: https://github.com/troglobit/finit/compare/4.10...4.11
|
||||||
[4.10]: https://github.com/troglobit/finit/compare/4.9...4.10
|
[4.10]: https://github.com/troglobit/finit/compare/4.9...4.10
|
||||||
[4.9]: https://github.com/troglobit/finit/compare/4.8...4.9
|
[4.9]: https://github.com/troglobit/finit/compare/4.8...4.9
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ All services in runlevel S) are started first, followed by the desired
|
|||||||
run-time runlevel. Run tasks in runlevel S can be started in sequence
|
run-time runlevel. Run tasks in runlevel S can be started in sequence
|
||||||
by using `run [S] cmd`. Changing runlevels at runtime is done like any
|
by using `run [S] cmd`. Changing runlevels at runtime is done like any
|
||||||
other init, e.g. <kbd>init 4</kbd>, but also using the more advanced
|
other init, e.g. <kbd>init 4</kbd>, but also using the more advanced
|
||||||
`intictl` tool.
|
[`initctl`](#commands--status) tool.
|
||||||
|
|
||||||
|
|
||||||
**Conditions**
|
**Conditions**
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([Finit], [4.11], [https://github.com/troglobit/finit/issues],
|
AC_INIT([Finit], [4.12], [https://github.com/troglobit/finit/issues],
|
||||||
[finit], [https://troglobit.com/projects/finit/])
|
[finit], [https://troglobit.com/projects/finit/])
|
||||||
AC_CONFIG_AUX_DIR(aux)
|
AC_CONFIG_AUX_DIR(aux)
|
||||||
AM_INIT_AUTOMAKE([1.11 foreign dist-xz subdir-objects])
|
AM_INIT_AUTOMAKE([1.11 foreign dist-xz subdir-objects])
|
||||||
|
|||||||
+8
-5
@@ -78,6 +78,7 @@ static void setup(void *arg)
|
|||||||
{
|
{
|
||||||
#ifdef RANDOMSEED
|
#ifdef RANDOMSEED
|
||||||
struct rand_pool_info *rpi;
|
struct rand_pool_info *rpi;
|
||||||
|
unsigned char *rpi_buf;
|
||||||
ssize_t len = 0;
|
ssize_t len = 0;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int rc = -1;
|
int rc = -1;
|
||||||
@@ -103,13 +104,14 @@ static void setup(void *arg)
|
|||||||
hw = fopen(hwrng, "r");
|
hw = fopen(hwrng, "r");
|
||||||
if (hw) {
|
if (hw) {
|
||||||
char buf[512];
|
char buf[512];
|
||||||
size_t len;
|
size_t num;
|
||||||
|
|
||||||
len = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
|
num = fread(buf, sizeof(buf[0]), sizeof(buf), hw);
|
||||||
if (len == 0)
|
if (num == 0)
|
||||||
fallback(fp);
|
fallback(fp);
|
||||||
else
|
else
|
||||||
len = fwrite(buf, sizeof(buf[0]), len, fp);
|
fwrite(buf, sizeof(buf[0]), num, fp);
|
||||||
|
|
||||||
fclose(hw);
|
fclose(hw);
|
||||||
} else {
|
} else {
|
||||||
fallback(fp);
|
fallback(fp);
|
||||||
@@ -137,10 +139,11 @@ static void setup(void *arg)
|
|||||||
goto fallback;
|
goto fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpi_buf = (unsigned char *)rpi->buf;
|
||||||
do {
|
do {
|
||||||
ssize_t num;
|
ssize_t num;
|
||||||
|
|
||||||
num = read(fd, &rpi->buf[len], RANDOM_BYTES - len);
|
num = read(fd, &rpi_buf[len], RANDOM_BYTES - len);
|
||||||
if (num <= 0) {
|
if (num <= 0) {
|
||||||
if (num == -1 && errno == EINTR)
|
if (num == -1 && errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
+7
-7
@@ -96,16 +96,16 @@ enum cond_state cond_get(const char *name)
|
|||||||
|
|
||||||
enum cond_state cond_get_agg(const char *names)
|
enum cond_state cond_get_agg(const char *names)
|
||||||
{
|
{
|
||||||
static char conds[MAX_COND_LEN];
|
|
||||||
enum cond_state s = COND_ON;
|
enum cond_state s = COND_ON;
|
||||||
char *cond;
|
|
||||||
|
|
||||||
if (!names)
|
if (names) {
|
||||||
return COND_ON;
|
char conds[strlen(names) + 1];
|
||||||
|
const char *cond;
|
||||||
|
|
||||||
strlcpy(conds, names, sizeof(conds));
|
strlcpy(conds, names, sizeof(conds));
|
||||||
for (cond = strtok(conds, ","); s && cond; cond = strtok(NULL, ","))
|
for (cond = strtok(conds, ","); s && cond; cond = strtok(NULL, ","))
|
||||||
s = min(s, cond_get(cond));
|
s = min(s, cond_get(cond));
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -193,7 +193,7 @@ int run_parts(char *dir, char *cmd, const char *env[], int progress, int sysv)
|
|||||||
#ifndef __FINIT__
|
#ifndef __FINIT__
|
||||||
static int usage(int rc)
|
static int usage(int rc)
|
||||||
{
|
{
|
||||||
warnx("usage: runparts [-dhps?] DIRECTORY");
|
warnx("usage: runparts [-bdhps?] DIRECTORY");
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -2912,7 +2912,7 @@ void service_notify_cb(uev_t *w, void *arg, int events)
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = read(w->fd, buf, sizeof(buf) - 1);
|
len = read(w->fd, buf, sizeof(buf) - 1);
|
||||||
if (len == -1) {
|
if (len <= 0) {
|
||||||
warn("Failed reading notification from %s", svc_ident(svc, NULL, 0));
|
warn("Failed reading notification from %s", svc_ident(svc, NULL, 0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2920,7 +2920,7 @@ void service_notify_cb(uev_t *w, void *arg, int events)
|
|||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
|
|
||||||
/* systemd and s6, respectively. The latter then closes the socket */
|
/* systemd and s6, respectively. The latter then closes the socket */
|
||||||
if (!strcmp(buf, "READY=1\n") || !strcmp(buf, "\n")) {
|
if (!strcmp(buf, "READY=1\n") || buf[len - 1] == '\n') {
|
||||||
/*
|
/*
|
||||||
* native (pidfile) services are marked as started by
|
* native (pidfile) services are marked as started by
|
||||||
* the pidfile plugin.
|
* the pidfile plugin.
|
||||||
|
|||||||
Reference in New Issue
Block a user