Commit graph

28191 commits

Author SHA1 Message Date
Yu Watanabe 2ed5f6d5de network: introduce new [QDisc] section to support Parent=ingress
Follow-up for 18de0969c5.
2020-02-07 13:48:54 +09:00
Anita Zhang 72545ae057 core: sync SeccompParseFlags between dbus-execute and load-fragment
9e48626571 added some new syscalls to the
filter lists. However, on systems that do not yet support the new calls,
running systemd-run with the filter set results in error:

```
$ sudo systemd-run -t -r -p "SystemCallFilter=~@mount" /bin/true
Failed to start transient service unit: Invalid argument
```

Having the same properties in a unit file will start the service
without issue. This is because the load-fragment code will parse the
syscall filters in permissive mode:
https://github.com/systemd/systemd/blob/master/src/core/load-fragment.c#L2909
whereas the dbus-execute equivalent of the code does not.

Since the permissive mode appears to be the right setting to support
older kernels/libseccomp, this will update the dbus-execute parsing
to also be permissive.
2020-02-07 13:39:35 +09:00
Yu Watanabe e2c4070edf network: rename eui64 to static
See RFC 4291.

Follow-up for 5f506a5560.
2020-02-07 13:30:40 +09:00
Yu Watanabe 1e5e89d76d
Merge pull request #14813 from keszybz/renames-and-null-printf
Rename follow-up and gcc warning fix
2020-02-07 13:21:17 +09:00
Zbigniew Jędrzejewski-Szmek cff789b746 core/selinux-access: use _cleanup_ and improve logging
Instead of setting the bus error structure and then freeing it, let's only set
it if used. If we will ignore the selinux denial, say ", ignore" to make this
clear. Also, use _cleanup_ to avoid gotos.
2020-02-06 23:06:55 +01:00
Yu Watanabe 0ae5ffe063 repart: quit earlier if no .conf file exists
Fixes #14804.
2020-02-06 22:50:39 +01:00
Zbigniew Jędrzejewski-Szmek d7887449e7 basic/selinux-util: expose _cleanup_freecon_ 2020-02-06 22:27:21 +01:00
Zbigniew Jędrzejewski-Szmek 22cd7aabec core/selinux-access: do not use NULL for %s
../src/core/selinux-access.c: In function ‘mac_selinux_generic_access_check’:
../src/basic/log.h:223:27: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
../src/core/selinux-access.c:235:85: note: format string is defined here
  235 |                         log_warning_errno(errno, "SELinux getcon_raw failed (tclass=%s perm=%s): %m", tclass, permission);
      |                                                                                     ^~

I wonder why nobody ever noticed this.

Fixes #14691 (other issues listed in that ticket have already been fixed).
2020-02-06 22:27:12 +01:00
Zbigniew Jędrzejewski-Szmek 949fb07e6e network: also change fair_queue_traffic_policing→fair_queueing
Follow-up for ca58d00c68. I messed
up the "ing" suffix in the regex when doing the initial patch.
2020-02-06 22:13:27 +01:00
Yu Watanabe 2b6a90d17f selinux: update log message to suppress warning by coverity
Fixes CID#1417440 and CID#1417438.
2020-02-06 16:04:50 +01:00
Yu Watanabe 9207625d9b
Merge pull request #14800 from keszybz/ask-password-echo
ask-password: give a hint to cancel echo
2020-02-06 23:49:54 +09:00
Yu Watanabe db99904bc8 sysctl: fix segfault
Fixes #14801.
2020-02-06 23:49:32 +09:00
Zbigniew Jędrzejewski-Szmek 8aaf18e08a shared/ask-password-api: show "(press TAB for no echo)"
For #8495: it is arguably useful to not show the length of the password
in public spaces. It is possible to press TAB or BS to cancel the asterisks,
but this is not very discoverable. Let's make it discoverable by showing
a message (in gray). The message is "erased" after the first character
is entered.
2020-02-06 10:51:24 +01:00
Zbigniew Jędrzejewski-Szmek 72c08a471c shared/ask-password-api: return "error" when dialogue is cancelled
test-ask-password-api would crash if ^D was pressed.
If think the callers generally expect a non-empty strv as reply. Let's
return an error if we have nothing to return.

Also modernize test-ask-password-api a bit.
2020-02-06 10:51:13 +01:00
Zbigniew Jędrzejewski-Szmek 5650ec7a11
Merge pull request #14156 from fbuihuu/deal-with-aliases-when-disabling
Consider aliases in /usr when disabling units
2020-02-06 10:46:21 +01:00
Christian Göttsche 1acf344dfa core: do not prepare a SELinux context for dummy files for devicenode bind-mounting
Let systemd create the dummy file where a device node will be mounted on with the default label for the parent directory (e.g. /tmp/namespace-dev-yTMwAe/dev/).

Fixes: #13762
2020-02-06 10:20:14 +01:00
Zbigniew Jędrzejewski-Szmek 39e96f844a firstboot: add missing check
If we check length of 'a', we must do the same for 'b'.
2020-02-06 09:52:39 +01:00
Mike Gilbert 6b2fd86fd1 network: remove unnecessary link->ifname from debug log statements
Since 98b0299479, we log the interface
name automatically via log_link_debug().

Fixes: https://github.com/systemd/systemd/issues/14782
2020-02-06 00:15:50 +00:00
Michal Sekletár 28ca867abd sd-journal: close journal files that were deleted by journald before we've setup inotify watch
Fixes #14695
2020-02-05 18:34:52 +01:00
Chris Down e0e2112f61 cgroup: systemctl: Don't display NULL if protection was set to max
Inside format_bytes, we return NULL if the value is UINT64_MAX. This
makes some kind of sense where this has some other semantic meaning than
being a value, but in this case the value is both a.) not the default
(so we definitely want to display it), and b.) means "infinity" (or
"max" in cgroup terminology).

This patch adds a small wrapper around format_bytes that can be used for
these cases, to avoid the following situation:

    [root@tangsanjiao ~]# cat /sys/fs/cgroup/workload.slice/memory.low
    max
    [root@tangsanjiao ~]# systemctl show workload.slice -p MemoryLow
    MemoryLow=infinity
    [root@tangsanjiao ~]# systemctl status workload.slice | grep low:
	Memory: 14.9G (low: (null))

After the patch:

    [root@tangsanjiao ~]# systemctl status workload.slice | grep low:
	Memory: 15.1G (low: infinity)
2020-02-05 18:32:33 +01:00
Zbigniew Jędrzejewski-Szmek 5bbcff2a1d
Merge pull request #14415 from ssahani/prefixstable-rfc-7217-new
network: Allow to specify multiple IPv6Token for SLAAC
2020-02-05 17:05:33 +01:00
Yu Watanabe 1294661381 polkit: remove unused variable
Follow-up for 6374862615.
2020-02-05 12:47:32 +00:00
Zbigniew Jędrzejewski-Szmek ea0d0ede03 Merge branch 'polkit-ref-count' 2020-02-05 10:16:59 +01:00
Zbigniew Jędrzejewski-Szmek 239bf9409d
Merge pull request #14536 from DaanDeMeyer/wait-online-max-operstate
wait-online: add maximum operational state option
2020-02-05 10:16:29 +01:00
Susant Sahani 5f506a5560 network: Allow to specify multiple IPv6Token for SLAAC
Provide names to choose between different auto-generation types:
2.1 "eui64" for EUI-64 of RFC 4291
2.2 "prefixstable" for RFC 7217

```
[Match]
Name=veth99

[Network]
DHCP=no
IPv6AcceptRA=yes
IPv6Token=prefixstable:2001:888:0db8:1::
```
2020-02-05 17:44:42 +09:00
Yu Watanabe fae403f1dc
Merge pull request #14778 from cgzones/split_selinux_logging
Improve SELinux logging in permissive mode
2020-02-05 15:20:50 +09:00
Zbigniew Jędrzejewski-Szmek 427928caa4
network: change "Gateway=dhcp" to "Gateway=_dhcp" (#14774)
This way we avoid confusion with a DNS name. Fixes #14773.
2020-02-05 13:41:30 +09:00
Yu Watanabe f2f1b52c6f
Merge pull request #14767 from yuwata/network-split-qdisc-section
network: split TrafficControlQueueingDiscipline section into small pieces
2020-02-05 13:35:25 +09:00
Christian Göttsche c0f765cac8 core: move bus-util include out of selinux-access header 2020-02-04 19:26:38 +01:00
Zbigniew Jędrzejewski-Szmek bc130b6858 Fix typo in function name 2020-02-04 18:54:12 +01:00
Lennart Poettering 6374862615 polkit: when authorizing via PK let's re-resolve callback/userdata instead of caching it
Previously, when doing an async PK query we'd store the original
callback/userdata pair and call it again after the PK request is
complete. This is problematic, since PK queries might be slow and in the
meantime the userdata might be released and re-acquired. Let's avoid
this by always traversing through the message handlers so that we always
re-resolve the callback and userdata pair and thus can be sure it's
up-to-date and properly valid.
2020-02-04 18:47:32 +01:00
Lennart Poettering 1068447e69 sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueue_for_read() we have a
way to put an incoming message back into the read queue for this
purpose.

This might have other uses too, for example debugging.
2020-02-04 18:47:31 +01:00
Lennart Poettering f4425c72c7 polkit: use structured initialization 2020-02-04 18:45:22 +01:00
Lennart Poettering 7f56982289 polkit: on async pk requests, re-validate action/details
When we do an async pk request, let's store which action/details we used
for the original request, and when we are called for the second time,
let's compare. If the action/details changed, let's not allow the access
to go through.
2020-02-04 18:45:22 +01:00
Lennart Poettering 95f82ae9d7 polkit: reuse some common bus message appending code 2020-02-04 18:45:22 +01:00
Lennart Poettering 773b1a7916 bus-polkit: rename return error parameter to ret_error 2020-02-04 18:45:22 +01:00
Christian Göttsche f156e60c66 core: unit_label_path(): take const unit 2020-02-04 18:36:19 +01:00
Christian Göttsche 1648233dce selinux-access: log warning on context acquisition failure
Relevant when testing in permissive mode, where the function does not return a failure to the client.
This helps to configure a system in permissive mode, without getting surprising failures when switching to enforced mode.
2020-02-04 18:11:42 +01:00
Christian Göttsche 074b597dd9 selinux-util: increase log severity
`log_enforcing()` and `log_enforcing_errno()` are only used for important messages, which describe failures in enforced mode.
They are guarded either by `!mac_selinux_use()` or `!label_hnd` checks, where the latter is itself guarded by the former.
Only SELinux enabled systems print these logs.
This helps to configure a system in permissive mode, without getting surprising failures when switching to enforced mode.
2020-02-04 18:11:42 +01:00
Zbigniew Jędrzejewski-Szmek 2979f04b99
Merge pull request #14717 from yuwata/network-radv-dns-link-local
network: make DNS= in [IPv6PrefixDelegation] section take special value '_link_local'
2020-02-04 17:47:17 +01:00
Zbigniew Jędrzejewski-Szmek ca58d00c68 network: FairQueueTrafficPolicing→FairQueueing
This never made into a release, so we can change the name with impunity.
Suggested by Davide Pesavento.

I opted to add the "ing" ending. "Fair queuing" is the name of the general
concept and algorithm, and "Fair queue" is mostly used for the implementation
name.
2020-02-04 17:37:16 +01:00
Zbigniew Jędrzejewski-Szmek 60ed2dcfc7 network: TokenBufferFilter→TokenBucketFilter
This never made into a release, so we can change the name with impunity.
Noticed by Davide Pesavento.
2020-02-04 17:28:15 +01:00
Zbigniew Jędrzejewski-Szmek dc9fd22d3d Merge pull request #14398 from poettering/mount-prep 2020-02-04 16:28:51 +01:00
Zbigniew Jędrzejewski-Szmek ce4121c6ff meson: update efi path detection to gnu-efi-3.0.11
Fixes systemd build in Fedora rawhide.

The old ldsdir option is not useful, because both the directory and the
file name changed. Let's remove the option and try to autodetect the file
name. If this turns out to be not enough, a new option to simply specify
the full path to the file can be added.

F31:
         efi arch:                          x86_64
         EFI machine type:                  x64
         EFI CC                             ccache cc
         EFI lds:                           /usr/lib64/gnuefi/elf_x64_efi.lds
         EFI crt0:                          /usr/lib64/gnuefi/crt0-efi-x64.o
         EFI include directory:             /usr/include/efi
F32:
         efi arch:                          x86_64
         EFI machine type:                  x64
         EFI CC                             ccache cc
         EFI lds:                           /usr/lib/gnuefi/x64/efi.lds
         EFI crt0:                          /usr/lib/gnuefi/x64/crt0.o
         EFI include directory:             /usr/include/efi
2020-02-04 23:43:21 +09:00
Yu Watanabe 18de0969c5 network: split TrafficControlQueueingDiscipline section into small pieces
Closes #14763.
2020-02-04 21:45:39 +09:00
Yu Watanabe 91e50467f5
Merge pull request #14761 from keszybz/link-network-no-match
Refuse .network and .link files with no matches
2020-02-04 20:26:37 +09:00
Zbigniew Jędrzejewski-Szmek dade734917 network,udev: refuse .link and .network settings with no matches
Two releases ago we started warning about this, and I think it is now to turn
this into a hard error. People get bitten by this every once in a while, and
there doesn't see to be any legitimate use case where the same .link or
.network files should be applied to _all_ interfaces, since in particular that
configuration would apply both to lo and any other interfaces. And if for
whatever reason that is actually desired, OriginalName=* or Name=* can be
easily added to silence the warning and achieve the effect.

(The case described in #12098 is particularly nasty: 'echo -n >foo.network'
creates a mask file, 'echo >foo.network' creates a "match all" file.)

Fixes #717, #12098 for realz now.
2020-02-04 08:45:52 +01:00
Zbigniew Jędrzejewski-Szmek e519e20ae1 test-network: do not fail if lo has a .network file
Fixes #9895.
2020-02-04 08:30:40 +01:00
nabijaczleweli 90198bcbea Fix generator name in hibernate-resume-generator's drop-in
Introduced in ff757c9d29
2020-02-04 14:49:04 +09:00
Yu Watanabe fd3ef936ed network,radv: make DNS= in [IPv6PrefixDelegation] section take special value 'linklocal'
Closes #13639.
2020-02-04 13:56:30 +09:00
Zbigniew Jędrzejewski-Szmek 2f1fc899ce
Merge pull request #14589 from keszybz/sysctl-downgrade-messages
sysctl: add glob patterns to set network settings more flexibly
2020-02-04 00:04:28 +01:00
Zbigniew Jędrzejewski-Szmek e0f424790d sysctl: add glob syntax to sysctl.d files
This is intended for net.*.conf.*.foo files. Setting just "default" is not very
useful because any interfaces present before systemd-sysctl is invoked are not
affected. Setting "all" is too harsh, because the kernel takes the stronger of
the device-specific setting and the "all" value, so effectively having a weaker
setting for specific interfaces is not possible. Let's add a way in which can
set "default" first and then all the others without "all".
2020-02-04 00:01:50 +01:00
Yu Watanabe 50152bb1c5 core: call dynamic_user_acquire() only when 'group' is non-null
When unit is reloaded, and the reloaded unit has bad-setting, then
unit_patch_contexts() is not called and exec_context::user and group
may not be configured.

A minimum reproducer for the case is:
- step 1.
$ sudo systemctl edit --full hoge.service
[Service]
oneshot
ExecStart=sleep 1h

- step 2.
$ sudo systemctl start hoge.service

- step 3.
$ sudo systemctl edit --full hoge.service
[Service]
Type=oneshot
ExecStart=@bindir@/sleep 1h
DynamicUser=yes

Then pid1 crashed.

Fixes #14733.
2020-02-03 21:51:07 +09:00
Yu Watanabe 4c1dea42b5 journal: drop unreachable path 2020-02-03 10:00:50 +01:00
Yu Watanabe bf2334c054 udev: add {Receive,Transmit}ChecksumOffload= settings
Closes #14661.
2020-02-03 12:31:31 +09:00
Naïm Favier 53e1ba280f
network: add SuppressPrefixLength option to RoutingPolicyRule (#14736)
Closes #14724.
2020-02-03 08:25:48 +09:00
Lennart Poettering d58f31793a
Merge pull request #14645 from keszybz/sd-bus-message-dump
sd_bus_message_dump
2020-02-02 17:27:50 +01:00
Lennart Poettering ddb10d8ccd
Merge pull request #14699 from yuwata/dhcp6-fix-t1-t2
dhcp6: do not use T1 and T2 longer than one provided by the lease
2020-02-02 17:16:31 +01:00
Yu Watanabe 60d0a5098b util: uid_t, gid_t, and pid_t must be 32bit
We already have assert_cc(sizeof(uid_t) == sizeof(uint32_t)) or friends
at various places.
2020-02-02 17:13:08 +01:00
Lennart Poettering a754993d9c
Merge pull request #14719 from yuwata/sd-boot-fix-warnings
sd-boot: fix warnings
2020-02-02 16:57:17 +01:00
David Michael 649916d356 sysusers: support creating users with a specific primary group
This extends the "uid:gid" syntax for "u" lines so that a group
name can be given instead of a GID.  This requires that the group
is either queued for creation by sysusers, or it is already defined
on the system.

Closes #14340
2020-02-02 16:53:22 +01:00
Yu Watanabe ea471a4695 network: support UID based routing policy
Closes #14666.
2020-02-02 22:43:38 +09:00
Yu Watanabe 03de302a31 util: add parse_uid_range() helper function 2020-02-02 22:43:38 +09:00
Lennart Poettering 5ee69e144e
Merge pull request #14178 from poettering/journal-namespace
journal: add concept of "journal namespaces"
2020-02-01 11:25:48 +01:00
Yu Watanabe 020313b213 test: also check the result of merge_gid_lists()
Fixes CID#1412354.
2020-01-31 23:31:23 +09:00
Yu Watanabe 4af8ab2cab user-util: fix use after free() on error path
Fixes CID#1412356.
2020-01-31 23:23:44 +09:00
Yu Watanabe b44b735a78 userdbd: fix memleak
Fixes CID#1412416.
2020-01-31 23:20:52 +09:00
Lennart Poettering 23d8c56046 journalctl: underline sections in --help 2020-01-31 15:10:40 +01:00
Yu Watanabe 9610210d32 nspawn: voidify umount_verbose()
Fixes CID#1415122.
2020-01-31 23:10:29 +09:00
Yu Watanabe 02cec15629 user-record-util: add missing error check
Fixes CID#1415123.
2020-01-31 23:08:59 +09:00
Yu Watanabe 00c7b071ac homework: fix errno in log_error_errno()
Fixes CID#1415124.
2020-01-31 23:07:15 +09:00
Yu Watanabe 852640f8a2 home: add missing variable initialization
Fixes CID#1415126.
2020-01-31 23:04:43 +09:00
Lennart Poettering dc5437c78b journald: add ability to activate by varlink socket
If we have exit on idle, then operations such as "journalctl
--namespace=foo --rotate" should work even if the journal daemon is
currently not running.

(Note that we don't do activation by varlink for the main instance of
journald, I am not sure the deadlocks it might introduce are worth it)
2020-01-31 15:03:55 +01:00
Lennart Poettering 65c398c031 journald: add exit on idle 2020-01-31 15:03:44 +01:00
Lennart Poettering 6d4d600260 varlink: add ability to register callback for disconnections 2020-01-31 15:03:27 +01:00
Lennart Poettering c4f601f205 varlink: add API for determining number of current connections 2020-01-31 15:03:11 +01:00
Lennart Poettering d98580e438 journald: use structured initialization 2020-01-31 15:03:07 +01:00
Lennart Poettering 2435269171 journald: add logging for one error we lacked logging for 2020-01-31 15:03:04 +01:00
Lennart Poettering d93dda3afe systemctl: show logs for correct namespace of service 2020-01-31 15:02:52 +01:00
Lennart Poettering 21fa231ece journalctl: drop misplaced empty line 2020-01-31 15:02:48 +01:00
Lennart Poettering 6b25db87a1 journalctl: add new --namespace= switch for showing logs for namespace 2020-01-31 15:02:45 +01:00
Lennart Poettering 31e99dd2cc journal: make constant argument actually 'const' 2020-01-31 15:02:41 +01:00
Lennart Poettering 456aa87906 journal: allow opening journal files specific to some namespace 2020-01-31 15:02:29 +01:00
Lennart Poettering 2f5435a147 journal: use structured initialization 2020-01-31 15:02:25 +01:00
Lennart Poettering 33ff74643e journalctl: use an anonymous array when an array is needed
I am pretty sure this makes things more readable, since the expected
argument here is actually an array.
2020-01-31 15:02:22 +01:00
Lennart Poettering 68312977db journal: properly mark two definitions that are deprecated with GCC attributes for that 2020-01-31 15:02:00 +01:00
Lennart Poettering e7238caf0c journalctl: use automatic memory cleanup 2020-01-31 15:01:57 +01:00
Lennart Poettering 0491150b5c journalctl: use log_error_errno() wherever we can 2020-01-31 15:01:53 +01:00
Lennart Poettering a6214d9643 journalctl: move pcre function code down
We usually put the static arguments at the top of each source files, do
so here too, and thus move the first code down.
2020-01-31 15:01:50 +01:00
Lennart Poettering 91dd5f7cbe core: add new LogNamespace= execution setting 2020-01-31 15:01:43 +01:00
Lennart Poettering 839d1b2014 string-util: add brief explanatory comment 2020-01-31 15:01:39 +01:00
Lennart Poettering b1852c48c1 journald: allow running multiple instances of journald
If we do, we operate on a separate set of logs and runtime objects

The namespace is configured via argv[1].

Fixes: #12123

Fixes: #10230 #9519

(These latter two issues ask for slightly different stuff, but the
usecases generally can be solved by running separate instances of
journald now, hence also declaring that as "Fixes:")
2020-01-31 15:01:18 +01:00
Lennart Poettering d6f46470f5 journald: when create journal directories use calculated paths 2020-01-31 15:01:14 +01:00
Lennart Poettering 4f60310373 journald: minor coding style updates 2020-01-31 15:01:09 +01:00
Lennart Poettering 4e00337b16 journald: let's simplify rotating of offline user journals
Let's just use the path that is already stored in JournalStorage,
instead of generating our own. While we are at it, split out the loop
into its own function.
2020-01-31 15:01:05 +01:00
Lennart Poettering 46e2348a58 journald: simplify find_journal() a bit
Let's use the already precalculated persistent storage path instead of
deriving it again from the machine ID.
2020-01-31 15:01:01 +01:00
Lennart Poettering b42b9479a8 journald: hide current storage determination in helper call 2020-01-31 15:00:57 +01:00
Lennart Poettering 74dd8f5759 journald: use structured initialization 2020-01-31 15:00:53 +01:00
Lennart Poettering 8548f4f09b journald: line break overly long function header 2020-01-31 15:00:49 +01:00
Lennart Poettering 7e7ef3bfb2 journald: let's use TAKE_PTR() and TAKE_FD() where appropriate 2020-01-31 15:00:45 +01:00
Lennart Poettering a30e35f85a journald: let's use unlink_and_free() where we can 2020-01-31 15:00:41 +01:00
Lennart Poettering 2066f4fe30 journald: specifying _pure_ on static functions is unnecessary, compiler can figure that out on its own 2020-01-31 15:00:37 +01:00
Lennart Poettering a2735a4549 journald: don't bother with seqnum file if we don't read form /dev/kmsg anyway 2020-01-31 15:00:33 +01:00
Lennart Poettering dbac262578 journald: fix indentation 2020-01-31 15:00:29 +01:00
Lennart Poettering 99d0d05a10 journald: use free_and_replace() where appropriate 2020-01-31 15:00:25 +01:00
Lennart Poettering 659a77bec6 journald: add missing logging for some errors 2020-01-31 15:00:21 +01:00
Lennart Poettering d83f7e4c92 journald: why bitwise XOR when boolean != is easier to read? 2020-01-31 14:59:41 +01:00
Yu Watanabe efda8aebcb sd-boot: fix -Wpointer-sign warning 2020-01-31 19:59:34 +09:00
Yu Watanabe a614aa1985 sd-boot: fix warning about comparison is always true 2020-01-31 19:20:34 +09:00
Yu Watanabe 3ae01632f2 dhcp6: coding style fixes 2020-01-31 14:44:40 +09:00
Yu Watanabe 9de8a4259e dhcp6: do not use T1 and T2 longer than one provided by the lease
Fixes #12623.
2020-01-31 14:44:32 +09:00
Anita Zhang 1b9d61bcee
Merge pull request #14696 from poettering/dissect-tweaks
various tweaks to the image dissection logic
2020-01-30 12:46:03 -08:00
Zbigniew Jędrzejewski-Szmek 2a4be3c52b Various typo fixes and grammar corrections 2020-01-30 13:48:01 +01:00
Zbigniew Jędrzejewski-Szmek 402058dc3a polkit: tweak grammar 2020-01-30 12:34:05 +01:00
Zbigniew Jędrzejewski-Szmek 4119d1e60a
Merge pull request #14096 from poettering/homed
systemd-homed
2020-01-30 12:32:06 +01:00
Zbigniew Jędrzejewski-Szmek f3b136a484 shared/sysctl-util: normalize repeated slashes or dots to a single value
We use those strings as hash keys. While writing "a...b" looks strange,
"a///b" does not look so strange. Both syntaxes would actually result in the
value being correctly written to the file, but they would confuse our
de-deplication over keys. So let's normalize. Output also becomes nicer.

Add test.
2020-01-30 10:48:27 +01:00
Lennart Poettering 8d251485fa core: fsck images specified as RootImage= too before using them 2020-01-29 19:29:59 +01:00
Lennart Poettering 4fcb96ce25 nspawn: fsck all images when mounting things
Also, start logging about mount errors, things are hard to debug
otherwise.
2020-01-29 19:29:55 +01:00
Lennart Poettering e475f72977 dissect: add --fsck= option to systemd-dissect tool
Let's expose this fsck behaviour directly.
2020-01-29 19:29:52 +01:00
Lennart Poettering cf32c48657 dissect: optionally, run fsck before mounting dissected images
Some file systems want us to run fsck before mounting, hence do so,
optionally.
2020-01-29 19:29:44 +01:00
Lennart Poettering 0f7c9a3d81 dissect: complain if partition flags are set that we don't know 2020-01-29 19:29:39 +01:00
Yu Watanabe a44956c94a network: fix implicit type conversion warning by GCC-10
Fixes part of #14691.
2020-01-29 19:24:12 +01:00
Topi Miettinen e21d90606a pam_systemd: resolve the tty of display via /sys instead of /dev
Rely on information provided by /proc/*/stat and /sys/dev/char for resolving
the controlling tty for the display server, instead of trying to access the
tty device in /dev (which may not be accessible for example due to
PrivateDevices=yes).
2020-01-29 16:06:48 +01:00
Lennart Poettering 72d43d09cc id128: change table header from "uuid" to just "id"
The tool deals with any kind of 128bit id, not just uuid, and by default
we display just a series of hex chars, hence let's not claim everything
was a "uuid", but just generically say "id"
2020-01-29 15:32:26 +01:00
Lennart Poettering bcb1eadc0c test: fix rename_noreplace() test
This corrects the fix b81b9d406d, making the test operate like it was
originally.
2020-01-28 22:53:59 +01:00
Lennart Poettering 3c7b4ebf94 test: make sure chase_symlink() returns normalized paths 2020-01-28 22:53:59 +01:00
Lennart Poettering 47d7ab727c fs-util: make sure we output normalized paths in chase_symlinks()
Let's eat up multiple slashes.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1787089
Replaces: #14687
2020-01-28 22:53:59 +01:00
Lennart Poettering 6efb1257d1 test: add test for the non-resolving of chase_symlink() root prefix 2020-01-28 22:53:59 +01:00
Lennart Poettering c2595d3b02 fs-util: when calling chase_symlinks() with root path, leave root part unresolved
Previously there was a weird asymmetry: initially we'd resolve the
specified prefix path when chasing symlinks together with the actual
path we were supposed to cover, except when we hit an absolute symlink
where we'd use the root as it was. Let's unify handling here: the prefix
path is never resolved, and always left as it is.

This in particular fixes issues with symlinks in the prefix path, as
that confused the check that made sure we never left the root directory.

Fixes: #14634
Replaces: #14635
2020-01-28 22:53:59 +01:00
Lennart Poettering ba0fb5acd4 sleep: automatically lock all home directories when suspending 2020-01-28 22:36:56 +01:00
Lennart Poettering 26cf9fb7f8 home: add pam_systemd_home.so PAM hookup
In a way fixes: https://bugs.freedesktop.org/show_bug.cgi?id=67474
2020-01-28 22:36:41 +01:00
Lennart Poettering 4aa0a8ac3e home: add homectl client tool 2020-01-28 22:36:30 +01:00
Lennart Poettering 70a5db5822 home: add new systemd-homed service that can manage LUKS homes
Fixes more or less: https://bugs.freedesktop.org/show_bug.cgi?id=67474
2020-01-28 22:36:07 +01:00
Franck Bui 1ffadeaae3 udev: assume that the recv buffer size of the netlink socket is already configured when the socket is passed in
This makes ReceiveBuffer= option in systemd-udevd-kernel.socket unit useful.
2020-01-28 22:35:08 +01:00
Lennart Poettering b940fb1f4f
Merge pull request #14594 from keszybz/id128-show-gpt
Print gpt table values in systemd-id128
2020-01-28 17:23:50 +01:00
Zbigniew Jędrzejewski-Szmek ebe2ab60cc
Merge pull request #14611 from yuwata/network-fix-reconfigure
network: fix reconfigure
2020-01-28 16:10:28 +01:00
Zbigniew Jędrzejewski-Szmek d2b45da40a
Merge pull request #14633 from poettering/logind-switch-polkit
add polkit hookup for VT switching in logind
2020-01-28 16:09:09 +01:00
Lennart Poettering 8615bec7a0
Merge pull request #14667 from yuwata/boot-random-seed-mode
boot: parse random-seed-mode
2020-01-28 15:42:10 +01:00
Lennart Poettering 4523f1db0f
Merge pull request #14675 from yuwata/network-dhcp-accept-nul
network: accept NUL character in SendOption=
2020-01-28 15:18:16 +01:00
Lennart Poettering 766840af42
Merge pull request #14673 from keur/protect_clock
Protect clock
2020-01-28 15:11:41 +01:00
sangelovic 58abbbcc6b sd-bus: fix introspection bug in signal parameter names 2020-01-28 11:20:33 +01:00
Yu Watanabe 732e3a6104 network: accept NUL character in SendOption=
Closes #14609.
2020-01-27 19:58:10 +09:00
Yu Watanabe a6a36dea2d test: add tests for UNESCAPE_ACCEPT_NUL 2020-01-27 19:58:06 +09:00
Yu Watanabe 0e72e469f8 escape: introduce UNESCAPE_ACCEPT_NUL flag 2020-01-27 18:04:46 +09:00
Yu Watanabe 46dc83440f escape: make cunescape() and cunescape_length() inline 2020-01-27 17:38:41 +09:00
Susant Sahani 8bdda551da efi: fix build.
```
ninja -C build
ninja: Entering directory `build'
[29/101] Generating systemd_boot.so with a custom command.
FAILED: src/boot/efi/systemd_boot.so
/usr/bin/ld -o src/boot/efi/systemd_boot.so -T /usr/lib64/gnuefi/elf_x64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /usr/lib64 /usr/lib64/gnuefi/crt0-efi-x64.o src/boot/efi/disk.c.o src/boot/efi/graphics.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/util.c.o src/boot/efi/boot.c.o src/boot/efi/console.c.o src/boot/efi/crc32.c.o src/boot/efi/random-seed.c.o src/boot/efi/sha256.c.o src/boot/efi/shim.c.o -lefi -lgnuefi /usr/lib/gcc/x86_64-redhat-linux/10/libgcc.a
/usr/bin/ld: src/boot/efi/graphics.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/pe.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/util.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/boot.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/console.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/random-seed.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/shim.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/home/sus/tt/systemd/build/../src/boot/efi/util.h:58: first defined here
[31/101] Generating stub.c.o with a custom command.
ninja: build stopped: subcommand failed.
make: *** [Makefile:2: all] Error 1

```
2020-01-27 16:13:28 +09:00
Kevin Kuehler 9f37272a19 analyze: Add ProtectClock= to analyze-security 2020-01-26 12:44:47 -08:00
Kevin Kuehler fc64760dda core: shared: Add ProtectClock= to systemd.exec 2020-01-26 12:23:33 -08:00
Yu Watanabe fe5a698f76 bootspec: parse random-seed-mode line in loader.conf
Fixes #14657.
2020-01-26 13:20:34 +09:00
Yu Watanabe a14c18ba7b sd-boot: fix typo
Fixes #14657.
2020-01-26 13:20:21 +09:00