Lennart Poettering
d6df3bfbb8
journald: make sure shall_try_append_again() logs about all return codes passed in, not just some
2023-02-28 09:32:42 +01:00
David Tardon
7c78a19322
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 .
2023-02-28 06:45:15 +09:00
Luca Boccassi
fe56f21ae3
tests: temporarily disable time-util failing tests
...
These are failing since https://github.com/systemd/systemd/pull/26409
disable for now
2023-02-27 21:37:58 +00:00
Lennart Poettering
41aca66ba4
Revert "dissect-image: don't probe swap partitions needlessly"
...
This reverts commit df4524cb37 .
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
2023-02-27 19:11:17 +01:00
Lennart Poettering
a69a520bd4
update TODO
2023-02-27 19:07:34 +01:00
David Tardon
95cf8cae77
test: add coverage test for udevadm
2023-02-27 07:22:20 +09:00
Yu Watanabe
e6faa55878
Merge pull request #26578 from thkukuk/main
...
sd-login: add sd_uid_get_login_time interface #26574
2023-02-26 07:54:11 +09:00
Dmitry V. Levin
dc652e7dc3
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: 17d97d4c90 ("udev: create disk/by-diskseq symlink only when the device has diskseq")
Fixes: 583dc6d933 ("udev: also create partition /dev/disk/by-diskseq/ symlinks")
2023-02-26 07:51:26 +09:00
Thorsten Kukuk
634c64a517
sd-login: document that result is in microseconds
2023-02-25 16:14:11 +01:00
Thorsten Kukuk
d622fefc00
sd-login: add sd_uid_get_login_time interface #26574
2023-02-25 16:14:11 +01:00
Lennart Poettering
d70e4bc9f1
tpm2-util: use compound initialization when allocating tpm2 objects
2023-02-24 21:51:19 +00:00
Jan Janssen
eb81a60c73
tree-wide: Use correct SPDX license identifier
2023-02-24 18:53:17 +00:00
Lennart Poettering
aff131775b
man: add two missing commands to synopsys
2023-02-24 17:11:57 +01:00
Lennart Poettering
8b098d94ae
update TODO
2023-02-24 17:09:04 +01:00
Lennart Poettering
0a75dca1cc
Merge pull request #26579 from poettering/manager-env-clean-up
...
service manager env var clean-up fixes
2023-02-24 14:11:57 +01:00
Lennart Poettering
9b47b18a1a
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: a2b052b29f
See: https://github.com/systemd/systemd/pull/26393#issuecomment-1442295012
2023-02-24 14:11:31 +01:00
Lennart Poettering
ccacde77f3
libsystemd: sd_journal_get_seqnum() must be tagged with 254 symver, not 253
...
This is a follow-up for b1712fabd1 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.
2023-02-24 13:49:45 +01:00
Luca Boccassi
e1e6d5f353
Merge pull request #26409 from yuwata/parse-timestamp
...
fix parse_timestamp()
2023-02-24 11:45:03 +00:00
Luca Boccassi
0e550cbc63
Merge pull request #26217 from bluca/dump_mem
...
Add D-Bus method and analyze command to dump malloc_info()
2023-02-24 10:31:21 +00:00
Lennart Poettering
e7a2594219
man: document REMOTE_ADDR/REMOTE_PORT along with the other env vars
2023-02-24 10:23:53 +01:00
Lennart Poettering
c792a2e5db
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.
2023-02-24 10:23:53 +01:00
Yu Watanabe
9cddd36707
Merge pull request #26574 from YHNdnzj/sd-login-new-interface
...
sd-login: add two interfaces for retriving session info
2023-02-24 09:20:52 +09:00
Yu Watanabe
8b51c41fd0
test: add tests for format_timestamp() and parse_timestamp() with various timezone
2023-02-24 08:55:28 +09:00
Yu Watanabe
7a9afae604
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 .
2023-02-24 08:55:27 +09:00
Yu Watanabe
97c5f7ba1f
time-util: drop unnecessary assignment of timezone name
...
As mktime() does not use timezone neme.
2023-02-24 08:55:27 +09:00
Yu Watanabe
a83c1baaeb
time-util: rename variables
...
No functional changes, just refactoring.
2023-02-24 08:55:27 +09:00
Yu Watanabe
1d2c42c5dc
time-util: shorten code a bit
...
No functional change, just refactoring.
2023-02-24 08:55:27 +09:00
Yu Watanabe
db43717e98
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.
2023-02-24 08:55:27 +09:00
Yu Watanabe
f2ecfd8bc1
time-util: use result from startswith_no_case()
...
No functional change, just refactoring.
2023-02-24 08:55:27 +09:00
Yu Watanabe
804537bdc4
time-util: do not use strdupa()
...
The input string may come from command line, config files.
2023-02-24 08:55:27 +09:00
Yu Watanabe
17d1ebfc43
time-util: drop redundant else
2023-02-24 08:55:27 +09:00
Yu Watanabe
dff3bddc54
time-util: add assertions
2023-02-24 08:55:27 +09:00
Yu Watanabe
cf98b66d1a
time-util: rename variables
2023-02-24 08:55:27 +09:00
Yu Watanabe
e01a8fdd26
time-util: align string table
2023-02-24 08:55:27 +09:00
Yu Watanabe
d227a42aad
time-util: use DEFINE_STRING_TABLE_LOOKUP_TO_STRING() macro
2023-02-24 08:55:27 +09:00
Yu Watanabe
7464953f33
time-util: drop redundant space
2023-02-24 08:55:27 +09:00
Yu Watanabe
6b04af6072
time-util: drop unused definition of FORMAT_TIMESTAMP_WIDTH
2023-02-24 08:55:27 +09:00
Yu Watanabe
c73676dcbb
man,catalog: fix typo
...
Follow-up for #26448 .
2023-02-24 08:52:42 +09:00
Lennart Poettering
dafb406383
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.
2023-02-23 20:44:35 +00:00
Daan De Meyer
06762aa53e
journal-file: Improve debug messages
2023-02-23 19:16:59 +00:00
Daan De Meyer
0399902440
journal-file: Fix return value in bump_entry_array()
2023-02-23 19:11:25 +00:00
Yu Watanabe
43823dfefd
systemctl: use bus_message_hash_ops
2023-02-23 19:10:00 +00:00
Lennart Poettering
efb18b6ae7
man: link up sd_event_add_memory_pressure() more
2023-02-23 19:04:56 +00:00
Luca Boccassi
f50535afad
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>
2023-02-23 18:59:06 +00:00
Mike Yuan
c4ef14dc2a
sd-login: add sd_session_get_start_time
2023-02-24 02:12:36 +08:00
Mike Yuan
d71f5b1217
sd-login: add sd_session_get_username
2023-02-24 02:12:08 +08:00
Daan De Meyer
caeb2b616f
Merge pull request #26258 from DaanDeMeyer/boot-smbios
...
stub: Read extra kernel command line items from SMBIOS
2023-02-23 15:59:18 +01:00
Luca Boccassi
fb22861da1
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.
2023-02-23 13:26:52 +00:00
Yu Watanabe
500ecfd513
Merge pull request #26535 from yuwata/systemctl-list-cleanups
...
systemctl-list: several cleanups
2023-02-23 21:38:13 +09:00
Yu Watanabe
e47c426b5c
Merge pull request #26560 from yuwata/journal-send-fix-memleak-and-cleanups
...
sd-journal: several fixlets and cleanups for sd_journal_send()
2023-02-23 21:37:20 +09:00