* Re: [PATCH 01/14] setpriv: make message for failing PR_GET_PDEATHSIG the same as the other
From: Karel Zak @ 2025-02-12 10:01 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20250209082330.4235-1-bensberg@telfort.nl>
On Sun, Feb 09, 2025 at 09:23:17AM GMT, Benno Schulenberg wrote:
> sys-utils/setpriv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied (all 14 patches), thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* [PATCH 01/10] colrm: make the wording of the doc string analogous to that of `col`
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
Which allows removing an awkwardly placed and rather redundant sentence.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
text-utils/colrm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/text-utils/colrm.c b/text-utils/colrm.c
index 363d732b6..b1370ac81 100644
--- a/text-utils/colrm.c
+++ b/text-utils/colrm.c
@@ -63,12 +63,10 @@ static void __attribute__((__noreturn__)) usage(void)
program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
- fputs(_("Filter out the specified columns.\n"), out);
+ fputs(_("Filter out the specified columns from standard input.\n"), out);
fputs(USAGE_OPTIONS, out);
fprintf(out, USAGE_HELP_OPTIONS(16));
- fprintf(out, _("%s reads from standard input and writes to standard output\n\n"),
- program_invocation_short_name);
fprintf(out, USAGE_MAN_TAIL("colrm(1)"));
exit(EXIT_SUCCESS);
}
--
2.48.1
^ permalink raw reply related
* [PATCH 02/10] setterm: put an option and its description in a single message
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
And improve a bit of markup and a wording in the man page.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
term-utils/setterm.1.adoc | 4 ++--
term-utils/setterm.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/term-utils/setterm.1.adoc b/term-utils/setterm.1.adoc
index 38dc81ab5..3fdee3283 100644
--- a/term-utils/setterm.1.adoc
+++ b/term-utils/setterm.1.adoc
@@ -115,14 +115,14 @@ Sets the VESA powerdown interval in minutes. Without an argument, it defaults to
*--powersave* _mode_::
Valid values for _mode_ are:
-*vsync|on*;;
+*vsync*|*on*;;
Puts the monitor into VESA vsync suspend mode.
*hsync*;;
Puts the monitor into VESA hsync suspend mode.
*powerdown*;;
Puts the monitor into VESA powerdown mode.
*off*;;
-Turns monitor VESA powersaving features.
+Turns the monitor's powersaving features off.
*--regtabs*[**=**1-160]::
Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number of positions. Without an argument, it defaults to *8*. Virtual consoles only.
diff --git a/term-utils/setterm.c b/term-utils/setterm.c
index 53bc6785d..801095c87 100644
--- a/term-utils/setterm.c
+++ b/term-utils/setterm.c
@@ -430,8 +430,8 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" --file <filename> name of the dump file\n"), out);
fputs(USAGE_SEPARATOR, out);
- fputs(_(" --powersave on|vsync|hsync|powerdown|off\n"), out);
- fputs(_(" set vesa powersaving features\n"), out);
+ fputs(_(" --powersave on|vsync|hsync|powerdown|off\n"
+ " set vesa powersaving features\n"), out);
fputs(_(" --powerdown[=<0-60>] set vesa powerdown interval in minutes\n"), out);
fputs(USAGE_SEPARATOR, out);
--
2.48.1
^ permalink raw reply related
* [PATCH 03/10] setterm: mark literal values in the man page in bold
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
Also, add a few commas for readability, tweak some wordings,
and add a "T" that was lost six years ago in commit bc6439ba32.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
term-utils/setterm.1.adoc | 52 ++++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/term-utils/setterm.1.adoc b/term-utils/setterm.1.adoc
index 3fdee3283..1e6c2f5e1 100644
--- a/term-utils/setterm.1.adoc
+++ b/term-utils/setterm.1.adoc
@@ -23,7 +23,13 @@ setterm - set terminal attributes
== DESCRIPTION
-*setterm* writes to standard output a character string that will invoke the specified terminal capabilities. Where possible _terminfo_ is consulted to find the string to use. Some options however (marked "virtual consoles only" below) do not correspond to a *terminfo*(5) capability. In this case, if the terminal type is "con" or "linux" the string that invokes the specified capabilities on the PC Minix virtual console driver is output. Options that are not implemented by the terminal are ignored.
+*setterm* writes to standard output a character string that will invoke the
+specified terminal capabilities. Where possible, _terminfo_ is consulted to
+find the string to use. Some options (marked "virtual consoles only" below)
+do not correspond to a *terminfo*(5) capability. In these cases, if the
+terminal type is "con" or "linux", the string that invokes the specified
+capability on the PC Minix virtual console is output. Options that are
+not implemented by the terminal are ignored.
== OPTIONS
@@ -37,16 +43,16 @@ The various color options may be set independently, at least on virtual consoles
The optional arguments are recommended with '=' (equals sign) and not space between the option and the argument. For example --option=argument. *setterm* can interpret the next non-option argument as an optional argument too.
-*--appcursorkeys* on|off::
+*--appcursorkeys* **on**|**off**::
Sets Cursor Key Application Mode on or off. When on, ESC O A, ESC O B, etc. will be sent for the cursor keys instead of ESC [ A, ESC [ B, etc. See the _vi and Cursor-Keys_ section of the _Text-Terminal-HOWTO_ for how this can cause problems for *vi* users. Virtual consoles only.
*--append* _console_number_::
Like *--dump*, but appends to the snapshot file instead of overwriting it. Only works if no *--dump* options are given.
-*--background* __8-color__|default::
+*--background* __8-color__|**default**::
Sets the background text color.
-*--blank*[**=**0-60|force|poke]::
+*--blank*[**=0**-**60**|**force**|**poke**]::
Sets the interval of inactivity, in minutes, after which the screen will be automatically blanked (using APM if available). Without an argument, it gets the blank status (returns which vt was blanked, or zero for an unblanked vt). Virtual consoles only.
+
The *force* argument keeps the screen blank even if a key is pressed.
@@ -56,22 +62,22 @@ The *poke* argument unblanks the screen.
*--bfreq*[**=**_number_]::
Sets the bell frequency in Hertz. Without an argument, it defaults to *0*. Virtual consoles only.
-*--blength*[**=**0-2000]::
+*--blength*[**=0**-**2000**]::
Sets the bell duration in milliseconds. Without an argument, it defaults to *0*. Virtual consoles only.
-*--blink* on|off::
+*--blink* **on**|**off**::
Turns blink mode on or off. Except on a virtual console, *--blink off* turns off all attributes (bold, half-brightness, blink, reverse).
-*--bold* on|off::
-urns bold (extra bright) mode on or off. Except on a virtual console, *--bold off* turns off all attributes (bold, half-brightness, blink, reverse).
+*--bold* **on**|**off**::
+Turns bold (extra bright) mode on or off. Except on a virtual console, *--bold off* turns off all attributes (bold, half-brightness, blink, reverse).
-*--clear*[**=**all|rest]::
+*--clear*[**=all**|**rest**]::
Without an argument or with the argument *all*, the entire screen is cleared and the cursor is set to the home position, just like *clear*(1) does. With the argument *rest*, the screen is cleared from the current cursor position to the end.
*--clrtabs*[**=**_tab1 tab2 tab3_ ...]::
-Clears tab stops from the given horizontal cursor positions, in the range *1-160*. Without arguments, it clears all tab stops. Virtual consoles only.
+Clears tab stops from the given horizontal cursor positions, in the range *1*-*160*. Without arguments, it clears all tab stops. Virtual consoles only.
-*--cursor* on|off::
+*--cursor* **on**|**off**::
Turns the terminal's cursor on or off.
*--default*::
@@ -83,10 +89,10 @@ Writes a snapshot of the virtual console with the given number to the file speci
*--file* _filename_::
Sets the snapshot file name for any *--dump* or *--append* options on the same command line. If this option is not present, the default is _screen.dump_ in the current directory. A path name that exceeds the system maximum will be truncated, see *PATH_MAX* from _linux/limits.h_ for the value.
-*--foreground* __8-color__|default::
+*--foreground* __8-color__|**default**::
Sets the foreground text color.
-*--half-bright* on|off::
+*--half-bright* **on**|**off**::
Turns dim (half-brightness) mode on or off. Except on a virtual console, *--half-bright off* turns off all attributes (bold, half-brightness, blink, reverse).
*--hbcolor* _16-color_::
@@ -95,21 +101,21 @@ Sets the color for half-bright characters.
*--initialize*::
Displays the terminal initialization string, which typically sets the terminal's rendering options, and other attributes to the default values.
-*--inversescreen* on|off::
+*--inversescreen* **on**|**off**::
Swaps foreground and background colors for the whole screen.
-*--linewrap* on|off::
+*--linewrap* **on**|**off**::
Makes the terminal continue on a new line when a line is full.
-*--msg* on|off::
+*--msg* **on**|**off**::
Enables or disables the sending of kernel *printk*() messages to the console. Virtual consoles only.
-*--msglevel* 0-8::
+*--msglevel* **0**-**8**::
Sets the console logging level for kernel *printk()* messages. All messages strictly more important than this will be printed, so a logging level of *0* has the same effect as *--msg on* and a logging level of *8* will print all kernel messages. *klogd*(8) may be a more convenient interface to the logging of kernel messages.
+
Virtual consoles only.
-*--powerdown*[**=**0-60]::
+*--powerdown*[**=0**-**60**]::
Sets the VESA powerdown interval in minutes. Without an argument, it defaults to *0* (disable powerdown). If the console is blanked or the monitor is in suspend mode, then the monitor will go into vsync suspend mode or powerdown mode respectively after this period of time has elapsed.
*--powersave* _mode_::
@@ -124,10 +130,10 @@ Puts the monitor into VESA powerdown mode.
*off*;;
Turns the monitor's powersaving features off.
-*--regtabs*[**=**1-160]::
+*--regtabs*[**=1**-**160**]::
Clears all tab stops, then sets a regular tab stop pattern, with one tab every specified number of positions. Without an argument, it defaults to *8*. Virtual consoles only.
-*--repeat* on|off::
+*--repeat* **on**|**off**::
Turns keyboard repeat on or off. Virtual consoles only.
*--reset*::
@@ -136,14 +142,14 @@ Displays the terminal reset string, which typically resets the terminal to its p
*--resize*::
Reset terminal size by assessing maximum row and column. This is useful when actual geometry and kernel terminal driver are not in sync. Most notable use case is with serial consoles, that do not use *ioctl*(2) but just byte streams and breaks.
-*--reverse* on|off::
+*--reverse* **on**|**off**::
Turns reverse video mode on or off. Except on a virtual console, *--reverse off* turns off all attributes (bold, half-brightness, blink, reverse).
*--store*::
Stores the terminal's current rendering options (foreground and background colors) as the values to be used at reset-to-default. Virtual consoles only.
*--tabs*[**=**_tab1 tab2 tab3_ ...]::
-Sets tab stops at the given horizontal cursor positions, in the range *1-160*. Without arguments, it shows the current tab stop settings.
+Sets tab stops at the given horizontal cursor positions, in the range *1*-*160*. Without arguments, it shows the current tab stop settings.
*--term* _terminal_name_::
Overrides the *TERM* environment variable.
@@ -151,7 +157,7 @@ Overrides the *TERM* environment variable.
*--ulcolor* _16-color_::
Sets the color for underlined characters. Virtual consoles only.
-*--underline* on|off::
+*--underline* **on**|**off**::
Turns underline mode on or off.
include::man-common/help-version.adoc[]
--
2.48.1
^ permalink raw reply related
* [PATCH 04/10] textual: fix three misspellings of "unsupported"
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
One misspelling was fixed five years ago (in commit 760ecc3613),
but the others remained.
Fix another spello too, found with `codespell`.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/mount.c | 2 +-
sys-utils/wdctl.c | 2 +-
term-utils/script.c | 2 +-
term-utils/scriptlive.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index 7bce9038e..8d0e9ab17 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -378,7 +378,7 @@ static size_t libmount_mesgs(struct libmnt_context *cxt, char type)
break;
}
- /* messgaes */
+ /* Messages */
STRV_FOREACH(s, mesgs) {
switch (type) {
case 'e':
diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c
index 4818c6ce4..ba013a3b4 100644
--- a/sys-utils/wdctl.c
+++ b/sys-utils/wdctl.c
@@ -545,7 +545,7 @@ static int read_watchdog_from_device(struct wd_device *wd)
}
-/* Returns: <0 error, 0 success, 1 unssuported */
+/* Returns: <0 on error, 0 on success, 1 for unsupported */
static int read_watchdog_from_sysfs(struct wd_device *wd)
{
struct path_cxt *sys;
diff --git a/term-utils/script.c b/term-utils/script.c
index 59b640256..78ab3f4ca 100644
--- a/term-utils/script.c
+++ b/term-utils/script.c
@@ -829,7 +829,7 @@ int main(int argc, char **argv)
else if (strcmp(optarg, "always") == 0)
echo = 1;
else
- errx(EXIT_FAILURE, _("unssuported echo mode: '%s'"), optarg);
+ errx(EXIT_FAILURE, _("unsupported echo mode: '%s'"), optarg);
break;
case 'e':
ctl.rc_wanted = 1;
diff --git a/term-utils/scriptlive.c b/term-utils/scriptlive.c
index af946a08d..1b0bf96cb 100644
--- a/term-utils/scriptlive.c
+++ b/term-utils/scriptlive.c
@@ -218,7 +218,7 @@ main(int argc, char *argv[])
else if (strcmp(optarg, "always") == 0)
echo = 1;
else
- errx(EXIT_FAILURE, _("unssuported echo mode: '%s'"), optarg);
+ errx(EXIT_FAILURE, _("unsupported echo mode: '%s'"), optarg);
break;
case 't':
case 'T':
--
2.48.1
^ permalink raw reply related
* [PATCH 05/10] script: mention in usage that value for <size> may have a suffix
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
term-utils/script.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/term-utils/script.c b/term-utils/script.c
index 78ab3f4ca..4da25fa2e 100644
--- a/term-utils/script.c
+++ b/term-utils/script.c
@@ -216,6 +216,10 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(USAGE_SEPARATOR, out);
fprintf(out, USAGE_HELP_OPTIONS(31));
+
+ fputs(USAGE_ARGUMENTS, out);
+ fprintf(out, USAGE_ARG_SIZE(_("<size>")));
+
fprintf(out, USAGE_MAN_TAIL("script(1)"));
exit(EXIT_SUCCESS);
--
2.48.1
^ permalink raw reply related
* [PATCH 06/10] textual: make two incorrect synopses identical to a better one
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/setpgid.c | 2 +-
sys-utils/setsid.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys-utils/setpgid.c b/sys-utils/setpgid.c
index 4bcaefad2..a1708d62d 100644
--- a/sys-utils/setpgid.c
+++ b/sys-utils/setpgid.c
@@ -17,7 +17,7 @@ static void __attribute__((__noreturn__)) usage(void)
FILE *out = stdout;
fputs(USAGE_HEADER, out);
fprintf(out, _(
- " %s [options] <program> [arguments ...]\n"),
+ " %s [options] <program> [<argument>...]\n"),
program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
diff --git a/sys-utils/setsid.c b/sys-utils/setsid.c
index 5ccfd0ff1..0a7fdbed0 100644
--- a/sys-utils/setsid.c
+++ b/sys-utils/setsid.c
@@ -32,7 +32,7 @@ static void __attribute__((__noreturn__)) usage(void)
FILE *out = stdout;
fputs(USAGE_HEADER, out);
fprintf(out, _(
- " %s [options] <program> [arguments ...]\n"),
+ " %s [options] <program> [<argument>...]\n"),
program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
--
2.48.1
^ permalink raw reply related
* [PATCH 07/10] rev: standardize the usage header, making the synopsis equal to another
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
text-utils/rev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/text-utils/rev.c b/text-utils/rev.c
index fc7ac6203..4c2357a7e 100644
--- a/text-utils/rev.c
+++ b/text-utils/rev.c
@@ -73,8 +73,8 @@ static void sig_handler(int signo __attribute__ ((__unused__)))
static void __attribute__((__noreturn__)) usage(void)
{
FILE *out = stdout;
- fprintf(out, _("Usage: %s [options] [file ...]\n"),
- program_invocation_short_name);
+ fputs(USAGE_HEADER, out);
+ fprintf(out, _(" %s [options] [<file> ...]\n"), program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
fputs(_("Reverse lines characterwise.\n"), out);
--
2.48.1
^ permalink raw reply related
* [PATCH 08/10] mkfs.cramfs: in usage text, separate two direct arguments from options
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
disk-utils/mkfs.cramfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/disk-utils/mkfs.cramfs.c b/disk-utils/mkfs.cramfs.c
index f4ada9052..51fa2122a 100644
--- a/disk-utils/mkfs.cramfs.c
+++ b/disk-utils/mkfs.cramfs.c
@@ -144,6 +144,7 @@ static void __attribute__((__noreturn__)) usage(void)
fputsln(_( " -s sort directory entries (old option, ignored)"), stdout);
fputsln(_( " -z make explicit holes"), stdout);
fputsln(_( " -l[=<mode>] use exclusive device lock (yes, no or nonblock)"), stdout);
+ fputs(USAGE_SEPARATOR, stdout);
fputsln(_( " dirname root of the filesystem to be compressed"), stdout);
fputsln(_( " outfile output file"), stdout);
fputs(USAGE_SEPARATOR, stdout);
--
2.48.1
^ permalink raw reply related
* [PATCH 09/10] prlimit: in man page, mark --resource as placeholder, not literal option
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
Also, show that --pid takes an argument, and improve its description.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/prlimit.1.adoc | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sys-utils/prlimit.1.adoc b/sys-utils/prlimit.1.adoc
index 49534cd52..4e839016d 100644
--- a/sys-utils/prlimit.1.adoc
+++ b/sys-utils/prlimit.1.adoc
@@ -18,9 +18,9 @@ prlimit - get and set process resource limits
== SYNOPSIS
-*prlimit* [options] [*--resource*[**=**_limits_]] [*--pid* _PID_]
+*prlimit* [options] [**--**_resource_[**=**_limits_]] [*--pid* _PID_]
-*prlimit* [options] [*--resource*[**=**_limits_]] _command_ [_argument_...]
+*prlimit* [options] [**--**_resource_[**=**_limits_]] _command_ [_argument_...]
== DESCRIPTION
@@ -46,8 +46,9 @@ Do not print a header line.
*-o*, *--output* _list_::
Define the output columns to use. If no output arrangement is specified, then a default set is used. Use *--help* to get a list of all supported columns.
-*-p*, *--pid*::
-Specify the process id; if none is given, the running process will be used.
+*-p*, *--pid* _PID_::
+Specify the process ID. Without this option (and without a _command_),
+the running process will be used.
*--raw*::
Use the raw output format.
--
2.48.1
^ permalink raw reply related
* [PATCH 10/10] unshare: in usage text, reshuffle options into somewhat related groups
From: Benno Schulenberg @ 2025-02-15 16:18 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
First the mount-related options (because --mount was the first
namespace option earlier) plus two other options about folders;
then the options about UIDS and GIDS; then two options about
forking; then two miscellaneous options; and lastly the two
options about time, as --time was the last namespace option.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
sys-utils/unshare.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/sys-utils/unshare.c b/sys-utils/unshare.c
index b6c2f8b45..9ec6ef7cc 100644
--- a/sys-utils/unshare.c
+++ b/sys-utils/unshare.c
@@ -781,7 +781,16 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" -C, --cgroup[=<file>] unshare cgroup namespace\n"), out);
fputs(_(" -T, --time[=<file>] unshare time namespace\n"), out);
fputs(USAGE_SEPARATOR, out);
- fputs(_(" -f, --fork fork before launching <program>\n"), out);
+ fputs(_(" --mount-proc[=<dir>] mount proc filesystem first (implies --mount)\n"), out);
+ fputs(_(" --mount-binfmt[=<dir>] mount binfmt filesystem first (implies --user and --mount)\n"), out);
+ fputs(_(" -l, --load-interp <file> load binfmt definition in the namespace (implies --mount-binfmt)\n"), out);
+ fputs(_(" --propagation slave|shared|private|unchanged\n"
+ " modify mount propagation in mount namespace\n"), out);
+ fputs(_(" -R, --root <dir> run the command with root directory set to <dir>\n"), out);
+ fputs(_(" -w, --wd <dir> change working directory to <dir>\n"), out);
+ fputs(USAGE_SEPARATOR, out);
+ fputs(_(" -S, --setuid <uid> set uid in entered namespace\n"), out);
+ fputs(_(" -G, --setgid <gid> set gid in entered namespace\n"), out);
fputs(_(" --map-user <uid>|<name> map current user to uid (implies --user)\n"), out);
fputs(_(" --map-group <gid>|<name> map current group to gid (implies --user)\n"), out);
fputs(_(" -r, --map-root-user map current user to root (implies --user)\n"), out);
@@ -792,22 +801,15 @@ static void __attribute__((__noreturn__)) usage(void)
fputs(_(" --map-groups <innergid>:<outergid>:<count>\n"
" map count groups from outergid to innergid (implies --user)\n"), out);
fputs(USAGE_SEPARATOR, out);
+ fputs(_(" -f, --fork fork before launching <program>\n"), out);
fputs(_(" --kill-child[=<signame>] when dying, kill the forked child (implies --fork)\n"
" defaults to SIGKILL\n"), out);
- fputs(_(" --mount-proc[=<dir>] mount proc filesystem first (implies --mount)\n"), out);
- fputs(_(" --mount-binfmt[=<dir>] mount binfmt filesystem first (implies --user and --mount)\n"), out);
- fputs(_(" --propagation slave|shared|private|unchanged\n"
- " modify mount propagation in mount namespace\n"), out);
+ fputs(USAGE_SEPARATOR, out);
fputs(_(" --setgroups allow|deny control the setgroups syscall in user namespaces\n"), out);
fputs(_(" --keep-caps retain capabilities granted in user namespaces\n"), out);
fputs(USAGE_SEPARATOR, out);
- fputs(_(" -R, --root <dir> run the command with root directory set to <dir>\n"), out);
- fputs(_(" -w, --wd <dir> change working directory to <dir>\n"), out);
- fputs(_(" -S, --setuid <uid> set uid in entered namespace\n"), out);
- fputs(_(" -G, --setgid <gid> set gid in entered namespace\n"), out);
fputs(_(" --monotonic <offset> set clock monotonic offset (seconds) in time namespaces\n"), out);
fputs(_(" --boottime <offset> set clock boottime offset (seconds) in time namespaces\n"), out);
- fputs(_(" -l, --load-interp <file> load binfmt definition in the namespace (implies --mount-binfmt)\n"), out);
fputs(USAGE_SEPARATOR, out);
fprintf(out, USAGE_HELP_OPTIONS(27));
--
2.48.1
^ permalink raw reply related
* [PATCH] agetty: Implement netlink based IP address lookup
From: Stanislav Brabec @ 2025-02-16 21:24 UTC (permalink / raw)
To: util-linux; +Cc: Stanislav Brabec
The current implementation of the IP address lookup in agetty is inferior:
The network change watch uses netlink. The netlink message contains all needed
information. But the netlink message is not used at all. To get an IP address
for the \4 and \6 issue file escapes, getifaddrs() is used instead. But
getifaddrs() is inferior to netlink, especially for IPv6. It does not provide
sufficient information to discriminate between an useful global IPv6 address and
an ephemeral IPv6 address that will expire in few seconds. And finally, the
current implementation does not support lookup over all interfaces. External
helpers like issue-generator are needed.
The new netlink based IP address lokup implements a new issue file escape \i.
This lookup is based on netlink messages only. It evaluates all addresses
reported in the netlink messages and it attempts to print only the best of them.
As it is not possible to discriminate the "best" IP address, it reports all
reasonably usable addresses.
To do:
Migrate \4 and \6 from getifaddrs() to netlink as well, and then completely drop
getifaddrs() based code.
It could be useful to implement:
- configurable limit for the maximum number of interfaces that could be
reported.
- the interface regexp match
- an interface template for fine tuning of the output
- better control over the output: e. g. disable printing of IPv4 or IPv6
addresses, disable printing of temporary addresses or link-local addresses
- cross-protocol checks: e. g. disable reporting of link-local IPv6 address for
an IPv4-only interface
Note:
The new network comparison code could potentially render obsolete string based
issue comparison (implemented in 6522d88). There are ifaces_list_change_4 and
ifaces_list_change_6 variables ready for this purpose.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
---
term-utils/agetty.8.adoc | 3 +
term-utils/agetty.c | 405 +++++++++++++++++++++++++++++++++++++--
2 files changed, 388 insertions(+), 20 deletions(-)
diff --git a/term-utils/agetty.8.adoc b/term-utils/agetty.8.adoc
index 627f858a2..47b4b20c2 100644
--- a/term-utils/agetty.8.adoc
+++ b/term-utils/agetty.8.adoc
@@ -262,6 +262,9 @@ Insert the system name (the name of the operating system). Same as 'uname -s'. S
S or S{VARIABLE}::
Insert the VARIABLE data from _/etc/os-release_. If this file does not exist then fall back to _/usr/lib/os-release_. If the VARIABLE argument is not specified, then use PRETTY_NAME from the file or the system name (see \s). This escape code can be used to keep _/etc/issue_ distribution and release independent. Note that \S{ANSI_COLOR} is converted to the real terminal escape sequence.
+i::
+Dump usable IPv4 and IPv4 addresses of the all network interfaces. It dumps the global or site IP address, if it exists. If it does not exist, it dumps the temporary interface with the longest lifetime. If it does not exist it dumps the link-local IP address. The IPv6 link-local interface of IPv6 is reported as {IPv6 address}@{interface on a local machine}, but for a real use, the inteface on a local machine needs to be replaced by the interface on a remote machine. To prevent overflooding of the interface dump, the feature automatically disables itself, if the number of usable interfaces exceeds 12.
+
l::
Insert the name of the current tty line.
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index aa859c27b..fe50a9336 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -146,6 +146,38 @@
static int inotify_fd = AGETTY_RELOAD_FDNONE;
static int netlink_fd = AGETTY_RELOAD_FDNONE;
static uint32_t netlink_groups;
+
+#define BUFSIZE 8192
+
+const int max_ifaces = 12;
+
+/* Network address "quality" */
+enum ip_quality_item_value {
+ IP_QUALITY_SCOPE_UNIVERSE,
+ IP_QUALITY_SCOPE_SITE,
+ IP_QUALITY_IFA_LOCAL,
+ IP_QUALITY_F_TEMPORARY,
+ IP_QUALITY_SCOPE_LINK,
+ IP_QUALITY_BAD
+};
+struct ip_quality_item {
+ enum ip_quality_item_value quality;
+ int len;
+ __u32 ifa_valid; /* IP addres lifetime */
+ struct ip_quality_item *next;
+ char addr[];
+};
+struct iface_quality_item {
+ __u32 ifa_index;
+ struct ip_quality_item *ip_quality_list_4;
+ struct ip_quality_item *ip_quality_list_6;
+ struct iface_quality_item *next;
+};
+static struct iface_quality_item *ifaces_list = NULL;
+bool ifaces_list_change_4;
+bool ifaces_list_change_6;
+bool ifaces_skip_dump = false;
+
#endif
struct issue {
@@ -351,6 +383,7 @@ FILE *dbf;
#else
# define debug(s) do { ; } while (0)
#endif
+#define debug_net(s) debug("network: " s)
int main(int argc, char **argv)
{
@@ -1599,7 +1632,9 @@ done:
}
#ifdef AGETTY_RELOAD
-static void open_netlink(void)
+static int process_netlink_msg(int *triggered, bool wait_for_nlmsg_done);
+static int send_dump_request(int sock_fd);
+static void open_netlink(bool dump_requested)
{
struct sockaddr_nl addr = { 0, };
int sock;
@@ -1614,12 +1649,259 @@ static void open_netlink(void)
addr.nl_groups = netlink_groups;
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0)
close(sock);
- else
+ else {
netlink_fd = sock;
+ if (dump_requested) {
+ send_dump_request(netlink_fd);
+ process_netlink_msg(NULL, true);
+ }
+ }
+ }
+}
+
+static int send_dump_request(int sock_fd) {
+ struct {
+ struct nlmsghdr nh;
+ struct rtgenmsg g;
+ } req;
+
+ memset(&req, 0, sizeof(req));
+ req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.g));
+ req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
+ req.nh.nlmsg_type = RTM_GETADDR;
+ req.g.rtgen_family = AF_UNSPEC;
+
+ return send(sock_fd, &req, req.nh.nlmsg_len, 0);
+}
+
+#ifdef DEBUGGING
+static char *rtattr_ntop(struct ifaddrmsg *ifaddr, struct rtattr *attr) {
+ static char addr_str[INET6_ADDRSTRLEN];
+
+ addr_str[0] = 0;
+ if (ifaddr->ifa_family == AF_INET) {
+ inet_ntop(AF_INET, (struct in_addr *)RTA_DATA(attr), addr_str, sizeof(addr_str));
+ }
+ if (ifaddr->ifa_family == AF_INET6) {
+ inet_ntop(AF_INET6, (struct in_addr6 *)RTA_DATA(attr), addr_str, sizeof(addr_str));
+ }
+ return addr_str;
+}
+#endif
+
+static inline enum ip_quality_item_value evaluate_ip_quality(struct ifaddrmsg *ifaddr) {
+ enum ip_quality_item_value quality;
+ switch (ifaddr->ifa_scope) {
+ case RT_SCOPE_UNIVERSE:
+ debug_net("\tglobal\n");
+ quality = IP_QUALITY_SCOPE_UNIVERSE;
+ break;
+ case RT_SCOPE_LINK:
+ debug_net("\tlink\n");
+ quality = IP_QUALITY_SCOPE_LINK;
+ break;
+ case RT_SCOPE_SITE:
+ debug_net("\tsite\n");
+ quality = IP_QUALITY_SCOPE_SITE;
+ break;
+ default:
+ debug_net("\tother\n");
+ quality = IP_QUALITY_BAD;
+ break;
+ }
+ if (ifaddr->ifa_flags & IFA_F_TEMPORARY) {
+ debug_net("\ttemporary\n");
+ if (quality <= IP_QUALITY_F_TEMPORARY)
+ quality = IP_QUALITY_F_TEMPORARY;
+ }
+ return quality;
+}
+
+static void process_netlink_msg_part(struct nlmsghdr *nh) {
+ struct rtattr *attr;
+ struct ifaddrmsg *ifaddr;
+
+ __u8 family = 0;
+ __u32 valid = 0;
+ enum ip_quality_item_value quality;
+ int len;
+ int addrlen;
+ bool has_local_address = false;
+ int ifaceq_count;
+ void *addr;
+
+ struct iface_quality_item *ifaceq;
+ struct iface_quality_item **ifaceq_prev_next;
+ struct ip_quality_item *ipq;
+ struct ip_quality_item **ipq_prev_next;
+ bool is_newaddr;
+ bool *ifaces_list_change;
+#ifdef DEBUGGING
+ char ifname[IF_NAMESIZE];
+#endif
+
+ if (nh->nlmsg_type != RTM_NEWADDR && nh->nlmsg_type != RTM_DELADDR)
+ return;
+
+ ifaddr = NLMSG_DATA(nh);
+
+#ifdef DEBUGGING
+ fprintf(dbf, "network: interface %d (%s)\n", ifaddr->ifa_index, if_indextoname(ifaddr->ifa_index, ifname)); fflush(dbf);
+#endif
+
+ family = ifaddr->ifa_family;
+#ifdef DEBUGGING
+ if (ifaddr->ifa_family == AF_INET) {
+ debug_net("network: IPv4 ");
+ }
+ if (ifaddr->ifa_family == AF_INET6) {
+ debug_net("network: IPv6 ");
+ }
+#endif
+
+ /* Process rtattr */
+ len = nh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifaddr));
+ if (nh->nlmsg_type == RTM_NEWADDR) {
+ is_newaddr = true;
+ } else {
+ is_newaddr = false;
+ }
+ for (attr = IFA_RTA(ifaddr); RTA_OK(attr, len); attr = RTA_NEXT(attr, len)) {
+ switch (attr->rta_type) {
+ case IFA_ADDRESS:
+#ifdef DEBUGGING
+ fprintf(dbf, "\taddress: %s\n", rtattr_ntop(ifaddr, attr)); fflush(dbf);
+#endif
+ if (!has_local_address) {
+ addr = RTA_DATA(attr);
+ addrlen = RTA_PAYLOAD(attr);
+ }
+ break;
+ case IFA_LOCAL:
+ /* Point to Point interface listens has local address
+ * and listens there */
+#ifdef DEBUGGING
+ fprintf(dbf, "\tlocal address: %s\n", rtattr_ntop(ifaddr, attr)); fflush(dbf);
+#endif
+ has_local_address = true;
+ addr = RTA_DATA(attr);
+ addrlen = RTA_PAYLOAD(attr);
+ break;
+ case IFA_CACHEINFO: {
+ /* Save lifetime for temporary addresses.
+ In other cases, lifetime is not authoritative.
+ The global static address can have a short lifetime
+ defined by the server. */
+ struct ifa_cacheinfo *ci = (struct ifa_cacheinfo *)RTA_DATA(attr);
+ if (ifaddr->ifa_flags & IFA_F_TEMPORARY) {
+ debug_net("\ttemporary\n");
+ valid = ci->ifa_valid;
+ }}
+ break;
+ }
+ }
+ /* Should not happen */
+ if (addr == NULL) {
+ debug_net("- no address\n");
+ return;
+ }
+ quality = evaluate_ip_quality(ifaddr);
+ if (quality == IP_QUALITY_BAD) {
+ debug_net("- address unusable\n");
+ return;
+ }
+
+ /* Search for interface in ifaces_list */
+ ifaceq = ifaces_list;
+ ifaceq_prev_next = &(ifaces_list);
+ ifaceq_count = 0;
+ while (ifaceq != NULL) {
+ if (ifaceq->ifa_index == ifaddr->ifa_index) {
+ debug_net("+ interface found in the list\n");
+ break;
+ }
+ ifaceq_prev_next = &(ifaceq->next);
+ ifaceq = ifaceq->next;
+ ifaceq_count++;
+ }
+
+ if (ifaceq == NULL) {
+ if (is_newaddr) {
+ if (ifaceq_count >= max_ifaces) {
+ debug_net("+ too many interfaces\n");
+ ifaces_skip_dump = true;
+ return;
+ }
+ debug_net("+ allocating new interface\n");
+ ifaceq = malloc(sizeof(struct iface_quality_item));
+ ifaceq->ifa_index = ifaddr->ifa_index;
+ ifaceq->ip_quality_list_4 = NULL;
+ ifaceq->ip_quality_list_6 = NULL;
+ ifaceq->next = NULL;
+ *ifaceq_prev_next = ifaceq;
+ } else {
+ /* Should never happen */
+ debug_net("- interface not found\n");
+ return;
+ }
+ }
+ if (family == AF_INET) {
+ ipq_prev_next = &(ifaceq->ip_quality_list_4);
+ ifaces_list_change = &ifaces_list_change_4;
+ }
+ if (family == AF_INET6) {
+ ipq_prev_next = &(ifaceq->ip_quality_list_6);
+ ifaces_list_change = &ifaces_list_change_6;
+ }
+ ipq = *ipq_prev_next; /* Equal to: ifaceq->ip_quality_list_(4|6) */
+ while (ipq != NULL && memcmp(ipq->addr, addr, addrlen)) {
+ ipq_prev_next = &(ipq->next);
+ ipq = ipq->next;
+ }
+ if (ipq == NULL) {
+ debug_net("- address not found in the list\n");
+ }
+
+ if (is_newaddr) {
+ struct ip_quality_item *ipq_new;
+
+#ifdef DEBUGGING
+ fprintf(dbf, "network: + new address (addrlen = %d)\n", addrlen); fflush(dbf);
+#endif
+ ipq_new = malloc(sizeof(struct ip_quality_item) + addrlen);
+ ipq_new->quality = quality;
+ ipq_new->len = addrlen;
+ ipq_new->ifa_valid = valid;
+ memcpy(&(ipq_new->addr), addr, addrlen);
+ if (ipq == NULL) {
+ debug_net("+ allocating new address\n");
+ ipq_new->next = NULL;
+ *ifaces_list_change = true;
+ } else {
+ debug_net("+ replacing address data\n");
+ ipq_new->next = ipq->next;
+ }
+ *ipq_prev_next = ipq_new;
+ } else {
+ debug_net("address removed\n");
+ /* Should not happen */
+ if (ipq == NULL)
+ return;
+ /* Delist the address */
+ debug_net("- deleting address\n");
+ *ifaces_list_change = true;
+ *ipq_prev_next = ipq->next;
+ free(ipq);
+ if ((ifaceq->ip_quality_list_4 == NULL) && (ifaceq->ip_quality_list_6 == NULL)) {
+ debug_net("- deleted last IP in the interface, removing interface\n");
+ *ifaceq_prev_next = ifaceq->next;
+ ifaceq_count--;
+ free(ifaceq);
+ }
}
}
-static int process_netlink_msg(int *triggered)
+static int process_netlink_msg(int *triggered, bool wait_for_nlmsg_done)
{
char buf[4096];
struct sockaddr_nl snl;
@@ -1640,36 +1922,44 @@ static int process_netlink_msg(int *triggered)
.msg_flags = 0
};
- rc = recvmsg(netlink_fd, &msg, MSG_DONTWAIT);
- if (rc < 0) {
- if (errno == EWOULDBLOCK || errno == EAGAIN)
- return 0;
-
- /* Failure, just stop listening for changes */
- close(netlink_fd);
- netlink_fd = AGETTY_RELOAD_FDNONE;
- return 0;
- }
+ while (1) {
+ rc = recvmsg(netlink_fd, &msg, (wait_for_nlmsg_done ? 0 : MSG_DONTWAIT));
+ if (rc < 0) {
+ if (errno == EWOULDBLOCK || errno == EAGAIN)
+ return 0;
- for (h = (struct nlmsghdr *)buf; NLMSG_OK(h, (unsigned int)rc); h = NLMSG_NEXT(h, rc)) {
- if (h->nlmsg_type == NLMSG_DONE ||
- h->nlmsg_type == NLMSG_ERROR) {
+ /* Failure, just stop listening for changes */
close(netlink_fd);
netlink_fd = AGETTY_RELOAD_FDNONE;
return 0;
}
- *triggered = 1;
- break;
+ for (h = (struct nlmsghdr *)buf; NLMSG_OK(h, (unsigned int)rc); h = NLMSG_NEXT(h, rc)) {
+ if (h->nlmsg_type == NLMSG_ERROR) {
+ close(netlink_fd);
+ netlink_fd = AGETTY_RELOAD_FDNONE;
+ return 0;
+ }
+ if (h->nlmsg_type == NLMSG_DONE)
+ goto done;
+ process_netlink_msg_part(h);
+ }
+ if (!wait_for_nlmsg_done) {
+ *triggered = 1;
+ goto done;
+ }
}
+done:
+ return 0;
+
return 1;
}
static int process_netlink(void)
{
int triggered = 0;
- while (process_netlink_msg(&triggered));
+ while (process_netlink_msg(&triggered, false));
return triggered;
}
@@ -1985,7 +2275,7 @@ done:
#ifdef AGETTY_RELOAD
if (netlink_groups != 0)
- open_netlink();
+ open_netlink(false);
#endif
if (ie->output) {
fclose(ie->output);
@@ -2660,6 +2950,73 @@ static void output_iface_ip(struct issue *ie,
free(host);
}
+static enum ip_quality_item_value get_quality_limit(struct ip_quality_item *ipq, __u32 *best_valid) {
+ enum ip_quality_item_value qlimit;
+
+ qlimit = IP_QUALITY_BAD;
+ while (ipq != NULL) {
+ if (ipq->ifa_valid > 0) {
+ if (ipq->ifa_valid > *best_valid)
+ *best_valid = ipq->ifa_valid;
+ }
+ if (qlimit > ipq->quality) {
+ qlimit = ipq->quality;
+ /* We do not discriminate between site and global
+ * addresses. Always report both. */
+ if (qlimit <= IP_QUALITY_SCOPE_SITE)
+ qlimit = IP_QUALITY_SCOPE_SITE;
+ }
+ ipq = ipq->next;
+ }
+ if (qlimit <= IP_QUALITY_SCOPE_SITE)
+ qlimit = IP_QUALITY_SCOPE_SITE;
+ return qlimit;
+}
+
+static void dump_addresses(FILE *out) {
+ struct iface_quality_item *ifaceq;
+ char addr_str[INET6_ADDRSTRLEN];
+
+ ifaceq = ifaces_list;
+ while (ifaceq != NULL) {
+ char ifname[IF_NAMESIZE];
+ enum ip_quality_item_value qlimit;
+ __u32 best_valid;
+ struct ip_quality_item *ipq;
+
+ fprintf(out, "%s:", if_indextoname(ifaceq->ifa_index, ifname));
+ qlimit = get_quality_limit(ifaceq->ip_quality_list_4, &best_valid);
+ best_valid = 0;
+#ifdef DEBUGGING
+ fprintf(dbf, " (quality limit %d)", qlimit); fflush(dbf);
+#endif
+ ipq = ifaceq->ip_quality_list_4;
+ best_valid = 0;
+ while (ipq != NULL) {
+ if (ipq->quality <= qlimit && (best_valid == 0 || ipq->ifa_valid == best_valid))
+ fprintf(out, " %s", inet_ntop(AF_INET, ipq->addr, addr_str, sizeof(addr_str)));
+ ipq = ipq->next;
+ }
+ qlimit = get_quality_limit(ifaceq->ip_quality_list_6, &best_valid);
+ best_valid = 0;
+#ifdef DEBUGGING
+ fprintf(dbf, " (quality limit %d)", qlimit); fflush(dbf);
+#endif
+ ipq = ifaceq->ip_quality_list_6;
+ while (ipq != NULL) {
+ if (ipq->quality <= qlimit && (best_valid == 0 || ipq->ifa_valid == best_valid)) {
+ if (ipq->quality == IP_QUALITY_SCOPE_LINK)
+ fprintf(out, " %s%%%s", inet_ntop(AF_INET6, ipq->addr, addr_str, sizeof(addr_str)), ifname);
+ else
+ fprintf(out, " %s", inet_ntop(AF_INET6, ipq->addr, addr_str, sizeof(addr_str)));
+ }
+ ipq = ipq->next;
+ }
+ fprintf(out, "\n");
+ ifaceq = ifaceq->next;
+ }
+}
+
/*
* parses \x{argument}, if not argument specified then returns NULL, the @fd
* has to point to one char after the sequence (it means '{').
@@ -2876,6 +3233,14 @@ static void output_special_char(struct issue *ie,
netlink_groups |= RTMGRP_IPV6_IFADDR;
break;
}
+ case 'i':
+ netlink_groups |= RTMGRP_IPV4_IFADDR;
+ netlink_groups |= RTMGRP_IPV6_IFADDR;
+ open_netlink(true);
+ dump_addresses(ie->output);
+ ifaces_list_change_4 = false;
+ ifaces_list_change_6 = false;
+ break;
#endif
default:
putc(c, ie->output);
--
2.48.1
^ permalink raw reply related
* [BUG?] agetty: issue printed twice
From: Stanislav Brabec @ 2025-02-18 1:44 UTC (permalink / raw)
To: util-linux@vger.kernel.org
Hi.
Depending on the config, the issue file may be printed twice. If both
/run/issue and /etc/issue exist, both are printed. I am not sure,
whether it is an intended behavior. And eventually it could be printed
three times.
It is caused by:
/* The default /etc/issue and optional /etc/issue.d directory as
* extension to the file. The /etc/issue.d directory is ignored if
* there is no /etc/issue file. The file may be empty or symlink.
*/
if (access(_PATH_ISSUE, F_OK|R_OK) == 0) {
issuefile_read(ie, _PATH_ISSUE, op, tp);
issuedir_read(ie, _PATH_ISSUEDIR, op, tp);
}
/* Fallback @runstatedir (usually /run) */
issuefile_read(ie, _PATH_RUNSTATEDIR "/" _PATH_ISSUE_FILENAME, op, tp);
issuedir_read(ie, _PATH_RUNSTATEDIR "/" _PATH_ISSUE_DIRNAME, op, tp);
/* Fallback @sysconfstaticdir (usually /usr/lib)*/
issuefile_read(ie, _PATH_SYSCONFSTATICDIR "/" _PATH_ISSUE_FILENAME,
op, tp);
issuedir_read(ie, _PATH_SYSCONFSTATICDIR "/" _PATH_ISSUE_DIRNAME,
op, tp);
--
Best Regards / S pozdravem,
Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: sbrabec@suse.com
Křižíkova 148/34 (Corso IIa) tel: +420 284 084 060
186 00 Praha 8-Karlín fax: +420 284 084 001
Czech Republic http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76
^ permalink raw reply
* Re: [BUG?] agetty: issue printed twice
From: Karel Zak @ 2025-02-18 10:32 UTC (permalink / raw)
To: Stanislav Brabec; +Cc: util-linux@vger.kernel.org
In-Reply-To: <7d0fd241-52cc-4d92-a0ce-5cdbf9b39a34@suse.cz>
On Tue, Feb 18, 2025 at 02:44:36AM GMT, Stanislav Brabec wrote:
> Hi.
>
> Depending on the config, the issue file may be printed twice. If both
> /run/issue and /etc/issue exist, both are printed. I am not sure, whether it
> is an intended behavior. And eventually it could be printed three times.
See 508fb0e7ac103b68531a59db2a4473897853ab52.
I made the changes to enable printing of all issue files together. This was
based on users feedback ....
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH 01/10] colrm: make the wording of the doc string analogous to that of `col`
From: Karel Zak @ 2025-02-18 17:14 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <20250215161843.12053-1-bensberg@telfort.nl>
On Sat, Feb 15, 2025 at 05:18:34PM GMT, Benno Schulenberg wrote:
> text-utils/colrm.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Applied (with your other patches), thank you.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* [ANNOUNCE] util-linux v2.41-rc1
From: Karel Zak @ 2025-02-18 21:08 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, util-linux
The util-linux release v2.41-rc1 is now available at
http://www.kernel.org/pub/linux/utils/util-linux/v2.41/
Feedback and bug reports, as always, are welcomed.
Karel
util-linux 2.41 Release Notes
=============================
Release highlights
------------------
agetty:
- Fixed an issue where issue files were not being printed from additional
locations, such as /run or /usr/lib. This change now allows for the use of
local information from /etc, in addition to generated files from /run and
distribution-specific files from /usr/lib.
cfdisk and sfdisk:
- Added support for the --sector-size command line option.
sfdisk:
- Added a new option, --discard-free.
fdisk:
- Added a new command, 'T', to discard sectors.
chrt:
- The --sched-runtime now supports SCHED_{OTHER,BATCH} policies.
column:
- Can now handle ANSI SGR colors inside OSC 8 hyperlink escape codes and sequences.
enosys:
- Can now dump defined filters.
libmount:
- Added experimental support for statmount() and listmount() syscalls.
- This new functionality can be accessed using "findmnt --kernel=listmount".
- Added a new mount option, X-mount.nocanonicalize[=source|target].
- Added new mount extensions to the "ro" flag (ro[=vfs,fs]).
- Added a new option, X-mount.noloop, to disable automatic loop device creation.
- Now supports bind symlinks over symlinks.
- Reads all kernel info/warning/error messages from new API syscalls (and mount(8) prints them).
libuuid:
- Now supports RFC9562 UUIDs.
findmnt, lsblk, and lsfd:
- Added a new --hyperlink command line option to print paths as terminal hyperlinks.
fdinmnt:
- Can now address filesystems using --id and --uniq-id (requires listmount() kernel support).
flock:
- Added support for the --fcntl command line option.
hardlink:
- Can now prioritize specified trees on the command line using --prioritize-trees.
- Can exclude sub-trees using --exclude-subtree or keep them in the current mount using --mount.
- Duplicates can now be printed using --list-duplicates.
kwclock:
- Added a new --param-index option to address position for RTC_PARAM_{GET,SET} ioctls.
kill:
- Can now decode signal masks (e.g. as used in /proc) to signal names.
libblkid:
- Made many changes to improve detection, including exfat, GPT, LUKS2, bitlocker, etc.
login:
- Added support for LOGIN_ENV_SAFELIST in /etc/login.def.
lsfd:
- Now supports pidfs and AF_VSOCK sockets.
lsipc, ipcmk, ipcrm:
- Now supports POSIX ipc.
lslogins:
- Now supports lastlog2.
lsns:
- Added support for the --filter option.
build by meson:
- Now supports translated man pages and has fixed many bugs.
mkswap:
- The option --file should now be usable on btrfs.
nsenter:
- Improved support for pidfd and can now join target process's socket net namespace.
scriptlive:
- Added a new option, --echo <never|always|auto>.
zramctl:
- Now supports COMP-RATIO and --algorithm-params.
Changes between v2.40 and v2.41
-------------------------------
CI:
- Downgrade checkout version for compat build [Michal Suchanek]
Include/strutils:
- xstrncpy() returns the number of copied bytes [Karel Zak]
README.licensing/flock:
- Add MIT license mention [Richard Purdie]
Wall:
- Fix terminal flag usage . Signed-off-by Karel Zak <kzak@redhat.com> [Karel Zak]
agetty:
- Don't override TERM passed by the user [Daan De Meyer]
- Prevent cursor escape [Stanislav Brabec]
- add "systemd" to --version output [Karel Zak]
- always read additional issue file locations [Karel Zak]
- fix ambiguous ‘else’ [-Werror=dangling-else] [Karel Zak]
- fix resource leak [Karel Zak]
- make reload code more robust [Karel Zak]
all_errnos/all_syscalls:
- don't hardcode AWK invocation [Thomas Weißschuh]
- don't warn during cleanup [Thomas Weißschuh]
- fail if any step fails [Thomas Weißschuh]
- use sed to extract defines from headers [Thomas Weißschuh]
audit-arch.h:
- add defines for m68k, sh [Chris Hofstaedtler]
autotools:
- Check for BPF_OBJ_NAME_LEN (required by lsfd) [Karel Zak]
- Properly order install dependencies of pam_lastlog2 [Thomas Weißschuh]
- add --disable-enosys, check for linux/audit.h [Karel Zak]
- add --disable-makeinstall-tty-setgid [Karel Zak]
- add Libs.private to uuid.pc [Karel Zak]
- add dependence on libsmartcols for lsclocks [Karel Zak]
- add missing HAVE_LIBLASTLOG2 [Karel Zak]
- add sysusers support [Karel Zak]
- allow enabling dmesg with --disable-all-programs [Henrik Lindström]
- allow enabling lsblk with --disable-all-programs [Henrik Lindström]
- always add man-common/ to EXTRA_DIST [Karel Zak]
- check for statmount and listmount syscalls [Karel Zak]
- check for sys/vfs.h and linux/bpf.h [Karel Zak]
- define HAVE_LIBPTHREAD and PTHREAD_LIBS [Karel Zak]
- distribute pam_lastlog2/meson.build [Thomas Weißschuh]
- fix po-man discheck [Karel Zak]
- fix securedir and pam_lastlog2 install [Karel Zak]
- improve devel-non-docs config-gen scenario [Karel Zak]
- make errnos.h available without lsfd [Thomas Weißschuh]
- make pam install path configurable [Thomas Weißschuh]
- update po-man files on make dist [Karel Zak]
bash-completion:
- add `--pty` and `--no-pty` options for `su` and `runuser` [Christoph Anton Mitterer]
- add logger --sd-* completions [Ville Skyttä]
- add nsenter --net-socket [Karel Zak]
- complete `--user` only for `runuser`, not for `su` [Christoph Anton Mitterer]
- look rewrite completion logic [Yao Zi]
- updated lsns bash completion [Prasanna Paithankar]
bcachefs:
- Remove BCACHEFS_SB_MAX_SIZE & check [Tony Asleson]
bits:
- cleanup --help output, add missing _( ) [Karel Zak]
blkdev.h:
- update location of SCSI device types [Christoph Anton Mitterer]
blkdiscard:
- (man) add note about fdisk [Karel Zak]
blkid:
- (tests) test output formats [Thomas Weißschuh]
- (tests) use correct blkid binary [Thomas Weißschuh]
- add json output format [Thomas Weißschuh]
- allow up to 64k erofs block sizes [Eric Sandeen]
- say "override" instead of "overwrite" in the --help text [Benno Schulenberg]
blkpr:
- grammarize the description of the tool and its options [Benno Schulenberg]
blkzone:
- correct the wording of an error message, from ioctl to function [Benno Schulenberg]
- improve the wording of an error message [Benno Schulenberg]
buffer:
- replace include of c.h with stddef.h [Thomas Weißschuh]
build(deps):
- bump actions/cache from 3 to 4 [dependabot[bot]]
- bump actions/checkout from 1 to 4 [dependabot[bot]]
- bump github/codeql-action from 2 to 3 [dependabot[bot]]
- bump redhat-plumbers-in-action/differential-shellcheck [dependabot[bot]]
build-sys:
- build sample-mount-overwrite only on Linux [Pino Toscano]
- introduce localstatedir [Karel Zak]
- make sure everywhere is localstatedir [Karel Zak]
- update version dates [Karel Zak]
c.h:
- consolidate THREAD_LOCAL. [Karel Zak]
cal:
- colorize --vertical output. [Karel Zak]
- fix --week use and colors [Karel Zak]
- make sure day_in_week() does not overrun array size [coverity scan] [Karel Zak]
- properly colorize the week number in vertical output. [Karel Zak]
- use unsigned int to follow union with unsigned int [Karel Zak]
cfdisk:
- Remove unused struct 'cfdisk_extra' [Dr. David Alan Gilbert]
- add --sector-size commanand line option [Karel Zak]
- fix possible integer overflow [coverity scan] [Karel Zak]
chcpu(8):
- Document CPU deconfiguring behavior [Mete Durlu]
- Fix typo [Mete Durlu]
- document limitations of -g [Stanislav Brabec]
chrt:
- (man) Add note for custom slice length on SCHED_{OTHER,BATCH} [Petre Tudor]
- (tests) Add new cases for custom slice on SCHED_{OTHER,BATCH} [Petre Tudor]
- Add --sched_runtime support for SCHED_{OTHER,BATCH} policies [Petre Tudor]
ci:
- bump coveralls compiler version to gcc 13 [Karel Zak]
- enable dependency manager for GitHub Actions [Jan Macku]
- reduce aslr level to avoid issues with ASAN [Thomas Weißschuh]
- temporarily switch the alt-arch job worker to Ubuntu 22.04 [Frantisek Sumsal]
- test on armv7 [Thomas Weißschuh]
- use OpenWRT SDK v23.05.4 [Thomas Weißschuh]
- use clang 18 [Thomas Weißschuh]
- use clang 19 [Thomas Weißschuh]
- use upload action v4 [Thomas Weißschuh]
codeql:
- don't report world-writable files [Thomas Weißschuh]
colrm:
- make the wording of the doc string analogous to that of `col` [Benno Schulenberg]
column:
- Adds option -S <num> so whitespaces are used instead of tabs in non table mode. [drax]
- add doc comment explaining ansi code detection [Juarez Rudsatz]
- add test for ansi escapes [Juarez Rudsatz]
- fix regression tests complaint [Juarez Rudsatz]
- fix unaligned cols in text with ansi escapes [Juarez Rudsatz]
- handle ANSI SGR colors inside OSC 8 hyperlink escape codes [Juarez Rudsatz]
- handle OSC 8 hyperlink escape sequences [Juarez Rudsatz]
- test ANSI SGR colors inside OSC 8 hyperlink escape codes [Juarez Rudsatz]
- test OSC 8 hyperlink escape sequences [Juarez Rudsatz]
column.1.adoc:
- Fix spelling and improve option descriptions [Nejc Bertoncelj]
coresched:
- Manage core scheduling cookies for tasks [Thijs Raymakers, Phil Auld]
- add bash completions [Thijs Raymakers]
disk-utils:
- make pointer arrays const [Max Kellermann]
dmesg:
- don't affect delta by --since [Karel Zak]
- fix --notime use [Karel Zak]
- fix delta calculation [Karel Zak]
- fix wrong size calculation [Karel Zak]
- print object closing brace while waiting for next message [Thomas Weißschuh]
doc:
- fsck.8.adoc - fix email typo [Geoffrey Casper]
docs:
- add COPYING.MIT [Karel Zak]
- add European Public License v1.2 [Thijs Raymakers]
- add hints about systemd [Karel Zak]
- add note about stable branches [Karel Zak]
- cleanup public domain license texts [Karel Zak]
- fix GPL name typo [Karel Zak]
- fix typos [Jakub Wilk]
- improve howto-pull-request [Karel Zak]
- lsns(8) ENVIRONMENT describe LSNS_DEBUG [Masatake YAMATO]
- move GPL-2.0 license text to Docimentation directory [Karel Zak]
- reduce AUTHORS file [Karel Zak]
- reduce and freeze NEWS file [Karel Zak]
- remove duplicated author name in namei.1.adoc [Emanuele Torre]
- rename v*-devel tag to v*-start [Karel Zak]
- update README [Karel Zak]
- use proper XSPD identifier for GPL-2.0 [Karel Zak]
enosys:
- (man) add missing word [Jakub Wilk]
- add functionality to dump filter [Thomas Weißschuh]
- add support for alternative error codes [Thomas Weißschuh]
- allow dumping to file [Thomas Weißschuh]
- generalize named number parsing [Thomas Weißschuh]
env:
- add "overwrite" argument to env_list_setenv() [Karel Zak]
- add env_list_add_getenv() and env_list_add_getenvs() [Karel Zak]
- cleanup env_list API [Karel Zak]
- save parsed variables into ul_env_list [Karel Zak]
fadvise:
- fix a typo of an option name in the bash completion rule [Masatake YAMATO]
fallocate:
- forbid --posix with special options [Chris Hofstaedtler]
- keep-size and zero-range are compatible [Antonio Russo]
fdisk:
- (man) improve --sector-size description [Karel Zak]
- add 'T' command to discard sectors [Karel Zak]
- fix SGI boot file prompt [mr-bronson]
- fix fdisk_sgi_set_bootfile return value [mr-bronson]
- fix sgi_check_bootfile name size minimum [mr-bronson]
- fix sgi_menu_cb return value [mr-bronson]
- fix typos [Karel Zak]
- improve list_freespace() [Karel Zak]
fincore:
- Use correct syscall number for cachestat on alpha [John Paul Adrian Glaubitz]
findfs:
- (man) be more accurate in describing non-tags [Karel Zak]
findmnt:
- (man) write about -Q,--filter option [Masatake YAMATO]
- (refactor) add a helper function making an instance of libscols_table [Masatake YAMATO]
- (refactor) convert add_column macro to a function [Masatake YAMATO]
- (refactor) remove global variables shared between findmnt.c and fintmnt-verify.c [Masatake YAMATO]
- add --hyperlink command line option [Karel Zak]
- add --id and --uniq-id options [Karel Zak]
- add --kernel=listmount [Karel Zak]
- add -Q,--filter option [Masatake YAMATO]
- add UNIQ-ID column [Karel Zak]
- add docs for --kernel [Karel Zak]
- add optional argument to --kernel [Karel Zak]
- always zero-terminate SOURCES data [Thomas Weißschuh]
- fix resource leaks [coverity scan] [Karel Zak]
- improve --help output [Karel Zak]
- improve -Q to output tree [Karel Zak]
- improve reliability of match testing [Karel Zak]
- remove deleted option from manual [Chris Hofstaedtler]
- revise the code for -I and -D option [Masatake YAMATO]
flock:
- add support for using fcntl() with open file description locks [Rasmus Villemoes]
- bash-completion add --fcntl [Rasmus Villemoes]
- document --fcntl [Rasmus Villemoes]
format:
- CamelCase to SnakeCase [jNullj]
- fix comments and if braces format [jNullj]
- fix switch case indent [jNullj]
fsck:
- warn if fsck.<type> not found and device is specified [Karel Zak]
fsck.minix:
- fix possible overrun [Karel Zak]
fstab.5 mount:
- fstab.5 mount.8 add note about field separator [Karel Zak]
fstrim:
- fix SYNOPSIS/usage (mandatory fstrim -A|-a|mountpoint) [наб]
getopt:
- remove free-before-exit [Karel Zak]
github:
- enable verbose output, don't generate docs default [Karel Zak]
gitignore:
- ignore `test/failures` [LiviaMedeiros]
hardlink:
- add --list-duplicates and --zero [наб]
- add --prioritize-trees [Karel Zak]
- add missing verbose messages and unify them [Karel Zak]
- add new options to the bash-completion [Karel Zak]
- fix 0-sized file processing [наб]
- fix memory corruption (size calculation) [Karel Zak]
- fix memory corruption in read buffers [Karel Zak]
- hardlink.1 directory|file is mandatory [наб]
- implement --exclude-subtree [Karel Zak]
- implement --mount [Karel Zak]
- re-raise SIGINT instead of exiting [наб]
- use xcalloc rather than xmalloc [Karel Zak]
hexdump:
- allow enabling with --disable-all-programs [Robert Marko]
- check blocksize when display data [Karel Zak]
hwclock:
- Remove ioperm declare as it causes nested extern declare warning [Zhaoming Luo]
- Support GNU Hurd [Zhaoming Luo]
- add -param-index [Karel Zak]
- cleanup save_adjtime() [Karel Zak]
- free temporary variable before return [Karel Zak]
- initialize parser variables [Karel Zak]
include:
- Include <unistd.h> in pidfd-utils.h for syscall() [Xi Ruoyao]
- add functions to implement --hyperlink [Karel Zak]
- introduce seccomp.h [Thomas Weißschuh]
include/blkdev:
- share BLKDISCARD macros [Karel Zak]
include/c:
- add BIT() [Karel Zak]
include/c.h:
- pass const pointer array to print_features() [Max Kellermann]
include/debug:
- Relicense to Public Domain [Karel Zak]
include/mount-api-utils:
- add statmount and listmount [Karel Zak]
- fix typo [Karel Zak]
include/optstr:
- improve optstr parsing [Karel Zak]
include/pidfd-utils:
- add namespaces ioctls [Karel Zak]
- provide ENOSYS stubs if pidfd functions are missing [Thomas Weißschuh]
- remove hardcoded syscall fallback [Karel Zak]
include/timeutils:
- add time_diff() [Karel Zak]
include/ttyutils:
- add terminal hyperlink ESC sequences [Karel Zak]
ipc:
- coding style cosmetic changes [Karel Zak]
ipcrm:
- simplify code [Yang Kun]
jsonwrt:
- add ul_jsonwrt_flush [Thomas Weißschuh]
kill:
- (test) add a case for testing -l 0xSIGMASK and -d $PID options [Masatake YAMATO]
- add a feature decoding signal masks [Masatake YAMATO]
last:
- avoid out of bounds array access [biubiuzy]
lastlog:
- cleanup function definitions [Karel Zak]
- improve errors printing [Karel Zak]
lastlog2:
- Don't print space if Service column is not printed [Miika Alikirri]
- Fix various issues with meson [Fabian Vogt]
- Improve comments and documentation [Tobias Stoeckmann]
- begin descriptions of options with a lowercase letter [Benno Schulenberg]
- convert check_user() to boolean-like macro [Karel Zak]
- improve coding style [Karel Zak]
- make longopts[] static-const [Karel Zak]
- rename tmpfiles [Christian Hesse]
lastlog2,uuidd:
- rename tmpfiles config file [Zbigniew Jędrzejewski-Szmek]
lib:
- make pointer arrays const [Max Kellermann]
lib/buffer:
- introduce ul_buffer_get_string() [Thomas Weißschuh]
lib/colors:
- fix fallback to system directory [Thomas Weißschuh]
- free unnecessary ncurses resources [Karel Zak]
lib/fileutils:
- add ul_basename() [Karel Zak]
lib/jsonwrt:
- introduce ul_jsonwrt_empty() [Karel Zak]
lib/pager:
lib/path:
- add ul_path_statf() and ul_path_vstatf() [Karel Zak]
- introduce ul_path_vreadf_buffer [Thomas Weißschuh]
- use _read_buffer for _read_string() [Thomas Weißschuh]
- use _vreadf_buffer for _cpuparse() [Thomas Weißschuh]
lib/pty-session:
- Don't ignore SIGHUP. [Kuniyuki Iwashima]
lib/sha1:
- fix for old glibc [Karel Zak]
lib/sysfs:
- abort device hierarchy walk at root of sysfs [Thomas Weißschuh]
- zero-terminate result of sysfs_blkdev_get_devchain() [Thomas Weißschuh]
libblkid:
- (exfat) validate fields used by prober [Thomas Weißschuh]
- (gpt) use blkid_probe_verify_csum() for partition array checksum [Thomas Weißschuh]
- Check offset in LUKS2 header [Milan Broz]
- Fix segfault when blkid.conf doesn't exist [Karel Zak]
- add FSLASTBLOCK for swaparea [Karel Zak]
- apfs validate checksums [Thomas Weißschuh]
- bitlocker add drive label [Victor Westerhuis]
- bitlocker add image for Windows 7+ BitLocker [Victor Westerhuis]
- bitlocker fix version on big-endian systems [Victor Westerhuis]
- bitlocker use volume identifier as UUID [Victor Westerhuis]
- check OPAL lock only when necessary [Oldřich Jedlička]
- fix potential memory leaks [Karel Zak]
- fix spurious ext superblock checksum mismatches [Krister Johansen]
- improve portability [Yang Kun]
- introduce luks opal prober [Thomas Weißschuh]
- make example more robust [Karel Zak]
- make pointer arrays const [Max Kellermann]
- topology/ioctl correctly handle kernel types [Thomas Weißschuh]
- topology/ioctl simplify ioctl handling [Thomas Weißschuh]
- use correct logging prefix for checksum mismatch [Thomas Weißschuh]
- zfs Use nvlist for detection instead of Uber blocks [Ameer Hamza]
- zfs fix overflow warning [coverity scan] [Ameer Hamza]
libfdisk:
- (dos) ignore incomplete EBR for non-wholedisk [Karel Zak]
- add fdisk_ask_menu() [Karel Zak]
- add initializer to geometry [Karel Zak]
- add missing va_end() [coverity scan] [Karel Zak]
- check alignment reset return codes [Karel Zak]
- fix fdisk_partition_start_follow_default() docs [Karel Zak]
- make pointer arrays const [Max Kellermann]
- make sure libblkid uses the same sector size [Karel Zak]
liblastlog2:
- Improved sqlite3 error handling [Stefan Schubert]
- tests provide fallback PATH_MAX definition [Pino Toscano]
libmount:
- (docs) add missing api indexes [Karel Zak]
- (loop) detect and report lost loop nodes [Karel Zak]
- Add API to get/set unique IDs [Karel Zak]
- Add integer type headers to private header file [Karel Zak]
- Fix access check for utab in context [Karel Zak]
- Fix atime remount for new API [Karel Zak]
- Fix export of mnt_context_is_lazy and mnt_context_is_onlyonce [Matt Turner]
- add API to read ID by statx() [Karel Zak]
- add X-mount.nocanonicalize[=source|target] [Karel Zak]
- add functions to use error buffer [Karel Zak]
- add listmount() sample [Karel Zak]
- add mnt_context_sprintf_errmsg() [Karel Zak]
- add mnt_table_find_[uniq]_id() function [Karel Zak]
- add mount-api-utils.h to mountP.h [Karel Zak]
- add private mnt_context_read_mesgs() [Karel Zak]
- add statmount to features list [Karel Zak]
- add support for listmount() [Karel Zak]
- add support for statmount() [Karel Zak]
- cleanup comments [Karel Zak]
- create EROFS loopdev only after ENOTBLK [Karel Zak]
- don't hold write fd to mounted device [Jan Kara]
- don't initialize variable twice (#2714) [Thorsten Kukuk]
- expose exec errors [Karel Zak]
- extract common error handling function [John Keeping]
- fix __table_insert_fs() [Karel Zak]
- fix comment typo for mnt_fs_get_comment() [Tianjia Zhang]
- fix copy & past bug in lock initialization [Karel Zak]
- fix mnt_fs_match_target() [Karel Zak]
- fix possible memory leak [Karel Zak]
- fix table_init_listmount() [Karel Zak]
- fix tree FD usage in subdir hook [Karel Zak]
- fix typo in symbols list [Karel Zak]
- fix umount --read-only [Karel Zak]
- fix use-after free, etc. [coverity scan] [Karel Zak]
- ifdef STATMOUNT_* in sample [Karel Zak]
- ifdef STATX_MNT_ID_UNIQUE [Karel Zak]
- ifdef listmount and statmount stuff [Karel Zak]
- implement ro[=vfs,fs] [Karel Zak]
- improve error messages in ID-mapping hook [Karel Zak]
- improve fs->stmnt_done mask use [Karel Zak]
- improve how library generates fs->optstr [Karel Zak]
- improving readability [Karel Zak]
- improving robustness in reading kernel messages [Karel Zak]
- make sure "option=" is used as string [Karel Zak]
- map unsupported LISTMOUNT_REVERSE to ENOSYS [Karel Zak]
- propagate first error of multiple filesystem types [John Keeping]
- read all types of kernel messages [Karel Zak]
- reduce size of syscall-failed message [Karel Zak]
- remember parsed propagation [Karel Zak]
- remove unnecessary include [Karel Zak]
- report kernel message from new API [Karel Zak]
- support X-mount.noloop [Karel Zak]
- support bind symlink over symlink [Karel Zak]
- update tests [Karel Zak]
- use __unused__ for dummy get_mnt_id() [Karel Zak]
- use regular function to save/reset syscalls status [Karel Zak]
- use unique ID in utab [Karel Zak]
libmount/context_mount:
- fix argument number comments [nilfsuser5678]
libmount/hooks:
- make `hooksets` array const [Max Kellermann]
libmount/utils:
- add pidfs to pseudo fs list [Mike Yuan]
libsmartcol docs:
- Format samples, lists, tables [FeRD (Frank Dana)]
libsmartcols:
- (filter) accept prefixes like k, M, G as a parts of a number [Karel Zak, Masatake YAMATO]
- (filter) check vasprintf() return value [Karel Zak]
- (filter) emulate YYerror for old Bison [Karel Zak]
- (filter) use variable argument lists for yyerror() [Karel Zak]
- (sample) add wrap repeating example [Karel Zak]
- add printf api to fill in column data [Robin Jarry]
- add support for terminal hyperlinks [Karel Zak]
- fix column reduction [Karel Zak]
- fix reduction stages use [Karel Zak]
- make __attributes__ more portable [Karel Zak]
- make pointer arrays const [Max Kellermann]
- print empty arrays in better way [Karel Zak]
- reset wrap after calculation [Karel Zak]
libsmartcols/src/Makemodule.am:
- ensure filter-scanner/paser.c file is newer than the .h file [Chen Qi]
libuuid:
- (man) fix function declarations [CismonX]
- add helper to set version and variant in uuid_t [Thomas Weißschuh]
- add support for RFC9562 UUIDs [Thomas Weißschuh]
- clear uuidd cache on fork() [Thomas Weißschuh]
- construct UUIDv6 without "struct uuid" [Thomas Weißschuh]
- construct UUIDv7 without "struct uuid" [Thomas Weißschuh]
- drop check for HAVE_TLS [Thomas Weißschuh]
- drop duplicate assignment liuuid_la_LDFLAGS [Karel Zak]
- fix gcc15 warnings [Cristian Rodríguez]
- fix v6 generation [Thomas Weißschuh]
- link test_uuid_time with pthread [Thomas Weißschuh]
- set variant in the corrrect byte __uuid_set_variant_and_version [oittaa]
- split uuidd cache into dedicated struct [Thomas Weißschuh]
- support non-cached scenarios (when -lpthread is unavailable) [Karel Zak]
- test time-based UUID generation [Thomas Weißschuh]
logger:
- (man) fix --socket-error [Karel Zak]
- correctly format tv_usec [Thomas Weißschuh]
- do not show arguments of --socket-errors as optional in --help [Benno Schulenberg]
- grammarize the description of --socket-errors in the man page [Benno Schulenberg]
- handle failures of gettimeofday() [Thomas Weißschuh]
- rework error handling in logger_gettimeofday() [Thomas Weißschuh]
login:
- actually honour $HOME for chdir() [Lennart Poettering]
- add LOGIN_ENV_SAFELIST /etc/login.def item [Karel Zak]
login,libblkid:
- use econf_readConfig rather than deprecated econf_readDirs [Karel Zak]
login-utils:
- make pointer arrays const [Max Kellermann]
login-utils/su-common:
- Check that the user didn't change during PAM transaction [Marco Trevisan (Treviño)]
- Validate all return values again [Thomas Weißschuh]
losetup:
- losetup.8 Clarify --direct-io [Colin Walters]
lsblk:
- (refactor) refer to a parameter instead of a file static var [Masatake YAMATO]
- add --hyperlink command line option [Karel Zak]
- add --properties-by option [Karel Zak]
- simplify SOURCES code [Karel Zak]
- update --help [Karel Zak]
- update bash-completion/lsblk [Karel Zak]
lsclocks:
- fix FD leak [Karel Zak]
- fix dynamic clock ids [Thomas Weißschuh]
lscpu:
- Add FUJITSU aarch64 MONAKA cpupart [Emi, Kisanuki]
- New Arm Cortex part numbers [Jeremy Linton]
- Skip aarch64 decode path for rest of the architectures [Pratik R. Sampat]
- add --raw command line option [Karel Zak]
- add procfs–sysfs dump from Milk-V Pioneer [Jan Engelhardt]
- don't use NULL sharedmap [Karel Zak]
- fix incorrect number of sockets during hotplug [Anjali K]
- initialize all variables (#2714) [Thorsten Kukuk]
- make code more readable [Karel Zak]
- make three column descriptions more grammatical [Benno Schulenberg]
- optimize query virt pci device [Guixin Liu]
- restructure op-mode printing [Thomas Weißschuh]
- skip frequencies of 0 MHz when getting minmhz [Ricardo Neri]
- use CPU types de-duplication [Karel Zak]
- use bool type in control structs [Karel Zak]
lsfd:
- (bugfix) fix wrong type usage in anon_bpf_map_fill_column [Masatake YAMATO]
- (cosmetic) normalize whitespaces [Masatake YAMATO]
- (man) add commas between SEE ALSO items [Jakub Wilk]
- (man) add more filter examples related to unix stream sockets [Masatake YAMATO]
- (man) fix license name [Jakub Wilk]
- (man) fix the decoration of an optional parameter [Masatake YAMATO]
- (man) fix typos [Jakub Wilk]
- (po-man) update po4a.cfg [Karel Zak]
- (refactor) add abst_class as super class of file_class [Masatake YAMATO]
- (refactor) flatten bit fields in struct file [Masatake YAMATO]
- (refactor) make the steps for new_file consistent [Masatake YAMATO]
- (refactor) rename a local variable and a parameter [Masatake YAMATO]
- (refactor) rename a member of struct proc [Masatake YAMATO]
- (refactor) rename add_nodevs to read_mountinfo [Masatake YAMATO]
- (refactor) simplify the step to copy a file struct if the result of its stat is reusable [Masatake YAMATO]
- (refactor) simplify the step to make a file struct [Masatake YAMATO]
- (refactor) split the function processing mountinfo file [Masatake YAMATO]
- (refactor) store a mnt_namespace object to struct process [Masatake YAMATO]
- (refactor) use a binary tree as the implementation for mnt_namespaces [Masatake YAMATO]
- (refactor) use ul_path_statf and ul_path_readlinkf [Masatake YAMATO]
- (tests) skip tests using fd flags on qemu-user [Thomas Weißschuh]
- Gather information on target socket's net namespace [Dmitry Safonov]
- Refactor the pidfd logic into lsfd-pidfd.c [Xi Ruoyao]
- Support pidfs [Xi Ruoyao]
- add --_drop-prvilege option for testing purpose [Masatake YAMATO]
- add --hyperlink command line option [Karel Zak, Masatake YAMTO]
- add BPF-PROG.TAG column [Masatake YAMATO]
- add ERROR as a new type [Masatake YAMATO]
- add LSFD_DEBUG env var for debugging [Masatake YAMATO]
- add meson.build for the command [Masatake YAMATO]
- avoid accessing an uninitialized value [Masatake YAMATO]
- consolidate add_column() [Karel Zak]
- don't enable hyperlinks for deleted files [Masatake YAMATO]
- enable hyperlinks only for regular files and directories [Masatake YAMATO]
- extend nodev table to decode "btrfs" on SOURCE column [Masatake YAMATO]
- finalize abst_class [Masatake YAMATO]
- fix typos of a function name [Masatake YAMATO]
- include buffer.h in decode-file-flags.h [Thomas Weißschuh]
- include linux/fcntl.h [Thomas Weißschuh]
- make the way to read /proc/$pid/mountinfo robust [Masatake YAMATO]
- minimize the output related to lsfd itself [Masatake YAMATO]
- move interface of decode-file-flags to header [Thomas Weißschuh]
- move the source code to new ./lsfd-cmd directory [Masatake YAMATO]
- read /proc/$pid/ns/mnt earlier [Masatake YAMATO]
- remove C++ comment [Karel Zak]
- support AF_VSOCK sockets [Masatake YAMATO]
- test Adapt test cases for pidfs [Xi Ruoyao]
- update bpf related tables [Masatake YAMATO]
lsfd,test_mkfds:
- (refactor) specify the variable itself as an operand of sizeof [Masatake YAMATO]
lsfd-cmd:
- make pointer arrays const [Max Kellermann]
lsipc:
- (man) add note about default outputs [Karel Zak]
- fix semaphore USED counter [Karel Zak]
- improve variable naming [Karel Zak]
lsirq:
- add option to limit cpus [Robin Jarry]
lsirq,irqtop:
- add threshold option [Robin Jarry]
- cleanup threshold datatype [Karel Zak]
lslocks:
- don't abort gathering per-process information even if opening a /proc/[0-9]* fails [Masatake YAMATO]
- fix buffer overflow [Karel Zak]
- remove a unused local variable [Masatake YAMATO]
- remove deadcode [coverity scan] [Karel Zak]
- remove unnecessary code [Karel Zak]
lslogins:
- Add support for lastlog2 [Stefan Schubert]
- don't ignore stat error [Thorsten Kukuk]
lsmem:
- improve coding style [Karel Zak]
- make an error message identical to one used in seven other places [Benno Schulenberg]
- make lsmem to check for the nodes more robust [zhangyao]
lsns:
- (man) make the namespace parameter optional [Masatake YAMATO]
- (refactor) add get_{parent|owner}_ns_ino() implementing some parts of get_ns_ino() [Masatake YAMATO]
- (refactor) give a enumeration name 'lsns_type' to LSNS_TYPE_ enumerators [Masatake YAMATO]
- (refactor) make the function names for reading namespaces consistent [Masatake YAMATO]
- (refactor) rename LSNS_ID_.* to LSNS_TYPE_.* [Masatake YAMATO]
- (refactor) rename get_ns_ino() to get_ns_inos() [Masatake YAMATO]
- (refactor) rename read_related_namespaces to connect_namespaces [Masatake YAMATO]
- (refactor) use get_{parent|owner}_ns_ino() in add_namespace_for_nsfd [Masatake YAMATO]
- (refactor) use ls_path_{openf|statf} to make the code simple [Masatake YAMATO]
- (refactor) use ul_new_path and procfs_process_init_path [Masatake YAMATO]
- List network namespaces that are held by a socket [Dmitry Safonov]
- add --filter option to the --help optout and the completion rule [Masatake YAMATO]
- add -H, --list-columns option [Masatake YAMATO]
- add a missing '=' character in the help message [Masatake YAMATO]
- add more print-debug code [Masatake YAMATO]
- check for mnt_fs_get_target return value [Karel Zak]
- continue the executing even if opening a /proc/$pid fails [Masatake YAMATO]
- don't call close(2) if unnecessary [Masatake YAMATO]
- fill the netsid member of lsns_process with reliable value [Masatake YAMATO]
- fix netns use [Karel Zak]
- fix ul_path_stat() error handling [coverity scan] [Karel Zak]
- ignore ESRCH errors reported when accessing files under /proc [Masatake YAMATO]
- implement -Q, --filter option [Masatake YAMATO]
- report with warnx if a namespace related ioctl fails with ENOSYS [Masatake YAMATO]
- show namespaces only kept alive by open file descriptors [Masatake YAMATO]
- tolerate lsns_ioctl(fd, NS_GET_{PARENT,USERNS}) failing with ENOSYS [Masatake YAMATO]
- verify the uniqueness of a namespace in ls->namespaces list [Masatake YAMATO]
man pages:
- document `--user` option for `runuser` [Christoph Anton Mitterer]
- use `user` rather than `username` [Christoph Anton Mitterer]
- use the same verb for --version as for --help, like in usages [Benno Schulenberg]
mesg:
- remove ability to compile with fchmod(S_IWOTH) [Karel Zak]
meson:
- Add build-blkdiscard option [Jordan Williams]
- Add build-blkpr option [Jordan Williams]
- Add build-blkzone option [Jordan Williams]
- Add build-blockdev option [Jordan Williams]
- Add build-chcpu option [Jordan Williams]
- Add build-dmesg option [Jordan Williams]
- Add build-enosys option [Jordan Williams]
- Add build-fadvise option [Jordan Williams]
- Add build-fsfreeze option [Jordan Williams]
- Add build-hexdump option [Alexander Shursha]
- Add build-ipcmk option [Jordan Williams]
- Add build-ldattach option [Jordan Williams]
- Add build-lsclocks option [Jordan Williams]
- Add build-lsfd option and make rt dependency optional [Jordan Williams]
- Add build-rtcwake option [Jordan Williams]
- Add build-script option [Jordan Williams]
- Add build-scriptlive option [Jordan Williams]
- Add build-setarch option [Jordan Williams]
- Add have_pty variable to check if pty is available [Jordan Williams]
- Add missing check for build-ipcrm option [Jordan Williams]
- Check options for building lib_pam_misc [Alexander Shursha]
- Correctly require the Python.h header for the python dependency [Jordan Williams]
- Define _DARWIN_C_SOURCE on macOS as is done in Autotools [Jordan Williams]
- Disable targets requiring pam when it is missing [Jordan Williams]
- Don't define HAVE_ENVIRON_DECL when environ is unavailable [Jordan Williams]
- Enforce sqlite dependency for liblastlog2 [Jordan Williams]
- Fix build by default and install behavior for build-pipesz option [Jordan Williams]
- Fix build-python option [Jordan Williams]
- Fix checking options build-bits. [Alexander Shursha]
- Fix false positive detection of mempcpy on macOS [Jordan Williams]
- Make ncurses dependency a disabler when not found [Jordan Williams]
- Make the zlib dependency a disabler when not found [Jordan Williams]
- Make tinfo dependency a disabler when not found [Jordan Williams]
- Only build blkzone and blkpr if the required linux header exists [Jordan Williams]
- Only build libmount python module if python was found [Fabian Vogt]
- Only build libmount when required [Jordan Williams]
- Only pick up the rt library once [Jordan Williams]
- Only require Python module when building pylibmount [Jordan Williams]
- Only require the crypt library when necessary [Jordan Williams]
- Only use the --version-script linker flag where it is supported [Jordan Williams]
- Remove libblkid dependency on libmount [Jordan Williams]
- Require Python dependency which can be embedded for pylibmount [Jordan Williams]
- Require pty for the su and runuser executables [Jordan Williams]
- Require the seminfo type for ipcmk, ipcrm, and ipcs [Jordan Williams]
- Require the sys/vfs.h header for libmount and fstrim [Jordan Williams]
- Use has_type instead of sizeof to detect cpu_set_t type [Jordan Williams]
- Use is_absolute to determine if the prefix directory is absolute [Jordan Williams]
- Use libblkid as a dependency [Jordan Williams]
- Use libmount as a dependency [Jordan Williams]
- add -D tty-setgid=[false|true] [Karel Zak]
- add HAVE_LIBPTHREAD [Karel Zak]
- add checking build-cal [Alexander Shursha]
- add checking build-findfs. [Alexander Shursha]
- add forgotten files to lists [Zbigniew Jędrzejewski-Szmek]
- add missing `is_disabler` checks [Sam James]
- add missing sample-mount-overwrite [Karel Zak]
- add options for more utilities [Rosen Penev]
- avoid future-deprecated feature [Thomas Weißschuh]
- check for BPF_OBJ_NAME_LEN and linux/bpf.h [Karel Zak]
- check for blkzoned.h [Karel Zak]
- check for statmount and listmount syscalls [Karel Zak]
- checking build_libblkid for manadocs [Alexander Shursha]
- checking build_libsmartcols for manadocs. [Alexander Shursha]
- correctly detect posix_fallocate [Chris Hofstaedtler]
- define have_linux_blkzoned_h [Frantisek Sumsal]
- do not hardcode /var in uuidd-sysusers.conf. [Karel Zak]
- don't install getopt examples if disabled [Rosen Penev]
- fix LIBBLKID_VERSION definition [Karel Zak]
- fix after rebase [Karel Zak]
- fix build of lslogins with -Dbuild-liblastlog2=disabled [Thomas Weißschuh]
- fix checking build-cramfs [Alexander Shursha]
- fix checking build-login [Alexander Shursha]
- fix checking build-sulogin [Alexander Shursha]
- fix disablement check [Zbigniew Jędrzejewski-Szmek]
- fix generated header paths [amibranch]
- fix mismatch with handling of lib_dl dependency [Zbigniew Jędrzejewski-Szmek]
- generate man page translations [Jordan Williams]
- install lastlog2.h library header file [Karel Zak]
- po disable if nls is disabled [Rosen Penev]
- remove unused lastlog-compat-symlink option [Jordan Williams]
- respect c_args/CFLAGS when generating syscalls/errnos [Thomas Weißschuh]
- run compiler checks with -D_GNU_SOURCE when necessary [Thomas Weißschuh]
- simplify code [Yang Kun]
- test for pidfd_getfd() [Thomas Weißschuh]
- use a / b instead of join_paths(a, b) [Dmitry V. Levin]
- use files() for man page source files [Jordan Williams]
- use signed chars [Thomas Weißschuh]
- use tmpfilesdir pkg-config variable [Karel Zak]
misc-utils:
- make pointer arrays const [Max Kellermann]
- uuidd Use ul_sig_err instead of errx [Cristian Rodríguez]
mkfs.cramfs:
- in usage text, separate two direct arguments from options [Benno Schulenberg]
mkswap:
- add features list to --version output [Karel Zak]
- fix includes [Karel Zak]
- improve --file option for use on btrfs [Karel Zak]
- remove unused variable for non-nocow systems [Karel Zak]
- set selinux label also when creating file [Zbigniew Jędrzejewski-Szmek]
mkswap.8.adoc:
- update note regarding swapfile creation [Mike Yuan]
more:
- fix compilation [Yang Kun]
- fix poll() use [Karel Zak]
- make sure we have data on stderr [Karel Zak]
- remove second check for EOF (#2714) [Thorsten Kukuk]
mount:
- (man) add note about -o bind,rw [Karel Zak]
- (man) add note about symlink over symlink [Karel Zak]
- print info and warning messages [Karel Zak]
- properly mark the arguments of the 'ro' and 'rw' extended options [Benno Schulenberg]
- use ul_optstr_is_valid() [Karel Zak]
nsenter:
- Provide an option to join target process's socket net namespace [Dmitry Safonov]
- Rewrite --user-parent to use pidfd [Karel Zak]
- add functions to enable/disable namespaces [Karel Zak]
- improve portability to older kernels [Karel Zak]
- reuse pidfd for --net-socket [Karel Zak]
- support empty environ[] [Karel Zak]
- use macros to access the nsfiles array [Karel Zak]
- use pidfd to enter target namespaces [Karel Zak]
- use separate function to enter namespaces [Karel Zak]
pam_lastlog2:
- drop duplicate assignment pam_lastlog2_la_LDFLAGS [Thomas Weißschuh]
- link against liblastlog [Thomas Weißschuh]
- remove symbol that doesn't exist from version script [psykose]
partx:
- Fix example in man page [Michal Suchanek]
pg:
- make sure cmdline[] not overflow [coverity scan] [Karel Zak]
po:
- merge changes [Karel Zak]
- update cs.po (from translationproject.org) [Petr Písař]
- update de.po (from translationproject.org) [Mario Blättermann]
- update es.po (from translationproject.org) [Antonio Ceballos Roa]
- update fr.po (from translationproject.org) [Frédéric Marchal]
- update hr.po (from translationproject.org) [Božidar Putanec]
- update ja.po (from translationproject.org) [Hideki Yoshida]
- update ko.po (from translationproject.org) [Seong-ho Cho]
- update nl.po (from translationproject.org) [Benno Schulenberg]
- update pl.po (from translationproject.org) [Jakub Bogusz]
- update pt_BR.po (from translationproject.org) [Rafael Fontenelle]
- update ro.po (from translationproject.org) [Remus-Gabriel Chelu]
- update sr.po (from translationproject.org) [Мирослав Николић]
- update tr.po (from translationproject.org) [Emir SARI]
- update uk.po (from translationproject.org) [Yuri Chornoivan]
- update zh_CN.po (from translationproject.org) [Mingye Wang (Artoria2e5)]
po-man:
- add asciidoctor --trace [Karel Zak]
- add missing asciidoctor-unicodeconverter [Karel Zak]
- add missing langs to po4a.cfg [Karel Zak]
- add missing pages, improve output [Karel Zak]
- cleanup install [Karel Zak]
- fix 'make dist' [Karel Zak]
- fix typo, update .gitignore [Karel Zak]
- fix uninstall [Karel Zak]
- improve translation and install scripts [Karel Zak]
- merge changes [Karel Zak]
- move scripts tools/ [Karel Zak]
- rewrite autotools code [Karel Zak]
- update de.po (from translationproject.org) [Mario Blättermann]
- update fr.po (from translationproject.org) [Frédéric Marchal]
- update ko.po (from translationproject.org) [Seong-ho Cho]
- update pt_BR.po (from translationproject.org) [Rafael Fontenelle]
- update ro.po (from translationproject.org) [Remus-Gabriel Chelu]
- update sr.po (from translationproject.org) [Мирослав Николић]
- update uk.po (from translationproject.org) [Yuri Chornoivan]
prlimit:
- in man page, mark --resource as placeholder, not literal option [Benno Schulenberg]
readprofile:
- put two things that belong together into a single message [Benno Schulenberg]
rename:
- use ul_basename() [Karel Zak]
renice:
- put text that belongs together into a single translatable message [Benno Schulenberg]
rev:
- Check for wchar conversion errors [Tim Hallmann]
- standardize the usage header, making the synopsis equal to another [Benno Schulenberg]
schedutils:
- make pointer arrays const [Max Kellermann]
script:
- mention in usage that value for <size> may have a suffix [Benno Schulenberg]
scriptlive:
- add --echo <never|always|auto> [Karel Zak]
- echo re-run commands from in stream [Matt Cover]
scriptreplay:
- add key bindings info to --help [Karel Zak]
- fix compiler warning [Karel Zak]
- fix uninitialized value [coverity scan] [Karel Zak]
setpriv:
- (tests) add seccomp test [Thomas Weißschuh]
- Add --ptracer, which calls PR_SET_PTRACER [Geoffrey Thomas]
- add support for seccomp filters [Thomas Weißschuh]
- consistently use "<caps>" to indicate a list of capabilities [Benno Schulenberg]
- describe --groups more correctly in the usage text [Benno Schulenberg]
- make message for failing PR_GET_PDEATHSIG the same as the other [Benno Schulenberg]
setpriv.c:
- fix memory leak in parse_groups function [AntonMoryakov]
setterm:
- Document behavior of redirection [Stanislav Brabec]
- improve "bright %s" error message [Karel Zak]
- mark literal values in the man page in bold [Benno Schulenberg]
- put an option and its description in a single message [Benno Schulenberg]
sfdisk:
- add --discard-free [Karel Zak]
- add --sector-size commanand line option [Karel Zak]
- ignore last-lba from script on --force [Karel Zak]
- make sure partition number > 0 [coverity scan] [Karel Zak]
strutils.h:
- Include strings.h header for strncasecmp function [Jordan Williams]
su:
- fix use after free in run_shell [Tanish Yadav]
- use lib/env.c for --whitelist-environment [Karel Zak]
su, agetty:
- don't use program_invocation_short_name for openlog() [Karel Zak]
sulogin:
- extend --version features list [Karel Zak]
- fix POSIX locale use [Karel Zak]
swapoff:
- avoid being killed by OOM [Karel Zak]
sys-utils:
- (save_adjtime) fix memory leak [Maks Mishin]
- (setpriv) fix potential memory leak [Maks Mishin]
- fix add NULL check for mnt_fs_get_target return value [AntonMoryakov]
- fixed build system for POSIX IPC tools [Prasanna Paithankar]
- hwclock-rtc fix pointer usage [Karthikeyan Krishnasamy]
- make pointer arrays const [Max Kellermann]
- remove redundant comparison in read_hypervisor_dmi in lscpu-virt.c [Anton Moryakov]
- warns if mqueue fs is not mounted [Prasanna Paithankar]
sys-utils/irq-common:
- fix SPDX typos [Karel Zak]
sys-utils/setarch.c:
- fix build with uclibc-ng < 1.0.39 [Fabrice Fontaine]
sys-utils/setpgid:
- fix --help typo (foregound > foreground) + alignment [Emanuele Torre]
- make -f work [Emanuele Torre]
term-utils:
- make pointer arrays const [Max Kellermann]
test:
- (test_mkfds) add -O option for describing output values [Masatake YAMATO]
test_mkfds:
- (bugfix) listing ALL output values for a given factory [Masatake YAMATO]
- (cosmetic) remove whitespaces between a function and its arguments [Masatake YAMATO]
- reserve file descriptors in the early stage of execution [Masatake YAMATO]
tests:
- (findmnt) add a case testing -Q option [Masatake YAMATO]
- (functions.sh) add a helper funcion making a device number from given major and minor nums [Masatake YAMATO]
- (liblastlog2) don't write to stderr and stdout [Karel Zak]
- (lsfd) add a case testing ERROR type appeared in TYPE column [Masatake YAMATO]
- (lsfd) don't refer "$?" on the line follwoing the use of "local" [Masatake YAMATO]
- (lsfd) fix typoes in an error name [Masatake YAMATO]
- (lsfd) quote '$' in patterns in a case/esac block [Masatake YAMATO]
- (lsfd) skip some cases if NETLINK_SOCK_DIAG for AF_UNIX is not available [Masatake YAMATO]
- (lsfd) verify SOCK.NETID and ENDPOINTS for sockets made in another netns [Masatake YAMATO]
- (lsfd-functions.bash) add a missing constant [Masatake YAMATO]
- (lsfd-functions.bash,cosmetic) unify the style to define functions [Masatake YAMATO]
- (lsfdmkfds-bpf-prog) verify BPF-PROG.{ID,TAG} column [Masatake YAMATO]
- (lsfdmkfds-inotify) consider environments not having / as a mount point [Masatake YAMATO]
- (lsfdmkfds-inotify-btrfs) test INOTIFY.INODES cooked output [Masatake YAMATO]
- (lsfdmkfds-multiplexing) skip if /proc/$pid/syscall is broken [Masatake YAMATO]
- (lsfdmkfds_vsock) skip if diag socket for AF_VSOCK is unavailable [Masatake YAMATO]
- (lslogins) use GMT timezone [Karel Zak]
- (lslogins) use fixed time format [Karel Zak]
- (lslogins) write to TS_OUTDIR only, check for sqlite3 [Karel Zak]
- (lsns) add a case testing -Q, --filter option [Masatake YAMATO]
- (lsns) verify the code finding an isolated netns via socket [Masatake YAMATO]
- (lsnsfiledesc) enable debug output and show the exit status [Masatake YAMATO]
- (lsnsfiledesc) skip if NS_GET_NSTYPE ioctl cmd not available [Masatake YAMATO]
- (lsnsfilter) add more debug printing [Masatake YAMATO]
- (lsnsfilter) delete an unused variable [Masatake YAMATO]
- (lsnsfilter) don't use double-quotes chars for PID [Masatake YAMATO]
- (lsnsfilter) skip if /proc/self/uid_map is not writable [Masatake YAMATO]
- (lsnsioctl_ns) add more debug print [Masatake YAMATO]
- (lsnsioctl_ns) record stdout/stderr for debugging the case [Masatake YAMATO]
- (nsenter) verify the code entering the network ns via socket made in the ns [Masatake YAMATO]
- (test_mkfds) add a missing word in a comment [Masatake YAMATO]
- (test_mkfds) don't close fds and free memory objects when exiting with EXIT_FAILURE [Masatake YAMATO]
- (test_mkfds) fix a typo in an option name [Masatake YAMATO]
- (test_mkfds) fix the way to detect errors in fork(2) [Masatake YAMATO]
- (test_mkfds) save errno before calling system calls for clean-up [Masatake YAMATO]
- (test_mkfds, cosmetic) add an empty line before the definition of struct sysvshm_data [Masatake YAMATO]
- (test_mkfds, refactor) use xmemdup newly added in xalloc.h [Masatake YAMATO]
- (test_mkfds,refactor) simplify nested if conditions [Masatake YAMATO]
- (test_mkfdsbpf-prog) report id and tag [Masatake YAMATO]
- (test_mkfdsforeign-sockets) new factory [Masatake YAMATO]
- (test_mkfdsmake-regular-file) fix the default union member for \"readable\" parameter [Masatake YAMATO]
- (test_mkfdsmmap) new factory [Masatake YAMATO]
- (test_mkfdsmultiplexing) fix the factory description [Masatake YAMATO]
- (test_mkfdsnetlink) pass a correct file descriptor to bind(2) [Masatake YAMATO]
- (test_mkfdssockdiag) new factory [Masatake YAMATO]
- (test_mkfdssockdiag) support AF_VSOCK family [Masatake YAMATO]
- (test_mkfdssockdiag) verify the recieved message to detect whether the socket is usable or not [Masatake YAMATO]
- (test_mkfdsuserns) add a new factory [Masatake YAMATO]
- (test_sysinfo) add a helper to call xgethostname [Masatake YAMATO]
- (test_sysinfo) add a helper to detect NS_GET_USERNS [Masatake YAMATO]
- add --fcntl testing to flock [Rasmus Villemoes]
- add X-mount.nocanonicalize tests [Karel Zak]
- add color schema to cal(1) tests [Karel Zak]
- add dump from ARM with A510+A710+A715+X3 [Karel Zak]
- add findmnt --kernel=listmount [Karel Zak]
- add mount-api-utils.h to linux only ifdef [Karel Zak]
- add skips when IPv6 is not supported [LiviaMedeiros]
- add su --whitelist-environment test [Karel Zak]
- fdisk/bsd Update expected output for alpha [John Paul Adrian Glaubitz]
- include <sys/mount.h> only on Linux [Pino Toscano]
- prepare flock for testing --fcntl [Rasmus Villemoes]
- properly look for ts_cap helper [Thomas Weißschuh]
- update dmesg deltas [Karel Zak]
- update findmnt -Q tests [Karel Zak]
- update lscpu vmware_fpe output [Karel Zak]
text-utils:
- add bits command [Robin Jarry]
- make pointer arrays const [Max Kellermann]
textual:
- consistently mark "=" as literal before an optional argument [Benno Schulenberg]
- fix some typos and inconsistencies in usage and error messages [Benno Schulenberg]
- fix three misspellings of "unsupported" [Benno Schulenberg]
- give seven error messages the same form as two others [Benno Schulenberg]
- make two incorrect synopses identical to a better one [Benno Schulenberg]
- remove other inconsistent uses of "=" before option argument [Benno Schulenberg]
textutils:
- introduce and use fgetwc_or_err [Thomas Weißschuh]
- use fgetwc() instead of getwc() [Thomas Weißschuh]
tmpfiles:
- add and install for uuidd, generate /run/uuidd & /var/lib/libuuid [Christian Hesse]
- depend on systemd... [Christian Hesse]
treewide:
- use fgetc() instead of getc() [Thomas Weißschuh]
- use scols printf api where possible [Robin Jarry]
umount, losetup:
- Document loop destroy behavior [Stanislav Brabec]
unshare:
- Add options to identity map the user's subordinate uids and gids [David Gibson]
- don't mark "|" and "" as part of the placeholders [Benno Schulenberg]
- don't use "=" before a required option argument [Benno Schulenberg]
- in usage text, reshuffle options into somewhat related groups [Benno Schulenberg]
- load binfmt_misc interpreter [Laurent Vivier]
- mount binfmt_misc [Laurent Vivier]
- use single asterisks around long options, double around values [Benno Schulenberg]
usage:
- mention also the missing KiB and MiB as permissible suffixes [Benno Schulenberg]
uuidd:
- add sysusers file [Zbigniew Jędrzejewski-Szmek]
- fix /var/lib/libuuid mode uuidd-tmpfiles.conf [Karel Zak]
- fix typo in tmpfiles.conf [Karel Zak]
uuidd.rc:
- create localstatedir in init script [Christian Hesse]
uuidgen:
- add support for RFC9562 UUIDs [Thomas Weißschuh]
- use xmalloc instead of malloc (#2714) [Thorsten Kukuk]
uuidparse:
- add support for RFC9562 UUIDs [Thomas Weißschuh]
- only report type/version for DCE variant [Thomas Weißschuh]
wall:
- always use utmp as fallback [Karel Zak]
- check sysconf() returnvalue [Karel Zak]
- fix escape sequence Injection [CVE-2024-28085] [Karel Zak]
- fix possible memory leak [Karel Zak]
- make sure unsigned variable not underflow [Karel Zak]
wdctl:
- always query device node when sysfs is unavailable [Thomas Weißschuh]
whereis:
- avoid accessing uninitialized memory [xiovwx]
wipefs:
- fix typo [Karel Zak]
xalloc.h:
- Include stdio.h header for vasprintf function [Jordan Williams]
- add xmemdup [Masatake YAMATO]
zramctl:
- add COMP-RATIO column [Karel Zak, davidemanin]
- add algorithm-params to bash-completion [Karel Zak]
- add support for `algorithm_params` [LiviaMedeiros]
- fix typo and memory leak [Karel Zak]
- improve grammar in usage and don't gettextize list of algorithms [Benno Schulenberg]
- rename `--params` into `--algorithm-params` [LiviaMedeiros]
- support -o+list notation [Karel Zak]
- spelling and grammar fixes [Ville Skyttä]
- Fixed report error code in blockdev. - Minor:
- Added a period at the end of "--rereadpt" description. [EvgeniyRogov]
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.41-rc1
From: Christian Brauner @ 2025-02-19 13:12 UTC (permalink / raw)
To: Karel Zak
Cc: Miklos Szeredi, Amir Goldstein, Jeff Layton, Josef Bacik,
linux-kernel, linux-fsdevel, util-linux
In-Reply-To: <yjic6yol5fmaftythlppbfoafsaqhaoh77spzp6m2izd757pcg@siegv7vwz6lf>
On Tue, Feb 18, 2025 at 10:08:22PM +0100, Karel Zak wrote:
>
> The util-linux release v2.41-rc1 is now available at
>
> http://www.kernel.org/pub/linux/utils/util-linux/v2.41/
>
> Feedback and bug reports, as always, are welcomed.
>
> Karel
>
>
>
> util-linux 2.41 Release Notes
> =============================
[...]
>
> libmount:
> - Added experimental support for statmount() and listmount() syscalls.
> - This new functionality can be accessed using "findmnt --kernel=listmount".
Very nice! Thanks for working on this!
^ permalink raw reply
* Re: [ANNOUNCE] util-linux v2.41-rc1
From: Samuel Thibault @ 2025-02-20 11:18 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
In-Reply-To: <yjic6yol5fmaftythlppbfoafsaqhaoh77spzp6m2izd757pcg@siegv7vwz6lf>
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
Hello,
Karel Zak, le mar. 18 févr. 2025 22:08:22 +0100, a ecrit:
> The util-linux release v2.41-rc1 is now available at
>
> http://www.kernel.org/pub/linux/utils/util-linux/v2.41/
>
> Feedback and bug reports, as always, are welcomed.
Here is a patch to fix missing references to mq_open/close.
With regards,
Samuel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1229 bytes --]
diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
index ec3f27f06..35a1e2081 100644
--- a/sys-utils/Makemodule.am
+++ b/sys-utils/Makemodule.am
@@ -36,7 +36,7 @@ usrbin_exec_PROGRAMS += ipcmk
MANPAGES += sys-utils/ipcmk.1
dist_noinst_DATA += sys-utils/ipcmk.1.adoc
ipcmk_SOURCES = sys-utils/ipcmk.c
-ipcmk_LDADD = $(LDADD) $(POSIXIPC_LIBS) libcommon.la
+ipcmk_LDADD = $(LDADD) $(POSIXIPC_LIBS) $(MQ_LIBS) libcommon.la
endif
if BUILD_IPCRM
@@ -46,7 +46,7 @@ dist_noinst_DATA += sys-utils/ipcrm.1.adoc
ipcrm_SOURCES = sys-utils/ipcrm.c \
sys-utils/ipcutils.c \
sys-utils/ipcutils.h
-ipcrm_LDADD = $(LDADD) $(POSIXIPC_LIBS) libcommon.la
+ipcrm_LDADD = $(LDADD) $(POSIXIPC_LIBS) $(MQ_LIBS) libcommon.la
endif
if BUILD_IPCS
@@ -56,7 +56,7 @@ dist_noinst_DATA += sys-utils/ipcs.1.adoc
ipcs_SOURCES = sys-utils/ipcs.c \
sys-utils/ipcutils.c \
sys-utils/ipcutils.h
-ipcs_LDADD = $(LDADD) $(POSIXIPC_LIBS) libcommon.la
+ipcs_LDADD = $(LDADD) $(POSIXIPC_LIBS) $(MQ_LIBS) libcommon.la
endif
if BUILD_IRQTOP
@@ -593,4 +593,4 @@ if HAVE_LINUX_LANDLOCK_H
setpriv_SOURCES += sys-utils/setpriv-landlock.c
endif
setpriv_LDADD = $(LDADD) -lcap-ng libcommon.la
-endif
\ No newline at end of file
+endif
^ permalink raw reply related
* Re: Bug#1098694: Crash in agetty due to invalid strncmp call in Trixie
From: Chris Hofstaedtler @ 2025-02-23 13:06 UTC (permalink / raw)
To: Florian Bach, 1098694; +Cc: util-linux
In-Reply-To: <5534c6e1-b819-4aaa-a8c1-fa22852e327b@vodafone.de>
Hello Florian,
thanks for your report.
I'm CC:ing upstream.
* Florian Bach <Leseratte10@vodafone.de> [250222 21:39]:
> I am running Debian Trixie in a Proxmox VM. I noticed that on the login
> screen there are errors of agetty crashing with a segfault. There's nothing
> special about the VM, it's a blank VM running the daily cloud images of
> Debian Trixie.
>
> The VM is running Linux 6.12.12-1 with util-linux 2.40.4-3 and libc6 2.40-7.
Could you provide some more info and also try something:
1) is this on amd64?
2) which terminal is this? tty1 or something else?
3) whats your kernel command line?
4) which image did you use exactly?
5) could you try util-linux 2.41-rc1 from experimental?
> I debugged this with ltrace and believe I found the error, or at least some
> invalid behaviour.
>
> In agetty.c in the debian sources for util-linux, right at the end of the
> function parse_args, there's code that tries to figure out the terminal name
> using a call to get_terminal_name. For some reason, this function call seems
> to fail on my machine and it prints the error "could not get terminal name".
>
> This causes it to set &op->tty to NULL, and unfortunately, a couple lines
> later, that variable is used in a strncmp call, causing it to crash.
>
> Here's the corresponding lines from the ltrace log:
>
> strtok(nil, ",") = nil
> free(0x557c64154be0) = <void>
> strcmp("-", "-") = 0
Looks like we're in term-utils/agetty.c line 929ff, which has a
comment:
/* resolve the tty path in case it was provided as stdin */
Which seems to be the default code path on systemd systems.
> isatty(0) = 0
> isatty(1) = 0
> isatty(2) = 0
This must have been get_terminal_stdfd from lib/ttyutils.c
> dcgettext(nil, "could not get terminal name: %d", 5) = "could not get
> terminal name: %d"
[..]
I think the relevant part would be seeing what /proc/<pid>/fd/0 ,
/proc/<pid>/fd/1 , /proc/<pid>/fd/2 point to.
> Upload at a filehoster and send the link in response to this bug report?
Attaching should be fine, possibly compressed. Probably an strace
log could be more insightful than the ltrace log.
> Unfortunately, I was not yet able to figure out why on my machine the code
> seems to run into this code path with the "could not get terminal name"
> warning.
> But nevertheless, it's a valid code path, and it's just a warning
> not an error, so the code that comes after it should be able to handle this
> without crashing.
Looks like commit 47831cc02ac0d71c335caecef1753f4c8861277c did not
take this into account fully. get_terminal_name resets *name to
NULL, and I think then op->tty ends up being NULL.
Related: https://github.com/util-linux/util-linux/issues/1546#issuecomment-1005855533
Chris
^ permalink raw reply
* Re: Bug#1098638: fdisk: creates partitions one sector too large
From: Chris Hofstaedtler @ 2025-02-23 13:22 UTC (permalink / raw)
To: Thorsten Glaser, 1098638-quiet; +Cc: util-linux
In-Reply-To: <5c513969-5e9f-cb0d-c62c-e153ca259915@mirbsd.de>
Control: tags -1 + upstream
Looping in upstream.
On Sat, Feb 22, 2025 at 12:57:38AM +0100, Thorsten Glaser wrote:
> Package: fdisk
> Version: 2.38.1-5+deb12u1
>
> When I create a new partition with +sectors, fdisk creates one
> that is one sector too large:
>
>
> Command (m for help): n
> Partition number (1-128, default 1):
> First sector (2048-7814037134, default 2048):
> Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-7814037134, default 7814035455): +2097152
>
> Created a new partition 1 of type 'Linux filesystem' and of size 1 GiB.
>
> Command (m for help): p
> Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
> Disk model: ST4000NM0245-1Z2
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disklabel type: gpt
> Disk identifier: DDA88AFF-1E6A-7448-AB5A-85470938DBC7
>
> Device Start End Sectors Size Type
> /dev/sdb1 2048 2099200 2097153 1G Linux filesystem
Also from Thorsten:
> Same for MBR:
>
>
> Command (m for help): n
> Partition type
> p primary (0 primary, 0 extended, 4 free)
> e extended (container for logical partitions)
> Select (default p): p
> Partition number (1-4, default 1): 1
> First sector (2048-1000215215, default 2048):
> Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-1000215215, default 1000215215): +2048
>
> Created a new partition 1 of type 'Linux' and of size 1 MiB.
>
> Command (m for help): p
> Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
> Disk model: SAMSUNG MZVLB512HBJQ-00000
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disklabel type: dos
> Disk identifier: 0x3cca69b4
>
> Device Boot Start End Sectors Size Id Type
> /dev/nvme0n1p1 2048 4096 2049 1M 83 Linux
I've briefly reproduced this with util-linux 2.41-rc1 on a loopdev.
From what I understand Thorsten is saying, he would expect, for a
partition that starts at sector 2048, when its created with "+2048"
size, to have a number of 2048 sectors, not 2049 as shown above.
I haven't looked at the code if this is intentional or what the
reason could be.
Best,
Chris
^ permalink raw reply
* Re: Bug#1098694: Crash in agetty due to invalid strncmp call in Trixie
From: Florian Bach @ 2025-02-23 13:40 UTC (permalink / raw)
To: Chris Hofstaedtler, 1098694; +Cc: util-linux
In-Reply-To: <tzuam3pqfrm6g7t4hwwapmpxxux75bf4vxd42qb6iode2hqnnx@ve4h5lyd3yp6>
[-- Attachment #1: Type: text/plain, Size: 2551 bytes --]
Hello Chris,
> 1) is this on amd64?
Yes, this is on amd64.
> 2) which terminal is this? tty1 or something else?
What do you mean with "is this"? The error messages show up on tty1, the
default terminal I get when booting Debian without a GUI installed. The
one where it says "Debian GNU/Linux trixie/sid <hostname> tty1". But the
agetty process that crashes seems to be trying to manage a different tty
(see below).
> 3) whats your kernel command line?
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.12.12-amd64
root=PARTUUID=add96c19-7043-4bb1-8899-ca970a7d33c8 ro console=tty0
console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0
> 4) which image did you use exactly?
I can reproduce the error with today's image,
debian-13-generic-amd64-daily-20250223-2032.qcow2, without any
additional modifications. I'm running this on a Proxmox host.
> 5) could you try util-linux 2.41-rc1 from experimental?
I have just installed util-linux 2.41~rc1-1 and its dependencies and
rebooted the VM, didn't change anything, the error / segfault is still
present.
> Attaching should be fine, possibly compressed. Probably an strace
> log could be more insightful than the ltrace log.
I have attached both an ltrace and an strace log to this email.
> Looks like commit 47831cc02ac0d71c335caecef1753f4c8861277c did not
> take this into account fully. get_terminal_name resets *name to
> NULL, and I think then op->tty ends up being NULL.
Yeah, that seems to be what happens. After I sent this bug report
yesterday, I also found out that someone has reported what I believe is
the same bug to upstream a while ago (
https://github.com/util-linux/util-linux/issues/3304 ) but so far nobody
has commented on that report.
Note that in the strace log I attached, it tries to open / access the
file at /run/credentials/serial-getty@ttyS0.service. My VM does not have
a serial port (since Proxmox VMs apparently don't have one by default).
If I add a serial port to the VM and then boot it, the errors are gone.
So maybe it tries to provide a serial console on ttyS0 due to the
"console=ttyS0,115200" in the kernel command line (I didn't put it
there, maybe it's the default?) and that fails because it doesn't exist?
If I run "cat /dev/ttyS0" on such a machine, I get "Input/output error".
When I add a serial port through proxmox (and the error is gone), the
"cat /dev/ttyS0" works (doesn't return because it's reading data).
So the issue seems to be related to a nonfunctioning serial port,
apparently.
Best regards,
Florian
[-- Attachment #2: ltrace_debug_log.txt --]
[-- Type: text/plain, Size: 3496 bytes --]
setlocale(LC_ALL, "") = "C.UTF-8"
bindtextdomain("util-linux", "/usr/share/locale") = "/usr/share/locale"
textdomain("util-linux") = "util-linux"
sigemptyset(<>) = 0
sigaction(SIGHUP, {0x1, <>, 0, nil}, {nil, <>, 0x2a4a15b8, 0x7fc1ce1b2eaa}) = 0
sigaction(SIGQUIT, {0x1, <>, 0, nil}, {nil, <>, 0x2a4a15b8, 0x7fc1ce1b2eaa}) = 0
sigaction(SIGINT, {0x1, <>, 0, nil}, {nil, <>, 0x2a4a15b8, 0x7fc1ce1b2eaa}) = 0
getuid() = 0
geteuid() = 0
getgid() = 0
getegid() = 0
prctl(3, 0, 0, 0) = 1
secure_getenv(0x557c2a49c238, 0, 0, 0x7fc1ce2220fa) = 0x7ffda1328e66
calloc(1, 4152) = 0x557c64153b60
__vasprintf_chk("/run/credentials/serial-getty@tt"..., 1, "%s", 0x7ffda1325e30) = 43
open("/run/credentials/serial-getty@tt"..., 0x80000, 05) = 3
fcntl(3, 1030, 3, 0x7fc1ce213c7c) = 4
fdopendir(4) = {4}
rewinddir({4}) = <void>
readdir({4}) = {1, "."}
readdir({4}) = {1, ".."}
readdir({4}) = nil
closedir({4}) = 0
getopt_long(9, 0x7ffda1328a38, "8a:cC:d:Ef:hH:iI:Jl:L::mnNo:pP:r"..., 0x7ffda1326440, nil) = 111
getopt_long(9, 0x7ffda1328a38, "8a:cC:d:Ef:hH:iI:Jl:L::mnNo:pP:r"..., 0x7ffda1326440, nil) = 99
getopt_long(9, 0x7ffda1328a38, "8a:cC:d:Ef:hH:iI:Jl:L::mnNo:pP:r"..., 0x7ffda1326440, nil) = 74
getopt_long(9, 0x7ffda1328a38, "8a:cC:d:Ef:hH:iI:Jl:L::mnNo:pP:r"..., 0x7ffda1326440, nil) = 115
getopt_long(9, 0x7ffda1328a38, "8a:cC:d:Ef:hH:iI:Jl:L::mnNo:pP:r"..., 0x7ffda1326440, nil) = -1
strlen("115200,57600,38400,9600") = 23
strspn("115200,57600,38400,9600", "0123456789,") = 23
strdup("115200,57600,38400,9600") = 0x557c64154be0
strtok("115200,57600,38400,9600", ",") = "115200"
__errno_location() = 2
__isoc23_strtol(0x557c64154be0, 0x7ffda1325ec0, 10, 24) = 0x1c200
strtok(nil, ",") = "57600"
__errno_location() = 0
__isoc23_strtol(0x557c64154be7, 0x7ffda1325ec0, 10, 0x1c200) = 0xe100
strtok(nil, ",") = "38400"
__errno_location() = 0
__isoc23_strtol(0x557c64154bed, 0x7ffda1325ec0, 10, 0xe100) = 0x9600
strtok(nil, ",") = "9600"
__errno_location() = 0
__isoc23_strtol(0x557c64154bf3, 0x7ffda1325ec0, 10, 0x9600) = 9600
strtok(nil, ",") = nil
free(0x557c64154be0) = <void>
strcmp("-", "-") = 0
isatty(0) = 0
isatty(1) = 0
isatty(2) = 0
dcgettext(nil, "could not get terminal name: %d", 5) = "could not get terminal name: %d"
openlog("agetty", 1, 80) = <void>
__vsyslog_chk(4, 1, 0x557c2a49d4d8, 0x7ffda1325e40) = 0
closelog() = <void>
strncmp(nil, "tty", 3 <no return ...>
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
[-- Attachment #3: strace_debug_log.txt --]
[-- Type: text/plain, Size: 12571 bytes --]
execve("/sbin/agetty2", ["/sbin/agetty2", "-o", "-- \\u", "--noreset", "--noclear", "--keep-baud", "115200,57600,38400,9600", "-", "vt220"], 0x7fff7671f090 /* 11 vars */) = 0
brk(NULL) = 0x55ec2c59d000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3a6d62a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=12526, ...}) = 0
mmap(NULL, 12526, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d626000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libsystemd.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1127688, ...}) = 0
mmap(NULL, 1132784, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3a6d511000
mmap(0x7f3a6d52d000, 716800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x7f3a6d52d000
mmap(0x7f3a6d5dc000, 241664, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xcb000) = 0x7f3a6d5dc000
mmap(0x7f3a6d617000, 57344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x105000) = 0x7f3a6d617000
mmap(0x7f3a6d625000, 2288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3a6d625000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\237\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 840, 64) = 840
fstat(3, {st_mode=S_IFREG|0755, st_size=2003408, ...}) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 840, 64) = 840
mmap(NULL, 2055640, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3a6d31b000
mmap(0x7f3a6d343000, 1462272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7f3a6d343000
mmap(0x7f3a6d4a8000, 352256, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18d000) = 0x7f3a6d4a8000
mmap(0x7f3a6d4fe000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e2000) = 0x7f3a6d4fe000
mmap(0x7f3a6d504000, 52696, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f3a6d504000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220y\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=47128, ...}) = 0
mmap(NULL, 45128, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3a6d30f000
mmap(0x7f3a6d312000, 20480, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f3a6d312000
mmap(0x7f3a6d317000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f3a6d317000
mmap(0x7f3a6d319000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f3a6d319000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=940248, ...}) = 0
mmap(NULL, 938008, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f3a6d229000
mmap(0x7f3a6d239000, 499712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f3a6d239000
mmap(0x7f3a6d2b3000, 368640, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8a000) = 0x7f3a6d2b3000
mmap(0x7f3a6d30d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe4000) = 0x7f3a6d30d000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3a6d227000
arch_prctl(ARCH_SET_FS, 0x7f3a6d2284c0) = 0
set_tid_address(0x7f3a6d228790) = 897
set_robust_list(0x7f3a6d2287a0, 24) = 0
rseq(0x7f3a6d228de0, 0x20, 0, 0x53053053) = 0
mprotect(0x7f3a6d4fe000, 16384, PROT_READ) = 0
mprotect(0x7f3a6d30d000, 4096, PROT_READ) = 0
mprotect(0x7f3a6d319000, 4096, PROT_READ) = 0
mprotect(0x7f3a6d617000, 53248, PROT_READ) = 0
mprotect(0x55ec26056000, 4096, PROT_READ) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3a6d225000
mprotect(0x7f3a6d665000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f3a6d626000, 12526) = 0
prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE) = 1
prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, CAP_CHECKPOINT_RESTORE) = 1
prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument)
getrandom("\xcc\xa7\xe3\x18\x34\xe6\x9d\xb7", 8, GRND_NONBLOCK) = 8
brk(NULL) = 0x55ec2c59d000
brk(0x55ec2c5be000) = 0x55ec2c5be000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2996, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2996
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=258, ...}) = 0
mmap(NULL, 258, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d629000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=27028, ...}) = 0
mmap(NULL, 27028, PROT_READ, MAP_SHARED, 3, 0) = 0x7f3a6d21e000
close(3) = 0
futex(0x7f3a6d50372c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_MEASUREMENT", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MEASUREMENT", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
mmap(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d628000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_TELEPHONE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_TELEPHONE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=47, ...}) = 0
mmap(NULL, 47, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d627000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_ADDRESS", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_ADDRESS", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
mmap(NULL, 127, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d626000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_NAME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_NAME", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=62, ...}) = 0
mmap(NULL, 62, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d21d000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_PAPER", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_PAPER", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
mmap(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d21c000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=48, ...}) = 0
mmap(NULL, 48, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d21b000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=270, ...}) = 0
mmap(NULL, 270, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d21a000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_COLLATE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_COLLATE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1406, ...}) = 0
mmap(NULL, 1406, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d219000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3360, ...}) = 0
mmap(NULL, 3360, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d218000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_NUMERIC", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=50, ...}) = 0
mmap(NULL, 50, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d217000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/C.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/C.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=360460, ...}) = 0
mmap(NULL, 360460, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3a6d1be000
close(3) = 0
rt_sigaction(SIGHUP, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f3a6d35ada0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f3a6d35ada0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f3a6d35ada0}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
getuid() = 0
geteuid() = 0
getgid() = 0
getegid() = 0
prctl(PR_GET_DUMPABLE) = 1 (SUID_DUMP_USER)
openat(AT_FDCWD, "/run/credentials/serial-getty@ttyS0.service", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_DUPFD_CLOEXEC, 3) = 4
fstat(4, {st_mode=S_IFDIR|0500, st_size=40, ...}) = 0
fcntl(4, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(4, F_SETFD, FD_CLOEXEC) = 0
lseek(4, 0, SEEK_SET) = 0
getdents64(4, 0x55ec2c5a1c10 /* 2 entries */, 32768) = 48
getdents64(4, 0x55ec2c5a1c10 /* 0 entries */, 32768) = 0
close(4) = 0
ioctl(0, TCGETS, 0x7fff9faad2e0) = -1 EIO (Input/output error)
ioctl(1, TCGETS, 0x7fff9faad2e0) = -1 EIO (Input/output error)
ioctl(2, TCGETS, 0x7fff9faad2e0) = -1 EIO (Input/output error)
getpid() = 897
openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=114, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=114, ...}) = 0
read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 114
lseek(4, -60, SEEK_CUR) = 54
read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 60
close(4) = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 4
connect(4, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
sendto(4, "<84>Feb 23 13:28:56 agetty[897]:"..., 65, MSG_NOSIGNAL, NULL, 0) = 65
close(4) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV +++
^ permalink raw reply
* Re: Bug#1098694: Crash in agetty due to invalid strncmp call in Trixie
From: Chris Hofstaedtler @ 2025-02-23 19:02 UTC (permalink / raw)
To: Florian Bach; +Cc: 1098694-quiet, util-linux
In-Reply-To: <bee22700-d1e4-42a2-9fe6-9ba9d2e64538@vodafone.de>
Hi,
thanks for the answers!
* Florian Bach <Leseratte10@vodafone.de> [250223 14:46]:
> > 2) which terminal is this? tty1 or something else?
>
> What do you mean with "is this"? The error messages show up on tty1, the
> default terminal I get when booting Debian without a GUI installed. The one
> where it says "Debian GNU/Linux trixie/sid <hostname> tty1". But the agetty
> process that crashes seems to be trying to manage a different tty (see
> below).
Glad I asked :-)
From what we can see below, this is agetty on ttyS0. But then your
VM probably does not have a "COM0" hardware.
> > 3) whats your kernel command line?
>
> # cat /proc/cmdline
> BOOT_IMAGE=/boot/vmlinuz-6.12.12-amd64
> root=PARTUUID=add96c19-7043-4bb1-8899-ca970a7d33c8 ro console=tty0
> console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0
^^^^^^^^^^^^^
> [..] After I sent this bug report yesterday, I also found out that
> someone has reported what I believe is the same bug to
> upstream a while ago ( https://github.com/util-linux/util-linux/issues/3304
> ) but so far nobody has commented on that report.
Yeah, this seems like the same issue.
> Note that in the strace log I attached, it tries to open / access the file
> at /run/credentials/serial-getty@ttyS0.service. My VM does not have a serial
> port (since Proxmox VMs apparently don't have one by default). If I add a
> serial port to the VM and then boot it, the errors are gone. So maybe it
> tries to provide a serial console on ttyS0 due to the "console=ttyS0,115200"
> in the kernel command line (I didn't put it there, maybe it's the default?)
> and that fails because it doesn't exist?
> execve("/sbin/agetty2", ["/sbin/agetty2", "-o", "-- \\u", "--noreset", "--noclear", "--keep-baud", "115200,57600,38400,9600", "-", "vt220"], 0x7fff7671f090 /* 11 vars */) = 0
[..]
> openat(AT_FDCWD, "/run/credentials/serial-getty@ttyS0.service", O_RDONLY|O_CLOEXEC) = 3
[..]
> ioctl(0, TCGETS, 0x7fff9faad2e0) = -1 EIO (Input/output error)
> ioctl(1, TCGETS, 0x7fff9faad2e0) = -1 EIO (Input/output error)
> ioctl(2, TCGETS, 0x7fff9faad2e0) = -1 EIO (Input/output error)
[..]
Chris
^ permalink raw reply
* Re: Bug#1098694: Crash in agetty due to invalid strncmp call in Trixie
From: Chris Hofstaedtler @ 2025-02-23 20:13 UTC (permalink / raw)
To: 1098694-quiet; +Cc: Florian Bach, util-linux
In-Reply-To: <4ewlrlhq7eskooeb5h7v4p5qv6r3nvm2ubmuo5546lo5yxsrta@pr2horn2sxog>
* Chris Hofstaedtler <zeha@debian.org> [250223 20:06]:
> > [..] After I sent this bug report yesterday, I also found out that
> > someone has reported what I believe is the same bug to
> > upstream a while ago ( https://github.com/util-linux/util-linux/issues/3304
> > ) but so far nobody has commented on that report.
>
> Yeah, this seems like the same issue.
Below is a patch that works, but certainly feels dirty:
From: Chris Hofstaedtler <zeha@debian.org>
Date: Sun, 23 Feb 2025 20:10:05 +0100
Subject: agetty: restore op->tty if getting the tty name fails
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
---
term-utils/agetty.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index a382313..e65c985 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -929,9 +929,11 @@ static void parse_args(int argc, char **argv, struct options *op)
/* resolve the tty path in case it was provided as stdin */
if (strcmp(op->tty, "-") == 0) {
op->tty_is_stdin = 1;
+ const char* tty_orig = op->tty;
int fd = get_terminal_name(NULL, &op->tty, NULL);
if (fd < 0) {
log_warn(_("could not get terminal name: %d"), fd);
+ op->tty = tty_orig;
}
}
^ permalink raw reply related
* [PATCH 3/6] scriptreplay: reduce two usage synopses to one, and drop the -t from it
From: Benno Schulenberg @ 2025-02-24 13:08 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250224130840.25770-1-bensberg@telfort.nl>
Those two synopses still did not express several possible forms:
scriptreplay -m.1 timings
scriptreplay typescript -t timings -m.1
...
So, instead of trying to cover all possibilities, just give the
basic form of the command, which is clearest and most helpful.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
term-utils/scriptreplay.1.adoc | 2 +-
term-utils/scriptreplay.c | 7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/term-utils/scriptreplay.1.adoc b/term-utils/scriptreplay.1.adoc
index acfde6ca8..7665d28f8 100644
--- a/term-utils/scriptreplay.1.adoc
+++ b/term-utils/scriptreplay.1.adoc
@@ -13,7 +13,7 @@ scriptreplay - play back typescripts, using timing information
== SYNOPSIS
-*scriptreplay* [options] [*-t*] _timingfile_ [_typescript_ [_divisor_]]
+*scriptreplay* [options] _timingfile_ [_typescript_ [_divisor_]]
== DESCRIPTION
diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c
index 5751e1b52..7e1eec7db 100644
--- a/term-utils/scriptreplay.c
+++ b/term-utils/scriptreplay.c
@@ -47,10 +47,7 @@ usage(void)
FILE *out = stdout;
fputs(USAGE_HEADER, out);
fprintf(out,
- _(" %s [options]\n"),
- program_invocation_short_name);
- fprintf(out,
- _(" %s [-t] <timingfile> [<typescript> [<divisor>]]\n"),
+ _(" %s [options] <timingfile> [<typescript> [<divisor>]]\n"),
program_invocation_short_name);
fputs(USAGE_SEPARATOR, out);
@@ -71,6 +68,8 @@ usage(void)
fputs(_(" -m, --maxdelay <num> wait at most this many seconds between updates\n"), out);
fputs(_(" -x, --stream <name> stream type (out, in, signal or info)\n"), out);
fputs(_(" -c, --cr-mode <type> CR char mode (auto, never, always)\n"), out);
+
+ fputs(USAGE_SEPARATOR, out);
fprintf(out, USAGE_HELP_OPTIONS(25));
fputs(USAGE_SEPARATOR, out);
--
2.48.1
^ permalink raw reply related
* [PATCH 4/6] scriptreplay: mark literal values in the man page in bold, not italic
From: Benno Schulenberg @ 2025-02-24 13:08 UTC (permalink / raw)
To: util-linux
In-Reply-To: <20250224130840.25770-1-bensberg@telfort.nl>
Also, mention which keys can be used to speed up, slow down, and pause
the replay. Shorten the description of '-s' as it is deprecated. And
improve the description of '-t': it does not override the _timingfile_
positional argument, but takes the place of it, makes it unneeded.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
term-utils/scriptreplay.1.adoc | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/term-utils/scriptreplay.1.adoc b/term-utils/scriptreplay.1.adoc
index 7665d28f8..deabb7b16 100644
--- a/term-utils/scriptreplay.1.adoc
+++ b/term-utils/scriptreplay.1.adoc
@@ -23,11 +23,14 @@ The replay simply displays the information again; the programs that were run whe
The timing information is what *script*(1) outputs to file specified by *--log-timing*.
-By default, the typescript to display is assumed to be named _typescript_, but other filenames may be specified, as the second parameter or with option *--log-out*.
+By default, the _typescript_ to display is assumed to be named *typescript*,
+but other filenames may be specified, as the second parameter or with option
+*--log-out*.
If the third parameter or *--divisor* is specified, it is used as a speed-up multiplier. For example, a speed-up of 2 makes *scriptreplay* go twice as fast, and a speed-down of 0.1 makes it go ten times slower than the original session.
-During the replay, you can interactively speed up, slow down, or pause the playback using key bindings.
+During the replay, you can interactively speed up, slow down, or pause the
+playback using the Up, Down, and Space keys.
== OPTIONS
@@ -41,16 +44,20 @@ File containing *script*'s terminal output.
File containing *script*'s terminal output and input.
*-t*, *--timing* _file_::
-File containing *script*'s timing output. This option overrides old-style arguments.
+File containing *script*'s timing output.
+This option replaces the _timingfile_ positional argument.
*-T*, *--log-timing* _file_::
This is an alias for *-t*, maintained for compatibility with *script*(1) command-line options.
*-s*, *--typescript* _file_::
-File containing *script*'s terminal output. Deprecated alias to *--log-out*. This option overrides old-style arguments.
+Deprecated alias of *--log-out*.
*-c*, *--cr-mode* _mode_::
-Specifies how to use the CR (0x0D, carriage return) character from log files. The default mode is _auto_, in this case CR is replaced with line break for stdin log, because otherwise *scriptreplay* would overwrite the same line. The other modes are _never_ and _always_.
+Specifies how to handle the CR (carriage return, 0x0D) character from log
+files. The default mode is *auto*, in which case CR is replaced with a
+line break for the stdin log, because otherwise *scriptreplay* would
+overwrite the same line. The other modes are *never* and *always*.
*-d*, *--divisor* _number_::
Speed up the replay displaying this _number_ of times. The argument is a floating-point number. It's called divisor because it divides the timings by this factor. This option overrides old-style arguments.
@@ -59,10 +66,15 @@ Speed up the replay displaying this _number_ of times. The argument is a floatin
Set the maximum delay between updates to _number_ of seconds. The argument is a floating-point number. This can be used to avoid long pauses in the typescript replay.
*--summary*::
-Display details about the session recorded in the specified timing file and exit. The session has to be recorded using _advanced_ format (see *script*(1) option *--logging-format* for more details).
+Display details about the session recorded in the specified timing file and
+exit. The session must have been recorded using the *advanced* format (see
+*script*(1) option *--logging-format* for more details).
*-x*, *--stream* _type_::
-Forces *scriptreplay* to print only the specified stream. The supported stream types are _in_, _out_, _signal_, or _info_. This option is recommended for multi-stream logs (e.g., *--log-io*) in order to print only specified data.
+Forces *scriptreplay* to print only the specified stream. The supported stream
+types are *in*, *out*, *signal*, and *info*. This option is recommended for
+multi-stream logs (created with *--log-io*) in order to print only the desired
+data.
include::man-common/help-version.adoc[]
--
2.48.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox