]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
15 months agobuild(deps): bump actions/checkout from 3.2.0 to 3.3.0
dependabot[bot] [Wed, 1 Mar 2023 09:58:39 +0000 (09:58 +0000)] 
build(deps): bump actions/checkout from 3.2.0 to 3.3.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/755da8c3cf115ac066823e79a1e1788f8940201b...ac593985615ec2ede58e132d2e21d2b1cbd6127c)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agoMerge pull request #26393 from poettering/mempress
Luca Boccassi [Wed, 1 Mar 2023 12:28:12 +0000 (12:28 +0000)] 
Merge pull request #26393 from poettering/mempress

watch and act on memory pressure in most of our long-running services, including PID 1

15 months agoupdate TODO 26393/head
Lennart Poettering [Wed, 15 Feb 2023 10:27:07 +0000 (11:27 +0100)] 
update TODO

15 months agodoc: add document explaining memory pressure handling
Lennart Poettering [Thu, 23 Feb 2023 15:45:52 +0000 (16:45 +0100)] 
doc: add document explaining memory pressure handling

15 months agotest: add test for the new memory pressure unit file settings, and that they work
Lennart Poettering [Thu, 23 Feb 2023 16:41:35 +0000 (17:41 +0100)] 
test: add test for the new memory pressure unit file settings, and that they work

15 months agounits: let systemd --user manage its own memory pressure handling
Lennart Poettering [Fri, 24 Feb 2023 09:42:10 +0000 (10:42 +0100)] 
units: let systemd --user manage its own memory pressure handling

Let's make things systematic: the per-user and the per-system manager
should manage their own memory pressure, as they are, well, managers of
things.

This is particularly relevant and the per-user service manager should
watch its own "init.scope" subcgroup, instead of the main service unit
cgroup, and hence $MEMORY_PRESSURE_WATCH as set by the per-system
service manager would simply be wrong.

15 months agopid1: add unit file settings to control memory pressure logic
Lennart Poettering [Wed, 15 Feb 2023 18:00:14 +0000 (19:00 +0100)] 
pid1: add unit file settings to control memory pressure logic

15 months agopid1: also process memory pressure events (and SIGRTMIN+18)
Lennart Poettering [Wed, 15 Feb 2023 10:22:02 +0000 (11:22 +0100)] 
pid1: also process memory pressure events (and SIGRTMIN+18)

15 months agouserdbd: hook up memory pressure and sigrtmin18
Lennart Poettering [Thu, 23 Feb 2023 09:35:00 +0000 (10:35 +0100)] 
userdbd: hook up memory pressure and sigrtmin18

15 months agonspawn: hook up memory pressure + sigrtmin+18
Lennart Poettering [Thu, 23 Feb 2023 09:31:59 +0000 (10:31 +0100)] 
nspawn: hook up memory pressure + sigrtmin+18

15 months agoportabled: hook up SIGRTMIN+18 and memory pressure
Lennart Poettering [Thu, 23 Feb 2023 09:29:52 +0000 (10:29 +0100)] 
portabled: hook up SIGRTMIN+18 and memory pressure

15 months agonetworkd: hook up SIGRTMIN+18 and memory pressure
Lennart Poettering [Thu, 23 Feb 2023 09:28:03 +0000 (10:28 +0100)] 
networkd: hook up SIGRTMIN+18 and memory pressure

15 months agoimportd: hook up memory pressure, SIGRTMIN-18 (and in fact SIGINT + SIGTERM)
Lennart Poettering [Thu, 23 Feb 2023 09:25:27 +0000 (10:25 +0100)] 
importd: hook up memory pressure, SIGRTMIN-18 (and in fact SIGINT + SIGTERM)

15 months agotimesyncd: hook up memory pressure + sigrtmin18
Lennart Poettering [Thu, 23 Feb 2023 09:22:28 +0000 (10:22 +0100)] 
timesyncd: hook up memory pressure + sigrtmin18

15 months agologind: hook up memory pressure + SIGRTMIN+18
Lennart Poettering [Thu, 23 Feb 2023 09:19:24 +0000 (10:19 +0100)] 
logind: hook up memory pressure + SIGRTMIN+18

15 months agohomed: hook up memory pressure/SIGRTMIN+18 handling
Lennart Poettering [Thu, 16 Feb 2023 11:33:18 +0000 (12:33 +0100)] 
homed: hook up memory pressure/SIGRTMIN+18 handling

15 months agoudevd: enable memory pressure/SIGRTMIN+18 logic
Lennart Poettering [Thu, 16 Feb 2023 11:30:24 +0000 (12:30 +0100)] 
udevd: enable memory pressure/SIGRTMIN+18 logic

15 months agomachined: add support for memory pressure + SIGRTMIN+18
Lennart Poettering [Wed, 15 Feb 2023 10:31:45 +0000 (11:31 +0100)] 
machined: add support for memory pressure + SIGRTMIN+18

15 months agojournald: hook up journald with the memory pressure and SIGRTMIN+18 logic
Lennart Poettering [Tue, 14 Feb 2023 17:49:50 +0000 (18:49 +0100)] 
journald: hook up journald with the memory pressure and SIGRTMIN+18 logic

15 months agoresolved: flush caches on memory pressure and support SIGRTMIN+18
Lennart Poettering [Tue, 14 Feb 2023 15:13:59 +0000 (16:13 +0100)] 
resolved: flush caches on memory pressure and support SIGRTMIN+18

15 months agoshared: add a common SIGRTMIN-18 handler
Lennart Poettering [Tue, 14 Feb 2023 15:37:05 +0000 (16:37 +0100)] 
shared: add a common SIGRTMIN-18 handler

15 months agoMerge pull request #26548 from poettering/user-record-ambient
Luca Boccassi [Tue, 28 Feb 2023 23:40:57 +0000 (23:40 +0000)] 
Merge pull request #26548 from poettering/user-record-ambient

add ambient/bounding set fields to user records, and set CAP_WAKE_ALARM by default for local regular user sessions

15 months agoupdate NEWS 26548/head
Lennart Poettering [Wed, 22 Feb 2023 17:43:45 +0000 (18:43 +0100)] 
update NEWS

15 months agotest: test setting ambient caps via pam_systemd.so
Lennart Poettering [Wed, 22 Feb 2023 17:05:18 +0000 (18:05 +0100)] 
test: test setting ambient caps via pam_systemd.so

15 months agopam_systemd: process the two new capabilities user records fields in pam_systemd
Lennart Poettering [Fri, 17 Feb 2023 21:49:16 +0000 (22:49 +0100)] 
pam_systemd: process the two new capabilities user records fields in pam_systemd

And also: by default, for the systemd-user service and for local
sessions (i.e. those assigned to a seat): let's imply CAP_WAKE_SYSTEM
for them by default. Yes, let's pass one specific capability by default to local
unprivileged users.

The capability services exactly once purpose: to allow system wake-up
from suspend via alarm clocks, hence is relatively limited in focus. By
adding this tools such as GNOME's Alarm Clock app can simply allocate a
CLOCK_REALTIME_ALARM (or ask systemd --user to do this) timer and it
will wake up the system as necessary.

Note that systemd --user will not pass the ambient caps on by default,
so even with this change, individual services need to use
AmbientCapabilities= to pass this on to the individual programs.

Fixes: #17564 #21382
15 months agohomectl: make the new caps field configurable via homectl
Lennart Poettering [Fri, 17 Feb 2023 21:25:47 +0000 (22:25 +0100)] 
homectl: make the new caps field configurable via homectl

15 months agouser-record: extend user records with an ambient and bounding caps set field
Lennart Poettering [Fri, 17 Feb 2023 21:22:16 +0000 (22:22 +0100)] 
user-record: extend user records with an ambient and bounding caps set field

In particular the ambieht caps field is useful: we can use it later to
pass caps such as CAP_WAKE_ALARM to regular users on login.

15 months agomkosi: add some really basic tools to default mkosi image
Lennart Poettering [Wed, 22 Feb 2023 12:04:46 +0000 (13:04 +0100)] 
mkosi: add some really basic tools to default mkosi image

"passwd" and "pscap" are extremely useful to debug basic OS behaviour,
and tiny. So let's add them to our default development images, just to
save us some headaches.

15 months agoMerge pull request #26608 from medhefgo/boot-arm
Luca Boccassi [Tue, 28 Feb 2023 18:48:45 +0000 (18:48 +0000)] 
Merge pull request #26608 from medhefgo/boot-arm

boot: Some ARM fixes

15 months agoman: fix typo in systemd.generator
Antonio Alvarez Feijoo [Tue, 28 Feb 2023 15:04:03 +0000 (16:04 +0100)] 
man: fix typo in systemd.generator

15 months agoboot: Provide div0 handlers for ARM 26608/head
Jan Janssen [Mon, 27 Feb 2023 17:43:07 +0000 (18:43 +0100)] 
boot: Provide div0 handlers for ARM

This is a cleaner approach to 59833064742310bfccf028b0278811ba5cff8dcf.

15 months agoboot: Fix data model detection for ARM
Jan Janssen [Mon, 27 Feb 2023 14:58:42 +0000 (15:58 +0100)] 
boot: Fix data model detection for ARM

For whatever reason, ARM does not define __ILP32__.

15 months agopsi-util: fix error handling
Lennart Poettering [Mon, 27 Feb 2023 18:02:41 +0000 (19:02 +0100)] 
psi-util: fix error handling

We checked ERRNO_IS_NOT_SUPPORTED on a possible positive non-error code,
which isn't right.

Fix that. Also add caching, since we are about to call this more often.

15 months agosd-event: handle kernels that set CONFIG_PSI_DEFAULT_DISABLED more gracefully
Lennart Poettering [Mon, 27 Feb 2023 18:05:19 +0000 (19:05 +0100)] 
sd-event: handle kernels that set CONFIG_PSI_DEFAULT_DISABLED more gracefully

If CONFIG_PSI_DEFAULT_DISABLED is set in the kernel, then the PSI files
will be there, and you can open them, but read()/write() will fail.
Which is terrible, since that happens so late. But anyway, handle this
gracefully.

15 months agoMerge pull request #26605 from poettering/noxenix
Luca Boccassi [Tue, 28 Feb 2023 12:14:16 +0000 (12:14 +0000)] 
Merge pull request #26605 from poettering/noxenix

journal error message fixes

15 months agojournald: remove triplicate logging about failure to write log lines 26605/head
Lennart Poettering [Mon, 27 Feb 2023 14:48:45 +0000 (15:48 +0100)] 
journald: remove triplicate logging about failure to write log lines

Let's log exactly at one place about failed writing of log lines to
journal file: in shall_try_append_again().

Then, if we decide to suppress a retry-after-vacuum because we already
vacuumed anyway then say this explicitly as "supressed rotation",
because that's what we do here.

This removes triplicate logging about the same error, and logs exactly
once, plus optional one "suppressed rotation" message. (plus more debug
output). The triplicate logging was bad in particular because it had no
understanding of the actual error codes and just showed generic UNIX
error strings ("Not a XENIX named type file"). By relying on
shall_try_append_again() to do all logging we now get very clean error
strings for all conditions.

Fixes: #26496
15 months agojournald: always pass error code to logging function, even if we don't use it with %m
Lennart Poettering [Mon, 27 Feb 2023 14:47:11 +0000 (15:47 +0100)] 
journald: always pass error code to logging function, even if we don't use it with %m

We always want to pass the error code along with the log call, so that
it can add it to structured logging, even if the format string does not
contain %m.

15 months agojournald: upgrade log message about missing mmap() support to LOG_ERR
Lennart Poettering [Mon, 27 Feb 2023 14:42:59 +0000 (15:42 +0100)] 
journald: upgrade log message about missing mmap() support to LOG_ERR

in this case we really cannot proceed and fail. Let's log about this
loudly, since we simply fail the operation to write anything.

15 months agojournald: downgrade various log messages from LOG_WARNING to LOG_INFO
Lennart Poettering [Mon, 27 Feb 2023 14:40:48 +0000 (15:40 +0100)] 
journald: downgrade various log messages from LOG_WARNING to LOG_INFO

None of these conditions are real issues, but they can simply happen
because we just swtched from /run to /var as backend for logging and
there are old files from different boots with different systemd versions
and so on.

Let's not make more noise than necessary: still log, but not consider it
a warning, but just some normal thing.

We are handling these issues safely after all: by rotating and starting
anew, i.e. there's no reason to be concerned.

15 months agojournald: start log message uppercase, like every other one around
Lennart Poettering [Mon, 27 Feb 2023 14:39:24 +0000 (15:39 +0100)] 
journald: start log message uppercase, like every other one around

15 months agojournald: make sure shall_try_append_again() logs about all return codes passed in...
Lennart Poettering [Mon, 27 Feb 2023 14:35:01 +0000 (15:35 +0100)] 
journald: make sure shall_try_append_again() logs about all return codes passed in, not just some

15 months agosystemctl: print better message if default target is masked
David Tardon [Wed, 2 Mar 2022 20:02:21 +0000 (21:02 +0100)] 
systemctl: print better message if default target is masked

If the default target is masked, `systemctl get-default` prints

  Failed to get default target: Operation not possible due to RF-kill

That's a bit too cryptic, so let's make it clear what's actually
happening.

Fixes #26589.

15 months agotests: temporarily disable time-util failing tests
Luca Boccassi [Mon, 27 Feb 2023 18:42:04 +0000 (18:42 +0000)] 
tests: temporarily disable time-util failing tests

These are failing since https://github.com/systemd/systemd/pull/26409
disable for now

15 months agoRevert "dissect-image: don't probe swap partitions needlessly"
Lennart Poettering [Mon, 27 Feb 2023 12:45:17 +0000 (13:45 +0100)] 
Revert "dissect-image: don't probe swap partitions needlessly"

This reverts commit df4524cb3796529b435af309f5e6a2d92bcdaaa0.

This commit is just wrong. The thing is that we *don't* know
automatically that the partition contains a swap image, because it could
be encrypted.

Hence revert.

Fixes: #26595
15 months agoupdate TODO
Lennart Poettering [Mon, 27 Feb 2023 18:02:35 +0000 (19:02 +0100)] 
update TODO

15 months agotest: add coverage test for udevadm
David Tardon [Fri, 11 Nov 2022 14:28:25 +0000 (15:28 +0100)] 
test: add coverage test for udevadm

15 months agoMerge pull request #26578 from thkukuk/main
Yu Watanabe [Sat, 25 Feb 2023 22:54:11 +0000 (07:54 +0900)] 
Merge pull request #26578 from thkukuk/main

sd-login: add sd_uid_get_login_time interface #26574

15 months agorules: remove redundant duplicate comparisons
Dmitry V. Levin [Sat, 25 Feb 2023 20:00:00 +0000 (20:00 +0000)] 
rules: remove redundant duplicate comparisons

$ grep -F -n -o 'ENV{DISKSEQ}=="?*", ' rules.d/60-persistent-storage.rules
139:ENV{DISKSEQ}=="?*",
139:ENV{DISKSEQ}=="?*",
140:ENV{DISKSEQ}=="?*",
140:ENV{DISKSEQ}=="?*",

Reported-by: Alexey Gladkov <legion@kernel.org>
Fixes: 17d97d4c90f8 ("udev: create disk/by-diskseq symlink only when the device has diskseq")
Fixes: 583dc6d933d8 ("udev: also create partition /dev/disk/by-diskseq/ symlinks")
15 months agosd-login: document that result is in microseconds 26578/head
Thorsten Kukuk [Fri, 24 Feb 2023 13:51:00 +0000 (14:51 +0100)] 
sd-login: document that result is in microseconds

15 months agosd-login: add sd_uid_get_login_time interface #26574
Thorsten Kukuk [Fri, 24 Feb 2023 08:47:52 +0000 (09:47 +0100)] 
sd-login: add sd_uid_get_login_time interface #26574

15 months agotpm2-util: use compound initialization when allocating tpm2 objects
Lennart Poettering [Fri, 24 Feb 2023 17:20:50 +0000 (18:20 +0100)] 
tpm2-util: use compound initialization when allocating tpm2 objects

15 months agotree-wide: Use correct SPDX license identifier
Jan Janssen [Fri, 24 Feb 2023 18:23:01 +0000 (19:23 +0100)] 
tree-wide: Use correct SPDX license identifier

15 months agoman: add two missing commands to synopsys
Lennart Poettering [Fri, 24 Feb 2023 13:24:18 +0000 (14:24 +0100)] 
man: add two missing commands to synopsys

15 months agoupdate TODO
Lennart Poettering [Fri, 24 Feb 2023 16:08:56 +0000 (17:08 +0100)] 
update TODO

15 months agoMerge pull request #26579 from poettering/manager-env-clean-up
Lennart Poettering [Fri, 24 Feb 2023 13:11:57 +0000 (14:11 +0100)] 
Merge pull request #26579 from poettering/manager-env-clean-up

service manager env var clean-up fixes

15 months agomempool: fix tile alignment check
Lennart Poettering [Fri, 24 Feb 2023 09:41:47 +0000 (10:41 +0100)] 
mempool: fix tile alignment check

We should check alignment *after* determining the pointer points into
our pool, not before. Otherwise might might end up checking alignment of
the pointer relative to our base, even though it is taken relative to
some other base.

Follow-up for: a2b052b29f8bc141e94a4af95d1653a38a57eaeb
See: https://github.com/systemd/systemd/pull/26393#issuecomment-1442295012

15 months agolibsystemd: sd_journal_get_seqnum() must be tagged with 254 symver, not 253
Lennart Poettering [Fri, 24 Feb 2023 10:15:46 +0000 (11:15 +0100)] 
libsystemd: sd_journal_get_seqnum() must be tagged with 254 symver, not 253

This is a follow-up for b1712fabd1702640b04b0acdbba2d78294313a4d which
was prepped for 253, but merged into early 254 development cycle. It
thus had the symbol it adds at the wrong symver. Fix thta.

15 months agoMerge pull request #26409 from yuwata/parse-timestamp
Luca Boccassi [Fri, 24 Feb 2023 11:45:03 +0000 (11:45 +0000)] 
Merge pull request #26409 from yuwata/parse-timestamp

fix parse_timestamp()

15 months agoMerge pull request #26217 from bluca/dump_mem
Luca Boccassi [Fri, 24 Feb 2023 10:31:21 +0000 (10:31 +0000)] 
Merge pull request #26217 from bluca/dump_mem

Add D-Bus method and analyze command to dump malloc_info()

15 months agoman: document REMOTE_ADDR/REMOTE_PORT along with the other env vars 26579/head
Lennart Poettering [Fri, 24 Feb 2023 09:21:49 +0000 (10:21 +0100)] 
man: document REMOTE_ADDR/REMOTE_PORT along with the other env vars

15 months agomanager: be more careful with env var clean-up
Lennart Poettering [Fri, 24 Feb 2023 09:15:35 +0000 (10:15 +0100)] 
manager: be more careful with env var clean-up

Let's add some more env vars we nowadays set for activated services to
the list of env vars we strip from the environment block we pass on.

15 months agoMerge pull request #26574 from YHNdnzj/sd-login-new-interface
Yu Watanabe [Fri, 24 Feb 2023 00:20:52 +0000 (09:20 +0900)] 
Merge pull request #26574 from YHNdnzj/sd-login-new-interface

sd-login: add two interfaces for retriving session info

15 months agotest: add tests for format_timestamp() and parse_timestamp() with various timezone 26409/head
Yu Watanabe [Sat, 11 Feb 2023 20:30:49 +0000 (05:30 +0900)] 
test: add tests for format_timestamp() and parse_timestamp() with various timezone

15 months agotime-util: make parse_timestamp() use the RFC-822/ISO 8601 standard timezone spec
Yu Watanabe [Mon, 13 Feb 2023 18:39:15 +0000 (03:39 +0900)] 
time-util: make parse_timestamp() use the RFC-822/ISO 8601 standard timezone spec

If the timezone is specified with a number e.g. +0900 or so, then
let's parse the time as a UTC, and adjust it with the specified time
shift.

Otherwise, if an area has timezone change, e.g.
---
Africa/Casablanca  Sun Jun 17 01:59:59 2018 UT = Sun Jun 17 01:59:59 2018 +00 isdst=0 gmtoff=0
Africa/Casablanca  Sun Jun 17 02:00:00 2018 UT = Sun Jun 17 03:00:00 2018 +01 isdst=1 gmtoff=3600
Africa/Casablanca  Sun Oct 28 01:59:59 2018 UT = Sun Oct 28 02:59:59 2018 +01 isdst=1 gmtoff=3600
Africa/Casablanca  Sun Oct 28 02:00:00 2018 UT = Sun Oct 28 03:00:00 2018 +01 isdst=0 gmtoff=3600
---
then we could not determine isdst from the timezone (+01 in the above)
and mktime() will provide wrong results.

Fixes #26370.

15 months agotime-util: drop unnecessary assignment of timezone name
Yu Watanabe [Wed, 15 Feb 2023 04:51:15 +0000 (13:51 +0900)] 
time-util: drop unnecessary assignment of timezone name

As mktime() does not use timezone neme.

15 months agotime-util: rename variables
Yu Watanabe [Wed, 15 Feb 2023 04:46:50 +0000 (13:46 +0900)] 
time-util: rename variables

No functional changes, just refactoring.

15 months agotime-util: shorten code a bit
Yu Watanabe [Mon, 13 Feb 2023 19:27:52 +0000 (04:27 +0900)] 
time-util: shorten code a bit

No functional change, just refactoring.

15 months agotime-util: use usec_add() and usec_sub_unsigned()
Yu Watanabe [Mon, 13 Feb 2023 19:27:27 +0000 (04:27 +0900)] 
time-util: use usec_add() and usec_sub_unsigned()

And move the check with USEC_TIMESTAMP_FORMATTABLE_MAX at the end,
as usec_add() can handle overflow correctly.

15 months agotime-util: use result from startswith_no_case()
Yu Watanabe [Mon, 13 Feb 2023 19:14:24 +0000 (04:14 +0900)] 
time-util: use result from startswith_no_case()

No functional change, just refactoring.

15 months agotime-util: do not use strdupa()
Yu Watanabe [Mon, 13 Feb 2023 18:41:26 +0000 (03:41 +0900)] 
time-util: do not use strdupa()

The input string may come from command line, config files.

15 months agotime-util: drop redundant else
Yu Watanabe [Mon, 13 Feb 2023 18:43:58 +0000 (03:43 +0900)] 
time-util: drop redundant else

15 months agotime-util: add assertions
Yu Watanabe [Mon, 13 Feb 2023 17:06:13 +0000 (02:06 +0900)] 
time-util: add assertions

15 months agotime-util: rename variables
Yu Watanabe [Mon, 13 Feb 2023 17:04:31 +0000 (02:04 +0900)] 
time-util: rename variables

15 months agotime-util: align string table
Yu Watanabe [Mon, 13 Feb 2023 16:41:38 +0000 (01:41 +0900)] 
time-util: align string table

15 months agotime-util: use DEFINE_STRING_TABLE_LOOKUP_TO_STRING() macro
Yu Watanabe [Mon, 13 Feb 2023 16:40:56 +0000 (01:40 +0900)] 
time-util: use DEFINE_STRING_TABLE_LOOKUP_TO_STRING() macro

15 months agotime-util: drop redundant space
Yu Watanabe [Mon, 13 Feb 2023 16:38:57 +0000 (01:38 +0900)] 
time-util: drop redundant space

15 months agotime-util: drop unused definition of FORMAT_TIMESTAMP_WIDTH
Yu Watanabe [Sat, 11 Feb 2023 20:30:34 +0000 (05:30 +0900)] 
time-util: drop unused definition of FORMAT_TIMESTAMP_WIDTH

15 months agoman,catalog: fix typo
Yu Watanabe [Thu, 23 Feb 2023 23:52:39 +0000 (08:52 +0900)] 
man,catalog: fix typo

Follow-up for #26448.

15 months agoshared: move cg_set_access() declaration to right header file
Lennart Poettering [Thu, 23 Feb 2023 17:27:43 +0000 (18:27 +0100)] 
shared: move cg_set_access() declaration to right header file

This function was moved from cgroup-util.c to cgroup-setup.c a while
back, but the prototype in the matching header files wasn't migrated.
Let's fix that.

15 months agojournal-file: Improve debug messages
Daan De Meyer [Thu, 23 Feb 2023 14:55:36 +0000 (15:55 +0100)] 
journal-file: Improve debug messages

15 months agojournal-file: Fix return value in bump_entry_array()
Daan De Meyer [Thu, 23 Feb 2023 14:40:38 +0000 (15:40 +0100)] 
journal-file: Fix return value in bump_entry_array()

15 months agosystemctl: use bus_message_hash_ops
Yu Watanabe [Thu, 23 Feb 2023 12:49:29 +0000 (21:49 +0900)] 
systemctl: use bus_message_hash_ops

15 months agoman: link up sd_event_add_memory_pressure() more
Lennart Poettering [Thu, 23 Feb 2023 16:22:57 +0000 (17:22 +0100)] 
man: link up sd_event_add_memory_pressure() more

15 months agoanalyze: add 'malloc' verb to dump malloc_info() 26217/head
Luca Boccassi [Thu, 26 Jan 2023 13:28:15 +0000 (13:28 +0000)] 
analyze: add 'malloc' verb to dump malloc_info()

Gets the memory state of the manager:

root@image:~# systemd-analyze malloc
<malloc version=1>
<heap nr=0>
<sizes>
  <size from=33 to=33 total=396 count=12/>
  <unsorted from=20385 to=20385 total=20385 count=1/>
</sizes>
<total type=fast count=0 size=0/>
<total type=rest count=14 size=36589/>
<system type=current size=1691648/>
<system type=max size=1839104/>
<aspace type=total size=1691648/>
<aspace type=mprotect size=1691648/>
</heap>
<total type=fast count=0 size=0/>
<total type=rest count=14 size=36589/>
<total type=mmap count=0 size=0/>
<system type=current size=1691648/>
<system type=max size=1839104/>
<aspace type=total size=1691648/>
<aspace type=mprotect size=1691648/>
</malloc>

15 months agosd-login: add sd_session_get_start_time 26574/head
Mike Yuan [Thu, 23 Feb 2023 17:45:50 +0000 (01:45 +0800)] 
sd-login: add sd_session_get_start_time

15 months agosd-login: add sd_session_get_username
Mike Yuan [Thu, 23 Feb 2023 16:48:10 +0000 (00:48 +0800)] 
sd-login: add sd_session_get_username

15 months agoMerge pull request #26258 from DaanDeMeyer/boot-smbios
Daan De Meyer [Thu, 23 Feb 2023 14:59:18 +0000 (15:59 +0100)] 
Merge pull request #26258 from DaanDeMeyer/boot-smbios

stub: Read extra kernel command line items from SMBIOS

15 months agomanager: add GetMallocInfo() hidden/debug method
Luca Boccassi [Thu, 26 Jan 2023 12:51:55 +0000 (12:51 +0000)] 
manager: add GetMallocInfo() hidden/debug method

Return the output of malloc_info() via a file descriptor (in case it
gets large on a busy system). Useful to get live data about memory
usage when it is not possible to run under a profiler from the get-go.
Do not formally register the method, but add a 'hidden' interface
so that it cannot be seen by introspection or by looking at the
object.

15 months agoMerge pull request #26535 from yuwata/systemctl-list-cleanups
Yu Watanabe [Thu, 23 Feb 2023 12:38:13 +0000 (21:38 +0900)] 
Merge pull request #26535 from yuwata/systemctl-list-cleanups

systemctl-list: several cleanups

15 months agoMerge pull request #26560 from yuwata/journal-send-fix-memleak-and-cleanups
Yu Watanabe [Thu, 23 Feb 2023 12:37:20 +0000 (21:37 +0900)] 
Merge pull request #26560 from yuwata/journal-send-fix-memleak-and-cleanups

sd-journal: several fixlets and cleanups for sd_journal_send()

15 months agocore/dbus-socket: check the socket path is absolute
Yu Watanabe [Thu, 23 Feb 2023 09:03:50 +0000 (18:03 +0900)] 
core/dbus-socket: check the socket path is absolute

In config_parse_socket_listen(), we have checked the path is absolute,
however we have not in the dbus method.

15 months agoexecute: pass ambient caps from PAM through to invoked service
Lennart Poettering [Wed, 22 Feb 2023 12:06:29 +0000 (13:06 +0100)] 
execute: pass ambient caps from PAM through to invoked service

If a PAM service sets some ambient caps, we should honour that, hence
query it, and merge it with our own ambient settings.

This needs to be done manually since otherwise dropping privs via
setresuid() will undo all such caps, and we need to manually tweak
things to keep them.

15 months agoMerge pull request #26563 from dtardon/fd-init
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2023 10:43:09 +0000 (11:43 +0100)] 
Merge pull request #26563 from dtardon/fd-init

Initialize fds with -EBADF + drop one unneeded initialization

15 months agoMerge pull request #26556 from keszybz/list-timers-optimize-left
Zbigniew Jędrzejewski-Szmek [Thu, 23 Feb 2023 10:37:48 +0000 (11:37 +0100)] 
Merge pull request #26556 from keszybz/list-timers-optimize-left

Do not say " left" on every timer in LEFT column

15 months agosystemctl: cleanups for list-paths 26535/head
Yu Watanabe [Wed, 22 Feb 2023 07:28:43 +0000 (16:28 +0900)] 
systemctl: cleanups for list-paths

- Rename struct path_info -> PathInfo,
- Drop struct path_infos,
- Use CLEANUP_ARRAY(),

No functional change, just refactoring.

15 months agosystemctl: cleanups for list-automounts
Yu Watanabe [Wed, 22 Feb 2023 07:12:29 +0000 (16:12 +0900)] 
systemctl: cleanups for list-automounts

- Rename struct automount_info -> AutomountInfo,
- use CLEANUP_ARRAY(), and etc.

No functional change, just refactoring.

15 months agosystemctl: cleanups for list-timers
Yu Watanabe [Wed, 22 Feb 2023 06:57:33 +0000 (15:57 +0900)] 
systemctl: cleanups for list-timers

- Rename struct timer_info -> TimerInfo,
- use CLEANUP_ARRAY().

No functional change, just refactoring.

15 months agosystemctl: cleanups for list-sockets
Yu Watanabe [Wed, 22 Feb 2023 06:20:20 +0000 (15:20 +0900)] 
systemctl: cleanups for list-sockets

- Rename struct socket_info -> SocketInfo.
- Drop own_triggered field, and always copy the triggered field.
- Use CLEANUP_ARRAY().

No functional changes, just refactoring.

15 months agovmm: Modernize get_smbios_table() 26258/head
Daan De Meyer [Wed, 22 Feb 2023 16:04:58 +0000 (17:04 +0100)] 
vmm: Modernize get_smbios_table()

15 months agostub: Read extra kernel command line items from SMBIOS
Daan De Meyer [Mon, 30 Jan 2023 15:26:50 +0000 (16:26 +0100)] 
stub: Read extra kernel command line items from SMBIOS

Let's read more kernel command line arguments from SMBIOS OEM string
io.systemd.stub.kernel-cmdline-extra. This allows adding debug kernel
command line arguments when booting in qemy without having to modify
the UKI.