]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
2 months agobuild-sys: release++ (v2.40-rc2) v2.40-rc2
Karel Zak [Thu, 29 Feb 2024 20:38:32 +0000 (21:38 +0100)] 
build-sys: release++ (v2.40-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agodocs: update v2.40-ReleaseNotes
Karel Zak [Thu, 29 Feb 2024 20:35:28 +0000 (21:35 +0100)] 
docs: update v2.40-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agodocs: update AUTHORS file
Karel Zak [Thu, 29 Feb 2024 20:30:28 +0000 (21:30 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agopo-man: merge changes
Karel Zak [Thu, 29 Feb 2024 20:03:42 +0000 (21:03 +0100)] 
po-man: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agopo: merge changes
Karel Zak [Thu, 29 Feb 2024 20:03:36 +0000 (21:03 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agopo: update tr.po (from translationproject.org)
Emir SARI [Thu, 29 Feb 2024 19:58:56 +0000 (20:58 +0100)] 
po: update tr.po (from translationproject.org)

2 months agolscpu: remove redundant include
Karel Zak [Thu, 29 Feb 2024 19:55:53 +0000 (20:55 +0100)] 
lscpu: remove redundant include

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolslocks: fix buffer overflow
Karel Zak [Thu, 29 Feb 2024 19:43:35 +0000 (20:43 +0100)] 
lslocks: fix buffer overflow

* don't use memset() to init variables
* use xreaddir() to reduce code
* use ssize_t for readlinkat() return value to avoid buffer overflow

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolsfd: read /proc/$pid/ns/mnt earlier
Masatake YAMATO [Wed, 3 Jan 2024 07:33:19 +0000 (16:33 +0900)] 
lsfd: read /proc/$pid/ns/mnt earlier

The change fba9898fd5b1d20a2ed350b7b542d9f8a3597a0c I introduced
unexpectedly canceled the optimization technique introduced in
a7f70ce17a925f1085bfa4b292427f8741d7e2a2 that reduced the number of
times reading /proc/$pid/mountinfo.

This change reenables the technique.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit a99427e9c4e4b1ab57df1f94f6addc1769426f5a)

2 months agolsfd: (refactor) rename add_nodevs to read_mountinfo
Masatake YAMATO [Wed, 3 Jan 2024 06:54:03 +0000 (15:54 +0900)] 
lsfd: (refactor) rename add_nodevs to read_mountinfo

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit 18a1403401112665f5015770c99f96ced5c6e38e)

2 months agolsfd: make the way to read /proc/$pid/mountinfo robust
Masatake YAMATO [Wed, 3 Jan 2024 17:19:28 +0000 (02:19 +0900)] 
lsfd: make the way to read /proc/$pid/mountinfo robust

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit 80b3c8ccdb35f862c02934ddeeadedcc60e310e8)

2 months agolsfd: (cosmetic) normalize whitespaces
Masatake YAMATO [Wed, 3 Jan 2024 19:57:25 +0000 (04:57 +0900)] 
lsfd: (cosmetic) normalize whitespaces

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
(cherry picked from commit d967f8e6e3c7eb93cd4c7302718e234488f90683)

2 months agosetterm: Document behavior of redirection
Stanislav Brabec [Wed, 28 Feb 2024 14:06:14 +0000 (15:06 +0100)] 
setterm: Document behavior of redirection

Debugging an error of setterm, I realized that setterm --powerdown operates
on stdout but setterm --powersave operates on stdin. Such unexpected
behavior should be documented.

I prefer a less accurate generic "always redirect both stdin and stdout"
over recommending of the correct I/O stream for each option separately.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
(cherry picked from commit 4aa584a0e7482b89599c01986cd4ea69a397f808)

2 months agomeson: fix LIBBLKID_VERSION definition
Karel Zak [Thu, 29 Feb 2024 10:09:11 +0000 (11:09 +0100)] 
meson: fix LIBBLKID_VERSION definition

Fixes: https://github.com/util-linux/util-linux/issues/2802
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 311ea4e73b8b35788e1bbc784350082e45e9d445)

2 months agobuild-sys: introduce localstatedir
Karel Zak [Wed, 28 Feb 2024 12:07:39 +0000 (13:07 +0100)] 
build-sys: introduce localstatedir

The directory is already used by ./configure.ac, but it has never been
exported to the Makefile.am or used by meson.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Christian Hesse <mail@eworm.de>
(cherry picked from commit 107b2fbeac3cd6b64c7b2fb40f8ecd0feee220ad)

2 months agolastlog2: rename tmpfiles
Christian Hesse [Tue, 27 Feb 2024 21:36:13 +0000 (22:36 +0100)] 
lastlog2: rename tmpfiles

Signed-off-by: Christian Hesse <mail@eworm.de>
(cherry picked from commit 306cd7c7ce2920bbc204c6e404e3480e132ff1dd)

2 months agotmpfiles: depend on systemd...
Christian Hesse [Thu, 22 Feb 2024 07:50:52 +0000 (08:50 +0100)] 
tmpfiles: depend on systemd...

... as systemd-tmpfiles is required to handle this.

Signed-off-by: Christian Hesse <mail@eworm.de>
(cherry picked from commit ffd6db8951c2ee6d7fd9ca2491da819dec3f3286)

2 months agouuidd.rc: create localstatedir in init script
Christian Hesse [Tue, 27 Feb 2024 12:07:30 +0000 (13:07 +0100)] 
uuidd.rc: create localstatedir in init script

Signed-off-by: Christian Hesse <mail@eworm.de>
(cherry picked from commit b3fdc48a5672ae39b6ceceb7e46a5e1351f06fb6)

2 months agotmpfiles: add and install for uuidd, generate /run/uuidd & /var/lib/libuuid
Christian Hesse [Thu, 22 Feb 2024 07:48:55 +0000 (08:48 +0100)] 
tmpfiles: add and install for uuidd, generate /run/uuidd & /var/lib/libuuid

These directories are requird for uuidd, so let systemd-tmpfiles create them.

Signed-off-by: Christian Hesse <mail@eworm.de>
(cherry picked from commit 2b7410544c90f56fbb9abca999ed48feffbe31ef)

2 months agodocs: move GPL-2.0 license text to Docimentation directory
Karel Zak [Wed, 28 Feb 2024 13:37:25 +0000 (14:37 +0100)] 
docs: move GPL-2.0 license text to Docimentation directory

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 69b9215a4e50a77f3663ee00f382c438ccc62ac9)

2 months agodocs: use proper XSPD identifier for GPL-2.0
Karel Zak [Wed, 28 Feb 2024 12:22:51 +0000 (13:22 +0100)] 
docs: use proper XSPD identifier for GPL-2.0

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ea35ab0a08552a3be19ee8a964bfdd53a98d4f03)

2 months agomeson: avoid future-deprecated feature
Karel Zak [Wed, 28 Feb 2024 11:21:56 +0000 (12:21 +0100)] 
meson: avoid future-deprecated feature

Based on b837ab02711d1a9352232ed2ba6ffbd47c201446

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agohexdump: check blocksize when display data
Karel Zak [Tue, 27 Feb 2024 17:38:02 +0000 (18:38 +0100)] 
hexdump: check blocksize when display data

hexdump(1) stores input to buffer and apply format unit when prints
the output. The unit can move pointer which points to the buffer, but
code does not check for limits.

Fixes: https://github.com/util-linux/util-linux/issues/2806
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit dfa1ad272528a92384adac523cf2f2949b767d8d)

2 months agolibmount: report kernel message from new API
Karel Zak [Mon, 26 Feb 2024 11:44:10 +0000 (12:44 +0100)] 
libmount: report kernel message from new API

This is a very minimalistic implementation for v2.40 designed to print
error messages from the kernel. It exclusively displays errors, and
the patch does not introduce any new library interface for this
purpose. Instead, it simply replaces hardcoded messages within
libmount with kernel messages.

It's worth noting that the final implementation will necessitate
per-hook error handling in libmount and likely a new library API to
access other types of messages (warnings, notices, etc.).

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 9da5644e414cdc318f0311260dabc6035c85b58e)

2 months agodmesg: fix wrong size calculation
Karel Zak [Mon, 26 Feb 2024 13:30:55 +0000 (14:30 +0100)] 
dmesg: fix wrong size calculation

* don't use string based function strspn() if work with non-zero terminated
  buffer

* make sure that message size is calculated from within buffer pointers

Fixes: https://github.com/util-linux/util-linux/issues/2807
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 0e5031a425c727b16831c108a92271e240c29595)

2 months agoAdding Neoverse-V3/-N3 ARM cores
Thomas Kaiser [Mon, 26 Feb 2024 11:20:11 +0000 (12:20 +0100)] 
Adding Neoverse-V3/-N3 ARM cores

(cherry picked from commit c91694dd066d07c2ca7d68cbe212b2e1f893e942)

2 months agomeson: run compiler checks with -D_GNU_SOURCE when necessary
Thomas Weißschuh [Fri, 23 Feb 2024 07:15:32 +0000 (08:15 +0100)] 
meson: run compiler checks with -D_GNU_SOURCE when necessary

Through the addition of default_options: c_std=c99 some build-time
checks were incorrect. Explicitly add -D_GNU_SOURCE where necessary.

Fixes: 6240e4458cdf ("build: use -std=c99 and -std=c++11 by default")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 1eeabbb42649f8334b6330689fec54325591fe2f)

2 months agolibmount: don't hold write fd to mounted device
Jan Kara [Wed, 21 Feb 2024 17:30:50 +0000 (18:30 +0100)] 
libmount: don't hold write fd to mounted device

Avoid holding writeable fd to a loop device that is being mounted. In
the hardened configurations (CONFIG_BLK_DEV_WRITE_MOUNTED = n) the
kernel wants to make sure nobody else has the block device writeably
open when mounting so this makes the mount fail.

Reported-by: JunChao Sun <sunjunchao2870@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Christian Brauner <brauner@kernel.org>
(cherry picked from commit 1cde32f323e0970f6c7f35940dcc0aea97b821e5)

2 months agodocs: cleanup public domain license texts
Karel Zak [Wed, 21 Feb 2024 09:13:50 +0000 (10:13 +0100)] 
docs: cleanup public domain license texts

The absence of an official 'Public domain' definition is the reason
why, for example, the Fedora distribution aggregates all variants from
various projects to make them reviewable.

This commit unifies the 'Public domain' statements to make it simple.

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agomore: fix poll() use
Karel Zak [Tue, 20 Feb 2024 11:26:33 +0000 (12:26 +0100)] 
more: fix poll() use

The more(1) command utilizes signalfd() to monitor signals and reads
commands from the user via stderr (as stdin is typically used for
piping and not for user interaction).

However, the current more_poll() implementation ignores stderr. As a result,
more(1) waits on read(stderr) while completely ignoring signals. This issue
becomes evident when using commands like:

    grep foo /path/file | more

In such cases, it's only possible to exit 'more' by pressing 'q';
CTRL+C does not work.

Changes:

- Refactor more_poll() code:
  - Introduce an enum to access pfd[] items instead of using magical constants.
  - Implement a while() loop to handle EAGAIN or POLLHUP.

- Ignore stdin after POLLHUP (indicating that the pipe's peer closed).
- Ensure stderr is also checked.
- Use return codes akin to classic poll().

Note: I have doubts regarding the usability of stdin in more_poll(),
as the function is primarily used to wait for user input (via stderr)
and to monitor signals. Nevertheless, it is retained for potential use
in detecting when the pipe's peer (or the entire session) has been
terminated (see commit 68e14d3d5f4116ad3aca0e392d008645ea90cf70).

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolastlog2: convert check_user() to boolean-like macro
Karel Zak [Tue, 20 Feb 2024 09:37:02 +0000 (10:37 +0100)] 
lastlog2: convert check_user() to boolean-like macro

Let's make simple and stupid.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit af93603e52d56fdd6246a038139a5d0e83a5c6a2)

2 months agolastlog: cleanup function definitions
Karel Zak [Tue, 20 Feb 2024 09:28:06 +0000 (10:28 +0100)] 
lastlog: cleanup function definitions

- let's make it more compatible with the rest of util-linux

- don't initialize global static variables (it's unnecessary)

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c71f38287c81cb06433e3949dadba8bc74dc8588)

2 months agolastlog2: make longopts[] static-const
Karel Zak [Tue, 20 Feb 2024 09:20:10 +0000 (10:20 +0100)] 
lastlog2: make longopts[] static-const

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 76fcb1c65afd7bbcd5f27b3f3b3408bc7d40ca00)

2 months agolastlog: improve errors printing
Karel Zak [Tue, 20 Feb 2024 09:12:19 +0000 (10:12 +0100)] 
lastlog: improve errors printing

- single exit by goto

- always print specific error (e.g. "Couldn't update login time ...")
  and then optionally generic ll2 error

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 4e86ac6f7faef64831da5b2dfcd2b40bb7179bc4)

2 months agolastlog2: improve coding style
Karel Zak [Tue, 20 Feb 2024 08:55:48 +0000 (09:55 +0100)] 
lastlog2: improve coding style

- use space around operators
- remove unnecessary line breaks from errx() calls

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d2203ae361c228d232b2fa77d7503d1cc3526f75)

2 months agolastlog2: Don't print space if Service column is not printed
Miika Alikirri [Mon, 19 Feb 2024 10:09:13 +0000 (12:09 +0200)] 
lastlog2: Don't print space if Service column is not printed

(cherry picked from commit 1c14996da1e132830bcc024c2ca7430fe3c2ac28)

2 months agodocs: improve howto-pull-request
Karel Zak [Mon, 19 Feb 2024 09:10:56 +0000 (10:10 +0100)] 
docs: improve howto-pull-request

* improve branch naming suggestions

* recommend GitHub, make Mailing-List optional

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 0f749c8fde9462350c6194a7689a79aecc337477)

2 months agoAdd Microsoft as vendor and Cobalt 100 core
Thomas Kaiser [Sun, 18 Feb 2024 23:16:54 +0000 (00:16 +0100)] 
Add Microsoft as vendor and Cobalt 100 core

https://lore.kernel.org/linux-arm-kernel/b99a7196-011e-4f08-83ec-e63a690ab919@linux.microsoft.com/T/
(cherry picked from commit 7712004e1306fdd0f6931ac110f5238fd3bf86f5)

2 months agodocs: remove duplicated author name in namei.1.adoc
Emanuele Torre [Sun, 18 Feb 2024 03:43:09 +0000 (04:43 +0100)] 
docs: remove duplicated author name in namei.1.adoc

This was being rendered in the man page as:

    The program was rewritten by Karel Zak Karel Zak <kzak@redhat.com>.

Instead of as:

    The program was rewritten by Karel Zak <kzak@redhat.com>.

(cherry picked from commit 59993a27826cdf4891962caf2db3bd94288f6ee9)

2 months agolibblkid: Check offset in LUKS2 header
Milan Broz [Fri, 16 Feb 2024 15:44:12 +0000 (16:44 +0100)] 
libblkid: Check offset in LUKS2 header

LUKS2 binary header contains offset field that describes where
the header should be located.

If this offset is not correct, blkid should tread this header
as invalid.

This patch fixes problem when both swap and LUKS headers are
present (LUKS header was swapped out) and detected LUKS header
is at a wrong offset.
As LUKS has higher priority, it confuses detection.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
(cherry picked from commit e49de00f4a22f91ec5af08d97e30a198cd64e00d)

2 months agodocs: add hints about systemd
Karel Zak [Thu, 15 Feb 2024 09:33:42 +0000 (10:33 +0100)] 
docs: add hints about systemd

Suggested-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 9cb7b7671d903573d6c3b9d8112ec13953cdcdc6)

2 months agotests: update dmesg deltas
Karel Zak [Tue, 13 Feb 2024 18:09:38 +0000 (19:09 +0100)] 
tests: update dmesg deltas

See commit a355f2b78a8c486f7721371d9010f4f1bafcee00.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 1a0ce945ae3dc3394a96ad2731c4f28829c7c9d4)

2 months agodmesg: fix delta calculation
Karel Zak [Tue, 13 Feb 2024 09:56:41 +0000 (10:56 +0100)] 
dmesg: fix delta calculation

Old:
./dmesg --nopager --color=never --decode --time-format delta  --kernel --since "@$t"
kern  :info  : [<18446744098961.000000>] bash (40091): drop_caches: 3

Fixed:
./dmesg --nopager --color=never --decode --time-format delta  --kernel --since "@$t"
kern  :info  : [<25251.997673>] bash (40091): drop_caches: 3

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit a355f2b78a8c486f7721371d9010f4f1bafcee00)

2 months agodmesg: don't affect delta by --since
Karel Zak [Tue, 13 Feb 2024 09:53:41 +0000 (10:53 +0100)] 
dmesg: don't affect delta by --since

Fixes: https://github.com/util-linux/util-linux/issues/2770
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 68d4b8f02adba9b53f563095d6abe99146d4d8ad)

2 months agomeson: install lastlog2.h library header file
Karel Zak [Wed, 14 Feb 2024 08:31:34 +0000 (09:31 +0100)] 
meson: install lastlog2.h library header file

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 9b1512260e1387652d446e099b061a8b3c3ba871)

2 months agoRevert "libmount: don't canonicalize symlinks for bind operation"
Karel Zak [Tue, 13 Feb 2024 18:54:08 +0000 (19:54 +0100)] 
Revert "libmount: don't canonicalize symlinks for bind operation"

This reverts commit 1b2d8187360157b00b47f52522fc039d82e34e6b.

Unfortunately, this new feature introduces a regression. We need a
better solution (probably mount options option to enable the feature)
rather than enable it by default.

Fixes: https://github.com/util-linux/util-linux/issues/2773
References: https://github.com/util-linux/util-linux/issues/2370
(cherry picked from commit c19ae2094e865f1a153e25b865315bd68edf075b)

2 months agoblkdev.h: update location of SCSI device types
Christoph Anton Mitterer [Fri, 9 Feb 2024 22:34:25 +0000 (23:34 +0100)] 
blkdev.h: update location of SCSI device types

In Linux commit c5f1ac8b94bd10f97f5aa1a3279ad8e8bbc6311a (“Split SCSI header
files”) these definition where split out into `include/scsi/scsi_proto.h`.

This commit also removes the git link (any kernel sources will do just fine) and
just names the file.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
(cherry picked from commit 1860882109b8aaefcf387c96324646cf457bb170)

2 months agomeson: Only build libmount python module if python was found
Fabian Vogt [Wed, 7 Feb 2024 10:48:33 +0000 (11:48 +0100)] 
meson: Only build libmount python module if python was found

The extension_module call was in the wrong place.

(cherry picked from commit 974e1c40e93f7fc916a8211330a1afef2ad7927e)

2 months agolastlog2: Fix various issues with meson
Fabian Vogt [Wed, 7 Feb 2024 10:29:26 +0000 (11:29 +0100)] 
lastlog2: Fix various issues with meson

- Make sure @usrbin_execdir@ is actually replaced
- pam_lastlog2.so is always a shared library that's dlopen()ed,
  so use shared_module and do not generate a pkgconfig module

(cherry picked from commit 7c08028697c3f78dbfba288e3ba3b076b994ec66)

2 months agolibmount: fix copy & past bug in lock initialization
Karel Zak [Wed, 7 Feb 2024 09:56:19 +0000 (10:56 +0100)] 
libmount: fix copy & past bug in lock initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ed4d3e26a5fbe790107e3064e51dc34484b3656f)

2 months agomeson: fix mismatch with handling of lib_dl dependency
Zbigniew Jędrzejewski-Szmek [Tue, 6 Feb 2024 12:41:53 +0000 (13:41 +0100)] 
meson: fix mismatch with handling of lib_dl dependency

lib_dl is only defined if both conditions are met, so meson would fail with an
undefined variable.

(cherry picked from commit c12f8998e9a2f4d393dfa7f7f88aaea2332a378b)

2 months agomeson: add forgotten files to lists
Zbigniew Jędrzejewski-Szmek [Tue, 6 Feb 2024 12:18:38 +0000 (13:18 +0100)] 
meson: add forgotten files to lists

(cherry picked from commit 669071f6249026b4415c42a9859accc425b36595)

2 months agomeson: fix disablement check
Zbigniew Jędrzejewski-Szmek [Tue, 6 Feb 2024 12:14:37 +0000 (13:14 +0100)] 
meson: fix disablement check

opt is not defined for those programs.

(cherry picked from commit 765961c32a764052955655838f8a99450876500b)

2 months agoMerge branch 'meson/lastlog2' of https://github.com/t-8ch/util-linux v2.41-devel
Karel Zak [Mon, 5 Feb 2024 10:55:39 +0000 (11:55 +0100)] 
Merge branch 'meson/lastlog2' of https://github.com/t-8ch/util-linux

* 'meson/lastlog2' of https://github.com/t-8ch/util-linux:
  meson: only build liblastlog when enabled
  meson: create dedicated config for pam_lastlog2
  meson: use a dependency object for sqlite3
  meson: use a dependency object for liblastlog2

2 months agoMerge branch 'lsclocks' of https://github.com/alanc/util-linux
Karel Zak [Mon, 5 Feb 2024 10:53:55 +0000 (11:53 +0100)] 
Merge branch 'lsclocks' of https://github.com/alanc/util-linux

* 'lsclocks' of https://github.com/alanc/util-linux:
  lsclocks: use clock id from clock_getcpuclockid in add_cpu_clock

2 months agoMerge branch 'strtod' of https://github.com/alanc/util-linux
Karel Zak [Mon, 5 Feb 2024 10:42:53 +0000 (11:42 +0100)] 
Merge branch 'strtod' of https://github.com/alanc/util-linux

* 'strtod' of https://github.com/alanc/util-linux:
  lib/c_strtod: fix uselocale() fallback if strtod_l() is not available

2 months agofdisk: (man) fix typo, improve readability
Karel Zak [Mon, 5 Feb 2024 10:21:41 +0000 (11:21 +0100)] 
fdisk: (man) fix typo, improve readability

Reported-by: Michael Partridge <mcp292@nau.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoMerge branch 'enosys/optim' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 5 Feb 2024 09:54:17 +0000 (10:54 +0100)] 
Merge branch 'enosys/optim' of https://github.com/t-8ch/util-linux

* 'enosys/optim' of https://github.com/t-8ch/util-linux:
  enosys: optimize bytecode when execve is not blocked
  enosys: optimize bytecode when no ioctls are blocked
  enosys: add helpers for 64 bit integer loading
  enosys: drop unnessecary load of ioctl number

2 months agoMerge branch 'master' of https://github.com/echoechoin/util-linux
Karel Zak [Mon, 5 Feb 2024 09:38:40 +0000 (10:38 +0100)] 
Merge branch 'master' of https://github.com/echoechoin/util-linux

* 'master' of https://github.com/echoechoin/util-linux:
  sys-utils/lscpu: Unblock SIGSEGV before vmware_bdoor

2 months agodocs: add setpgid do ReleaseNotes
Karel Zak [Mon, 5 Feb 2024 09:20:39 +0000 (10:20 +0100)] 
docs: add setpgid do ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agoliblastlog2: fix pkg-config inclidedir
Karel Zak [Mon, 5 Feb 2024 08:15:55 +0000 (09:15 +0100)] 
liblastlog2: fix pkg-config inclidedir

The path for .pc must be the same as liblastlog2/src/Makemodule.am:$lastlog2incdir
(and it's usually /usr/include/liblastlog2/).

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agolsclocks: use clock id from clock_getcpuclockid in add_cpu_clock
Alan Coopersmith [Sun, 4 Feb 2024 17:14:23 +0000 (09:14 -0800)] 
lsclocks: use clock id from clock_getcpuclockid in add_cpu_clock

Fixes #2761

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2 months agoenosys: optimize bytecode when execve is not blocked
Thomas Weißschuh [Sun, 4 Feb 2024 09:06:39 +0000 (10:06 +0100)] 
enosys: optimize bytecode when execve is not blocked

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 months agoenosys: optimize bytecode when no ioctls are blocked
Thomas Weißschuh [Sat, 3 Feb 2024 17:55:13 +0000 (18:55 +0100)] 
enosys: optimize bytecode when no ioctls are blocked

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 months agoenosys: add helpers for 64 bit integer loading
Thomas Weißschuh [Sun, 4 Feb 2024 09:21:05 +0000 (10:21 +0100)] 
enosys: add helpers for 64 bit integer loading

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 months agoenosys: drop unnessecary load of ioctl number
Thomas Weißschuh [Sun, 4 Feb 2024 09:24:26 +0000 (10:24 +0100)] 
enosys: drop unnessecary load of ioctl number

The ioctl number is properly loaded just below the deleted instruction
anyways.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 months agolib/c_strtod: fix uselocale() fallback if strtod_l() is not available
Alan Coopersmith [Sat, 3 Feb 2024 02:09:18 +0000 (18:09 -0800)] 
lib/c_strtod: fix uselocale() fallback if strtod_l() is not available

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2 months agomeson: only build liblastlog when enabled
Thomas Weißschuh [Fri, 2 Feb 2024 13:40:06 +0000 (14:40 +0100)] 
meson: only build liblastlog when enabled

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 months agomeson: create dedicated config for pam_lastlog2
Thomas Weißschuh [Fri, 2 Feb 2024 12:48:28 +0000 (13:48 +0100)] 
meson: create dedicated config for pam_lastlog2

2 months agomeson: use a dependency object for sqlite3
Thomas Weißschuh [Fri, 2 Feb 2024 12:44:50 +0000 (13:44 +0100)] 
meson: use a dependency object for sqlite3

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 months agomeson: use a dependency object for liblastlog2
Thomas Weißschuh [Fri, 2 Feb 2024 12:41:37 +0000 (13:41 +0100)] 
meson: use a dependency object for liblastlog2

It is easier to use.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 months agodocs: add BSD-2-Clause
Karel Zak [Fri, 2 Feb 2024 10:58:46 +0000 (11:58 +0100)] 
docs: add BSD-2-Clause

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agoMerge branch 'meson/so_passcred' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 2 Feb 2024 09:35:08 +0000 (10:35 +0100)] 
Merge branch 'meson/so_passcred' of https://github.com/t-8ch/util-linux

* 'meson/so_passcred' of https://github.com/t-8ch/util-linux:
  meson: define _GNU_SOURCE when checking for SO_PASSCRED

3 months agosys-utils/lscpu: Unblock SIGSEGV before vmware_bdoor
WanBingjiang [Fri, 2 Feb 2024 02:43:08 +0000 (10:43 +0800)] 
sys-utils/lscpu: Unblock SIGSEGV before vmware_bdoor

3 months agomeson: define _GNU_SOURCE when checking for SO_PASSCRED
Thomas Weißschuh [Thu, 1 Feb 2024 19:48:49 +0000 (20:48 +0100)] 
meson: define _GNU_SOURCE when checking for SO_PASSCRED

SO_PASSCRED is not exposed in standards mode that was enabled in
commit 6240e4458cdf ("build: use -std=c99 and -std=c++11 by default").

Fixes: #2750
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 months agolib/cpuset: exit early from cpulist_parse
Thomas Weißschuh [Thu, 1 Feb 2024 19:09:41 +0000 (20:09 +0100)] 
lib/cpuset: exit early from cpulist_parse

If `a` exceeds `max`, any increment of `a` will also `exceed` max.
In this case the CPU_SET_S will never do anything all additional loops
are wasted.

Fixes #2748

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 months agolib/cpuset: make max variable const
Thomas Weißschuh [Thu, 1 Feb 2024 19:09:17 +0000 (20:09 +0100)] 
lib/cpuset: make max variable const

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 months agoMerge branch 'patch-1' of https://github.com/ZmoleCristian/util-linux
Karel Zak [Thu, 1 Feb 2024 14:49:49 +0000 (15:49 +0100)] 
Merge branch 'patch-1' of https://github.com/ZmoleCristian/util-linux

* 'patch-1' of https://github.com/ZmoleCristian/util-linux:
  Added Cristian Zmole

3 months agoMerge branch 'setpriv/without-landlock' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 1 Feb 2024 14:49:26 +0000 (15:49 +0100)] 
Merge branch 'setpriv/without-landlock' of https://github.com/t-8ch/util-linux

* 'setpriv/without-landlock' of https://github.com/t-8ch/util-linux:
  setpriv: apply landlock without configuration

3 months agoMerge branch 'ci/gcc-13' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 1 Feb 2024 14:49:12 +0000 (15:49 +0100)] 
Merge branch 'ci/gcc-13' of https://github.com/t-8ch/util-linux

* 'ci/gcc-13' of https://github.com/t-8ch/util-linux:
  ci: consistently use gcc 13 during CI

3 months agoMerge branch 'PR/build-sys-lastlog2' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 1 Feb 2024 14:48:56 +0000 (15:48 +0100)] 
Merge branch 'PR/build-sys-lastlog2' of github.com:karelzak/util-linux-work

* 'PR/build-sys-lastlog2' of github.com:karelzak/util-linux-work:
  autotools: cleanup lastlog2 stuff

3 months agosu: (man) improve formatting
Karel Zak [Thu, 1 Feb 2024 10:55:36 +0000 (11:55 +0100)] 
su: (man) improve formatting

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agosu: (man) add hint about sessions
Karel Zak [Thu, 1 Feb 2024 10:53:37 +0000 (11:53 +0100)] 
su: (man) add hint about sessions

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agoAdded Cristian Zmole
Zmole Cristian [Wed, 31 Jan 2024 23:02:20 +0000 (01:02 +0200)] 
Added Cristian Zmole

Added myself to contributors since PR #2451 was approved

Signed-off-by: Cristian Zmole chiarel@tragdate.ninja
3 months agosetpriv: apply landlock without configuration
Thomas Weißschuh [Wed, 31 Jan 2024 17:01:08 +0000 (18:01 +0100)] 
setpriv: apply landlock without configuration

Fixes #2746

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 months agoci: consistently use gcc 13 during CI
Thomas Weißschuh [Wed, 31 Jan 2024 14:29:48 +0000 (15:29 +0100)] 
ci: consistently use gcc 13 during CI

Some configurations where not migrated from 10 to 13.

The coveralls configuration stays on gcc 10 as the coverage data
generated by the compiler needs to be compatible with the installed
version of gcov.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 months agodocs: add exch to ReleaseNotes
Karel Zak [Wed, 31 Jan 2024 13:05:17 +0000 (14:05 +0100)] 
docs: add exch to ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agodocs: add enosys to ReleaseNotes
Karel Zak [Wed, 31 Jan 2024 12:50:17 +0000 (13:50 +0100)] 
docs: add enosys to ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agoautotools: cleanup lastlog2 stuff
Karel Zak [Mon, 29 Jan 2024 20:04:23 +0000 (21:04 +0100)] 
autotools: cleanup lastlog2 stuff

* use pkg-config (PKG_CHECK_MODULES) rather than check for sqlite3.h
  only
* define $SQLITE3_LIBS

* use UL_ macros in configure.ac for liblastlog2 and pam_lastlog2

* add --disable-pam-lastlog2

* check for PAM to define BUILD_PAM_LASTLOG2

* install lastlog2.h to $(includedir)/liblastlog2/lastlog2.h

* fix liblastlog2_la_LDFLAG

* add Requires.private to lastlog2.pc.in

* use $(SQLITE3_LIBS) rather than hardcoded -lsqlite3

Fixes: https://github.com/util-linux/util-linux/issues/2734
Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agoMerge branch 'lsfd--man-decoration' of https://github.com/masatake/util-linux
Karel Zak [Mon, 29 Jan 2024 13:01:52 +0000 (14:01 +0100)] 
Merge branch 'lsfd--man-decoration' of https://github.com/masatake/util-linux

* 'lsfd--man-decoration' of https://github.com/masatake/util-linux:
  lsdf: (man page) revise text decoration

3 months agoMerge branch 'lsfd--limit-listing-kthreads' of https://github.com/masatake/util-linux
Karel Zak [Mon, 29 Jan 2024 13:01:34 +0000 (14:01 +0100)] 
Merge branch 'lsfd--limit-listing-kthreads' of https://github.com/masatake/util-linux

* 'lsfd--limit-listing-kthreads' of https://github.com/masatake/util-linux:
  lsfd: don't list kernel threads unless --threads is given
  lsfd: (refactor) rename a function, s/new_process/new_proc/g

3 months agoMerge branch 'release-notes--fix-typo' of https://github.com/masatake/util-linux
Karel Zak [Mon, 29 Jan 2024 13:01:15 +0000 (14:01 +0100)] 
Merge branch 'release-notes--fix-typo' of https://github.com/masatake/util-linux

* 'release-notes--fix-typo' of https://github.com/masatake/util-linux:
  docs: fix a typo

3 months agolsdf: (man page) revise text decoration
Masatake YAMATO [Sun, 28 Jan 2024 17:34:21 +0000 (02:34 +0900)] 
lsdf: (man page) revise text decoration

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
3 months agolsfd: don't list kernel threads unless --threads is given
Masatake YAMATO [Wed, 24 Jan 2024 00:05:47 +0000 (09:05 +0900)] 
lsfd: don't list kernel threads unless --threads is given

3 months agolsfd: (refactor) rename a function, s/new_process/new_proc/g
Masatake YAMATO [Tue, 23 Jan 2024 23:58:45 +0000 (08:58 +0900)] 
lsfd: (refactor) rename a function, s/new_process/new_proc/g

Rename the function for making the name consistent with free_proc().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
3 months agoMerge branch 'liblastlog_so_2' of https://github.com/schubi2/util-linux
Karel Zak [Thu, 25 Jan 2024 09:00:00 +0000 (10:00 +0100)] 
Merge branch 'liblastlog_so_2' of https://github.com/schubi2/util-linux

* 'liblastlog_so_2' of https://github.com/schubi2/util-linux:
  set LIBLASTLOG2_2_40
  set soname of liblastlog2 to 2.0

3 months agoset LIBLASTLOG2_2_40
Stefan Schubert [Thu, 25 Jan 2024 08:12:39 +0000 (09:12 +0100)] 
set LIBLASTLOG2_2_40

3 months agodocs: fix a typo
Masatake YAMATO [Wed, 24 Jan 2024 19:35:50 +0000 (04:35 +0900)] 
docs: fix a typo

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
3 months agoset soname of liblastlog2 to 2.0
Stefan Schubert [Wed, 24 Jan 2024 12:40:37 +0000 (13:40 +0100)] 
set soname of liblastlog2 to 2.0

3 months agobuild-sys: release++ (v2.40-rc1) v2.40-rc1
Karel Zak [Wed, 24 Jan 2024 11:10:42 +0000 (12:10 +0100)] 
build-sys: release++ (v2.40-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>