]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
17 months agoMerge branch 'PR/lastlog2-cleanup' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 22 Feb 2024 09:38:25 +0000 (10:38 +0100)] 
Merge branch 'PR/lastlog2-cleanup' of github.com:karelzak/util-linux-work

* 'PR/lastlog2-cleanup' of github.com:karelzak/util-linux-work:
  lastlog2: convert check_user() to boolean-like macro
  lastlog: cleanup function definitions
  lastlog2: make longopts[] static-const
  lastlog: improve errors printing
  lastlog2: improve coding style

17 months agoenosys: add support for alternative error codes
Thomas Weißschuh [Sun, 4 Feb 2024 10:56:58 +0000 (11:56 +0100)] 
enosys: add support for alternative error codes

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agoenosys: generalize named number parsing
Thomas Weißschuh [Sun, 4 Feb 2024 10:36:54 +0000 (11:36 +0100)] 
enosys: generalize named number parsing

[kzak@redhat.com: - resolve merge conflict in main()]

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agoautotools: make errnos.h available without lsfd
Thomas Weißschuh [Sat, 17 Feb 2024 09:03:22 +0000 (10:03 +0100)] 
autotools: make errnos.h available without lsfd

enosys will use it.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agoMerge branch 'enosys/dump' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 22 Feb 2024 09:26:15 +0000 (10:26 +0100)] 
Merge branch 'enosys/dump' of https://github.com/t-8ch/util-linux

* 'enosys/dump' of https://github.com/t-8ch/util-linux:
  setpriv: (tests) add seccomp test
  setpriv: add support for seccomp filters
  enosys: add functionality to dump filter
  include: introduce seccomp.h

17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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

17 months agoMerge branch 'foo' of https://github.com/emanuele6/util-linux
Karel Zak [Mon, 19 Feb 2024 09:22:11 +0000 (10:22 +0100)] 
Merge branch 'foo' of https://github.com/emanuele6/util-linux

* 'foo' of https://github.com/emanuele6/util-linux:
  docs: remove duplicated author name in namei.1.adoc

17 months agoMerge branch 'patch-2' of https://github.com/ThomasKaiser/util-linux
Karel Zak [Mon, 19 Feb 2024 09:20:42 +0000 (10:20 +0100)] 
Merge branch 'patch-2' of https://github.com/ThomasKaiser/util-linux

* 'patch-2' of https://github.com/ThomasKaiser/util-linux:
  Add Microsoft as vendor and Cobalt 100 core

17 months agoMerge branch 'meson/lslogins' of https://github.com/t-8ch/util-linux
Karel Zak [Mon, 19 Feb 2024 09:13:59 +0000 (10:13 +0100)] 
Merge branch 'meson/lslogins' of https://github.com/t-8ch/util-linux

* 'meson/lslogins' of https://github.com/t-8ch/util-linux:
  meson: fix build of lslogins with -Dbuild-liblastlog2=disabled

17 months agoMerge branch 'fix-luks-offset' of https://github.com/mbroz/util-linux
Karel Zak [Mon, 19 Feb 2024 09:13:42 +0000 (10:13 +0100)] 
Merge branch 'fix-luks-offset' of https://github.com/mbroz/util-linux

* 'fix-luks-offset' of https://github.com/mbroz/util-linux:
  libblkid: Check offset in LUKS2 header

17 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>
17 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/

17 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>.

17 months agomeson: fix build of lslogins with -Dbuild-liblastlog2=disabled
Thomas Weißschuh [Sat, 17 Feb 2024 08:54:56 +0000 (09:54 +0100)] 
meson: fix build of lslogins with -Dbuild-liblastlog2=disabled

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 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>
17 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>
17 months agoMerge branch 'PR/dmesg-fixes' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 15 Feb 2024 09:10:42 +0000 (10:10 +0100)] 
Merge branch 'PR/dmesg-fixes' of github.com:karelzak/util-linux-work

* 'PR/dmesg-fixes' of github.com:karelzak/util-linux-work:
  tests: update dmesg deltas
  dmesg: fix delta calculation
  dmesg: don't affect delta by --since

17 months agoMerge branch 'PR/meson-lastlog2' of github.com:karelzak/util-linux-work
Karel Zak [Thu, 15 Feb 2024 09:10:08 +0000 (10:10 +0100)] 
Merge branch 'PR/meson-lastlog2' of github.com:karelzak/util-linux-work

* 'PR/meson-lastlog2' of github.com:karelzak/util-linux-work:
  meson: install lastlog2.h library header file

17 months agoMerge branch 'lslogins-lastlog2' of https://github.com/schubi2/util-linux
Karel Zak [Wed, 14 Feb 2024 13:46:26 +0000 (14:46 +0100)] 
Merge branch 'lslogins-lastlog2' of https://github.com/schubi2/util-linux

* 'lslogins-lastlog2' of https://github.com/schubi2/util-linux:
  added build option login-lastlogin
  added sqlite3 to packit
  added sqlite3 to debian build
  fixed time
  unifiy test output
  cleanup tests
  cleanup tests
  fixed time-stamp
  creating lastlog2 database in the tests
  check test output
  cleanup; Added testcase for lslogins and lastlog2 DB
  lslogins: Add support for lastlog2

17 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>
17 months agoMerge branch 'as-safe-maybe_final' of https://github.com/crrodriguez/util-linux
Karel Zak [Tue, 13 Feb 2024 19:08:58 +0000 (20:08 +0100)] 
Merge branch 'as-safe-maybe_final' of https://github.com/crrodriguez/util-linux

* 'as-safe-maybe_final' of https://github.com/crrodriguez/util-linux:
  Save and restore errno on signal handlers

17 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

17 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>
17 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>
17 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>
17 months agoSave and restore errno on signal handlers
Cristian Rodríguez [Sun, 11 Feb 2024 18:53:30 +0000 (15:53 -0300)] 
Save and restore errno on signal handlers

"Fetching and setting the value of errno is async-signal-safe
provided that the signal handler saves errno on entry and
       restores its value before returning."

save and restore errno on cases where it is needed.

17 months agoMerge branch 'minor-improvement' of https://github.com/calestyo/util-linux
Karel Zak [Mon, 12 Feb 2024 11:53:20 +0000 (12:53 +0100)] 
Merge branch 'minor-improvement' of https://github.com/calestyo/util-linux

* 'minor-improvement' of https://github.com/calestyo/util-linux:
  blkdev.h: update location of SCSI device types

17 months agofsck: warn if fsck.<type> not found and device is specified
Karel Zak [Thu, 8 Feb 2024 11:42:51 +0000 (12:42 +0100)] 
fsck: warn if fsck.<type> not found and device is specified

The fsck(8) command prints an error for certain 'required'
filesystems, such as extN, if the corresponding fsck.<type> helper is
not found. However, for other filesystems, it silently ignores the
device. While this behavior is acceptable for the -A option, if a user
explicitly specifies the device on the command line, it is probably a
good idea to be more verbose and issue a warning that the device will
be ignored. The warning is enabled only for interactive mode (only one
device specified or -s).

Note that some filesystems do not have an fsck utility, so caution is
needed when issuing such warnings to prevent the generation of a large
number of unwanted entries in system logs, etc."

Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 months agoMerge branch 'nopython' of https://github.com/Vogtinator/util-linux
Karel Zak [Mon, 12 Feb 2024 11:49:29 +0000 (12:49 +0100)] 
Merge branch 'nopython' of https://github.com/Vogtinator/util-linux

* 'nopython' of https://github.com/Vogtinator/util-linux:
  meson: Only build libmount python module if python was found

17 months agoMerge branch 'lastlog2' of https://github.com/Vogtinator/util-linux
Karel Zak [Mon, 12 Feb 2024 11:49:11 +0000 (12:49 +0100)] 
Merge branch 'lastlog2' of https://github.com/Vogtinator/util-linux

* 'lastlog2' of https://github.com/Vogtinator/util-linux:
  lastlog2: Fix various issues with meson

17 months agoMerge branch 'more-meson' of https://github.com/keszybz/util-linux
Karel Zak [Mon, 12 Feb 2024 11:48:52 +0000 (12:48 +0100)] 
Merge branch 'more-meson' of https://github.com/keszybz/util-linux

* 'more-meson' of https://github.com/keszybz/util-linux:
  meson: fix mismatch with handling of lib_dl dependency
  meson: add forgotten files to lists
  meson: fix disablement check

17 months agoMerge branch 'column-handle-ansi-escapes' of https://github.com/juarezr/util-linux
Karel Zak [Mon, 12 Feb 2024 11:48:13 +0000 (12:48 +0100)] 
Merge branch 'column-handle-ansi-escapes' of https://github.com/juarezr/util-linux

* 'column-handle-ansi-escapes' of https://github.com/juarezr/util-linux:
  column: add doc comment explaining ansi code detection
  column: fix regression tests complaint
  column: add test for ansi escapes
  column: fix unaligned cols in text with ansi escapes

17 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>
17 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.

17 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

17 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>
17 months agocolumn: add doc comment explaining ansi code detection
Juarez Rudsatz [Mon, 5 Feb 2024 18:59:15 +0000 (15:59 -0300)] 
column: add doc comment explaining ansi code detection

17 months agocolumn: fix regression tests complaint
Juarez Rudsatz [Mon, 5 Feb 2024 14:49:27 +0000 (11:49 -0300)] 
column: fix regression tests complaint

17 months agocolumn: add test for ansi escapes
Juarez Rudsatz [Mon, 5 Feb 2024 01:33:35 +0000 (22:33 -0300)] 
column: add test for ansi escapes

17 months agocolumn: fix unaligned cols in text with ansi escapes
Juarez Rudsatz [Mon, 5 Feb 2024 01:32:41 +0000 (22:32 -0300)] 
column: fix unaligned cols in text with ansi escapes

17 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.

17 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

17 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.

17 months agosetpriv: (tests) add seccomp test
Thomas Weißschuh [Fri, 2 Feb 2024 14:20:57 +0000 (15:20 +0100)] 
setpriv: (tests) add seccomp test

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agosetpriv: add support for seccomp filters
Thomas Weißschuh [Fri, 2 Feb 2024 14:20:40 +0000 (15:20 +0100)] 
setpriv: add support for seccomp filters

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agoenosys: add functionality to dump filter
Thomas Weißschuh [Fri, 2 Feb 2024 14:00:56 +0000 (15:00 +0100)] 
enosys: add functionality to dump filter

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agoinclude: introduce seccomp.h
Thomas Weißschuh [Fri, 2 Feb 2024 14:28:30 +0000 (15:28 +0100)] 
include: introduce seccomp.h

It will be used by setpriv in a future commit.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
17 months agoMerge branch 'lsfd--error' of https://github.com/masatake/util-linux
Karel Zak [Mon, 5 Feb 2024 11:07:49 +0000 (12:07 +0100)] 
Merge branch 'lsfd--error' of https://github.com/masatake/util-linux

* 'lsfd--error' of https://github.com/masatake/util-linux:
  tests: (lsfd) add a case testing ERROR type appeared in TYPE column
  tests: (test_mkfds::mmap) new factory
  lsfd: add --_drop-prvilege option for testing purpose
  lsfd: add ERROR as a new type
  lsfd: (refactor) make the steps for new_file consistent
  lsfd: (refactor) add abst_class as super class of file_class
  lsfd: (refactor) simplify the step to make a file struct
  lsfd: (refactor) simplify the step to copy a file struct if the result of its stat is reusable
  lsfd: (refactor) flatten bit fields in struct file
  lsfd: fix typos of a function name

17 months agoMerge branch 'meson/lastlog2' of https://github.com/t-8ch/util-linux v2.41-start
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

17 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

17 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

17 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>
17 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

17 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

17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 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>
17 months agotests: (lsfd) add a case testing ERROR type appeared in TYPE column
Masatake YAMATO [Tue, 23 Jan 2024 23:57:06 +0000 (08:57 +0900)] 
tests: (lsfd) add a case testing ERROR type appeared in TYPE column

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agotests: (test_mkfds::mmap) new factory
Masatake YAMATO [Mon, 29 Jan 2024 16:02:07 +0000 (01:02 +0900)] 
tests: (test_mkfds::mmap) new factory

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: add --_drop-prvilege option for testing purpose
Masatake YAMATO [Tue, 23 Jan 2024 20:20:49 +0000 (05:20 +0900)] 
lsfd: add --_drop-prvilege option for testing purpose

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: add ERROR as a new type
Masatake YAMATO [Mon, 15 Jan 2024 19:18:38 +0000 (04:18 +0900)] 
lsfd: add ERROR as a new type

lsfd ignored file descriptors with that readlink(2) or
stat(2) returned errors.

With ERORR type, lsfd can print these file descriptors with incomplete
information.

An example output:

   COMMAND        PID   USER ASSOC  XMODE  TYPE          SOURCE MNTID INODE NAME
   systemd      10677 yamato    31 ????-- ERROR readlink:EACCES
   slirp4netns 901147 yamato     7 ????-- ERROR     stat:EACCES             /home/yamato/.local/share/.../merged

The format of SOURCE column is SYSCALL:ERRNO.

The code for printing errno name is highly based on the code for
printing syscall name in enosys.c.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: (refactor) make the steps for new_file consistent
Masatake YAMATO [Mon, 15 Jan 2024 17:50:23 +0000 (02:50 +0900)] 
lsfd: (refactor) make the steps for new_file consistent

In parse_maps_line of the original code, we called readlink after stat
for gathering arguments that were passed to new_file().

The order was different from that in collect_file_symlink.
In parse_maps_line, we called stat after readlink.

The difference of the order may make the way of handling
errors of readlink and stat complicated.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: (refactor) add abst_class as super class of file_class
Masatake YAMATO [Sun, 14 Jan 2024 22:18:58 +0000 (07:18 +0900)] 
lsfd: (refactor) add abst_class as super class of file_class

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: (refactor) simplify the step to make a file struct
Masatake YAMATO [Sun, 14 Jan 2024 21:40:37 +0000 (06:40 +0900)] 
lsfd: (refactor) simplify the step to make a file struct

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: (refactor) simplify the step to copy a file struct if the result of its stat...
Masatake YAMATO [Sun, 14 Jan 2024 21:26:07 +0000 (06:26 +0900)] 
lsfd: (refactor) simplify the step to copy a file struct if the result of its stat is reusable

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: (refactor) flatten bit fields in struct file
Masatake YAMATO [Sun, 14 Jan 2024 00:37:37 +0000 (09:37 +0900)] 
lsfd: (refactor) flatten bit fields in struct file

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agolsfd: fix typos of a function name
Masatake YAMATO [Sun, 14 Jan 2024 21:19:50 +0000 (06:19 +0900)] 
lsfd: fix typos of a function name

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
17 months agoadded build option login-lastlogin
Stefan Schubert [Fri, 2 Feb 2024 17:46:40 +0000 (18:46 +0100)] 
added build option login-lastlogin

17 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>
17 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

17 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>
17 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>
17 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>
17 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

17 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

17 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>
17 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>
17 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>
17 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

17 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

17 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

17 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

17 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>
17 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>
17 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
17 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>
17 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>
17 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>
17 months agoadded sqlite3 to packit
Stefan Schubert [Wed, 31 Jan 2024 12:55:51 +0000 (13:55 +0100)] 
added sqlite3 to packit