1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00
Commit Graph

7380 Commits

Author SHA1 Message Date
Yu Watanabe
11fa81bf77 meson: add missing man rules for new sd-login functions
Follow-up for d71f5b1217,
c4ef14dc2a, and
d622fefc00.
2023-03-03 14:38:13 +09:00
Lennart Poettering
a4b13ae1be doc: add document explaining memory pressure handling 2023-03-01 09:43:24 +01:00
Lennart Poettering
6bb0084204 pid1: add unit file settings to control memory pressure logic 2023-03-01 09:43:23 +01:00
Lennart Poettering
bf1b9ae487 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
2023-02-28 21:42:29 +01:00
Lennart Poettering
fada2c75a4 homectl: make the new caps field configurable via homectl 2023-02-28 21:42:29 +01:00
Antonio Alvarez Feijoo
835b781fc1 man: fix typo in systemd.generator 2023-02-28 15:37:29 +00: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
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
aff131775b man: add two missing commands to synopsys 2023-02-24 17:11:57 +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
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
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
c73676dcbb man,catalog: fix typo
Follow-up for #26448.
2023-02-24 08:52:42 +09: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
Daan De Meyer
717af0de46 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.
2023-02-23 09:51:18 +01:00
Yu Watanabe
c2da3bf237 core/namespace: mount new sysfs when new network namespace is requested
Even when a mount namespace is created, previously host's sysfs is used,
especially with RootDirectory= or RootImage=, thus service processes can
still access the properties of the network interfaces in the main network
namespace through sysfs.

This makes, sysfs is remounted with the new network namespace tag, except
when PrivateMounts= is explicitly disabled. Hence, the properties of the
network interfaces in the main network namespace cannot be accessed by
service processes through sysfs.

Fixes #26422.
2023-02-23 15:09:13 +09:00
Lennart Poettering
921330af40
Merge pull request #26448 from poettering/sd-event-mempress
sd-event: add memory pressure event source
2023-02-22 16:23:59 +01:00
Mike Yuan
e774d3c9f1 systemctl: warn if units disabled in user scope are still enabled globally
Fixes #18271
2023-02-22 23:05:41 +09:00
Lennart Poettering
f8a32e679e man: document the new sd_event_add_memory_pressure() API 2023-02-22 13:16:34 +01:00
Daan De Meyer
b63bd125d4 copy: Support both inode exclusion and contents exclusion
In some cases, we want to exclude a directory's contents but not
the directory itself. In other cases, we want to exclude a directory
and its contents. Let's extend the denylist logic in copy.h to support
both by changing the denylist from a set to hashmap so we can store the
deny type as the value.

We also modify the repart ExcludeFiles= option to make use of this. If
a directory to exclude ends with a "/", we'll only exclude its contents.
Otherwise, we'll exclude the full directory.
2023-02-22 12:44:36 +01:00
Yu Watanabe
60c5bd7759 tree-wide: fix typo 2023-02-22 14:46:19 +09:00
Yu Watanabe
086234e39b
Merge pull request #26491 from dtardon/list-paths
Add systemctl list-paths
2023-02-22 09:29:54 +09:00
Дамјан Георгиевски
37fe75a2e6 socket-proxyd: support Type=notify
update examples in the man page too
2023-02-21 22:59:04 +00:00
David Tardon
160b8e981b man: document systemctl list-paths 2023-02-21 19:03:26 +01:00
Lennart Poettering
c56be2c294 bootctl: add new --print-root-device option
We already have this nice code in system that determines the block
device backing the root file system, but it's only used internally in
systemd-gpt-generator. Let's make this more accessible and expose it
directly in bootctl.

It doesn't fit immediately into the topic of bootctl, but I think it's
close enough and behaves very similar to the existing "bootctl
--print-boot-path" and "--print-esp-path" tools.

If --print-root-device (or -R) is specified once, will show the block device
backing the root fs, and if specified twice (probably easier: -RR) it
will show the whole block device that block device belongs to in case it
is a partition block device.

Suggested use:

        # cfdisk `bootctl -RR`

To get access to the partition table, behind the OS install, for
whatever it might be.
2023-02-21 18:19:38 +01:00
Steve Ramage
f72dcb92c4 man: add DefaultStartupMemoryLow= as term in term list 2023-02-21 07:05:30 +09:00
Yu Watanabe
e814f8b246
Merge pull request #26506 from keszybz/tiny-cleanups
Various trivial cleanups and follow-ups
2023-02-21 06:41:01 +09:00
Daan De Meyer
0cd90cf4f3
Merge pull request #26437 from DaanDeMeyer/repart-exclude
repart: Add ExcludeFiles= option
2023-02-20 15:49:29 +01:00
Zbigniew Jędrzejewski-Szmek
164297cd9a man/tmpfiles.d: adjust the table in synopsis, improve spelling
r and R take globs, so let's name the argument appropriately in the tl;dr listing.

Also, use 'clean-up' in the file name where it represents the verb "clean up",
and other minor spelling adjustments.
2023-02-20 15:27:42 +01:00
Luca Boccassi
96f321b6b4 man: document DefaultStartupMemoryLow=
Fixes https://github.com/systemd/systemd/issues/26493
2023-02-20 13:35:15 +00:00
Daan De Meyer
a9af827613 repart: Add ExcludeFiles= option 2023-02-20 13:51:46 +01:00
Mike Yuan
db4691961c journalctl: fix output when --lines is used with --grep
Previously, we skip the entries before arg_lines
unconditionally, which doesn't behave correctly
when used with --grep. After this commit, when
a pattern is specified, we don't skip the entries
early, but rely on the count of the lines shown
to tell us when to stop. To achieve that we would
have to search backwards instead.

Fixes #25147
2023-02-19 07:06:49 +09:00
Lennart Poettering
c4ef4df417 man: document new --exec switch for systemd-notify 2023-02-17 09:55:35 +01:00
Lennart Poettering
f4ff3e7149 man: document new --kill-value= switch to systemctl 2023-02-17 09:55:35 +01:00
Lennart Poettering
a721cd0016 pid1: add a new D-Bus method for enquing POSIX signals with values to unit processes
This augments the existing KillUnit() + Kill() methods with
QueueSignalUnit() + QueueSignal(), which are what sigqueue() is to
kill().

This is useful for sending our new SIGRTMIN+18 control signals to system
services.
2023-02-17 09:55:35 +01:00
Paul Barker
7f9a6295c3 man: Fix spelling mistake 2023-02-16 15:43:47 +01:00
Luca Boccassi
53fda560dc core: add support for Startup memory limits
We support separate Startup configurations for CPU and I/O, so
add it for memory too. Only cover cgroupsv2 settings.
2023-02-15 20:01:16 +00:00
Luca Boccassi
6f97aae029
Merge pull request #26213 from poettering/journal-rework-seqnum
journal sequence number rework
2023-02-15 19:58:58 +00:00
Yu Watanabe
fff1edc9f9
Merge pull request #26424 from ldv-alt/fix-typos
Fix a few typos in NEWS, docs and comments
2023-02-16 00:10:18 +09:00
Raul Tambre
6b4dc4d2f8 man/tc: Fix hexadecimals being with an O 2023-02-15 16:03:28 +01:00
Dmitry V. Levin
30fd9a2dab treewide: fix a few typos in NEWS, docs and comments 2023-02-15 10:41:03 +00:00
ml
6ebfecd073 man: fix typos 2023-02-12 00:54:07 +01:00
ml
f39d7d00a3 man: fix directory for user home bind mounts 2023-02-12 00:48:25 +01:00
Zbigniew Jędrzejewski-Szmek
f37f0f35cd man: fix links to man pages
Done using linkchecker as usual.
2023-02-09 14:30:43 +01:00