1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 18:55:40 +03:00
Commit Graph

24993 Commits

Author SHA1 Message Date
Yu Watanabe
8efb042e0c sd-id128: split the logic obtaining invocation ID from sd_id128_get_invocation() 2019-03-15 18:53:23 +09:00
Yu Watanabe
9363e2f499 id128: no command accepts additional arguments 2019-03-15 18:53:23 +09:00
Lennart Poettering
beb6196982
Merge pull request #11785 from dvdhrm/implicit-sasl
sd-bus: allow cross-uid-namespace connections
2019-03-14 15:42:03 +01:00
David Rheinsberg
1ed4723d38 sd-bus: skip sending formatted UIDs via SASL
The dbus external authentication takes as optional argument the UID the
sender wants to authenticate as. This uid is purely optional. The
AF_UNIX socket already conveys the same information through the
auxiliary socket data, so we really don't have to provide that
information.

Unfortunately, there is no way to send empty arguments, since they are
interpreted as "missing argument", which has a different meaning. The
SASL negotiation thus changes from:

    AUTH EXTERNAL <uid>
    NEGOTIATE_UNIX_FD                   (optional)
    BEGIN

to:

    AUTH EXTERNAL
    DATA
    NEGOTIATE_UNIX_FD                   (optional)
    BEGIN

And thus the replies we expect as a client change from:

    OK <server-id>
    AGREE_UNIX_FD                       (optional)

to:

    DATA
    OK <server-id>
    AGREE_UNIX_FD                       (optional)

Since the old sd-bus server implementation used the wrong reply for
"AUTH" requests that do not carry the arguments inlined, we decided to
make sd-bus clients accept this as well. Hence, sd-bus now allows
"OK <server-id>\r\n" replies instead of "DATA\r\n" replies.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
2019-03-14 13:34:13 +01:00
David Rheinsberg
2010873b4b sd-bus: fix SASL reply to empty AUTH
The correct way to reply to "AUTH <protocol>" without any payload is to
send "DATA" rather than "OK". The "DATA" reply triggers the client to
respond with the requested payload.

In fact, adding the data as hex-encoded argument like
"AUTH <protocol> <hex-data>" is an optimization that skips the "DATA"
roundtrip. The standard way to perform an authentication is to send the
"DATA" line.

This commit fixes sd-bus to properly send the "DATA" line. Surprisingly
no existing implementation depends on this, as they all pass the data
directly as argument to "AUTH". This will not work if we want to pass
an empty argument, though.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
2019-03-14 13:33:28 +01:00
David Rheinsberg
3cacdab925 sd-bus: avoid magic number in SASL length calculation
Lets avoid magic numbers and use a constant `strlen()` instead.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
2019-03-14 13:31:14 +01:00
Lennart Poettering
c3b6a348c0 main: use _exit() rather than exit() in code potentially caled from signal handler 2019-03-14 13:25:52 +01:00
Lennart Poettering
d8b4d14df4 util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
Lennart Poettering
090a9c1eba util: move some raw memory functions from string-util.h → memory-util.h 2019-03-14 13:25:51 +01:00
Lennart Poettering
cfb4a84942 util: don't include util.h from def.h
Nothing it defines is used in it.
2019-03-14 13:25:51 +01:00
Lennart Poettering
47094ce067 util: move dbus specific definition into bus-internal.h
It shouldn't be defined globally, since it's pretty much an
implementation detail of DBus.
2019-03-14 13:25:51 +01:00
Lennart Poettering
f05e1d0d9f util: split out kbd related stuff
This stuff is neither generic enough to be in def.h, nor really has much
to do with locale, hence give it its own .c/.h file pair.
2019-03-14 13:25:51 +01:00
Lennart Poettering
ecd5f1a9e0 util: move display_is_local() to pam_systemd.c, its only user
It's quite specific anyway, hence let's move this where it's used
2019-03-14 13:25:51 +01:00
Lennart Poettering
2b2fec7db0 util: split out errno related stuff 2019-03-14 13:25:51 +01:00
Lennart Poettering
e56f9ffe51 util: split out plymouth related stuff 2019-03-14 13:25:51 +01:00
Zbigniew Jędrzejewski-Szmek
94dfd646b3
Merge pull request #11985 from poettering/clean-dir
some rafactoring in systemctl/bus-unit-util
2019-03-14 12:21:53 +01:00
Zbigniew Jędrzejewski-Szmek
7b7426506a
Merge pull request #11993 from poettering/resolved-stub-edns-size
some resolved stub dns reply fixes
2019-03-14 11:10:38 +01:00
Michael Biebl
055a083a47 Re-add uaccess tag for /dev/dri/renderD*
Setting an access mode != 0666 is explicitly supported via -Dgroup-render-mode
In such a case, re-add the uaccess tag.

This is basically the same change that was done for /dev/kvm in
commit fa53e24130 and
ace5e3111c
and partially reverts the changes from
4e15a7343c
2019-03-14 11:08:58 +01:00
Lennart Poettering
d55e43344b
Merge pull request #11971 from keszybz/kernel-install-directory
Make kernel-install create entry directory
2019-03-14 10:51:55 +01:00
Zbigniew Jędrzejewski-Szmek
e2600fd582 bootctl: use path_join() to join paths
We would say "/boot/efi//loader/entries"...
2019-03-14 08:28:18 +01:00
Yu Watanabe
3a27af62b5 network: wait for L2TP tunnel to be created before creating sessions
And if failed to create L2TP tunnel, then do not try to create sessions.
2019-03-14 10:57:41 +09:00
Yu Watanabe
0aa2fe6f9b netlink: support NLMSG_ERROR message in genl
This resolves the following log message after L2TP tunnel or session is
created:
```
sd-netlink: ignored message with unknown type: 2
```
2019-03-14 10:57:41 +09:00
Yu Watanabe
d053d08a37 network: automatically pick an address on link when L2TP.Local= is not specified
This makes L2TP.Local= support an empty string, 'auto', 'static', and
'dynamic'. When one of the values are specified, a local address is
automatically picked from the local interface of the tunnel.
2019-03-14 10:57:41 +09:00
Susant Sahani
3a56e697c8 networkd: Introduce l2tp tunnel
This works allows networkd to configure l2tp tunnel.
See http://man7.org/linux/man-pages/man8/ip-l2tp.8.html
2019-03-14 10:57:41 +09:00
Yu Watanabe
7033af49df network: introduce new netdev create type NETDEV_CREATE_AFTER_CONFIGURED
It will be used to support L2TP tunnel in later commits.
2019-03-14 10:57:41 +09:00
Yu Watanabe
859e9c0487 network: introduce netdev_get_create_type() helper function 2019-03-14 10:57:41 +09:00
Yu Watanabe
2b6db913e2 network: do not call link_joined() when not all netdevs are configured
If some of stacked netdevs are already configured, then link_joined()
is called before netdevs are fully configured.
2019-03-14 10:57:41 +09:00
Lennart Poettering
ff4caaaeba resolved: if we can't append EDNS OPT RR, then indicate truncation to stub client
We do so for any other RR we can't add, do this here too.

Fixes: #11625
2019-03-13 19:38:14 +01:00
Lennart Poettering
acd74d61d2 resolved: don't let EDNS0 OPT dgram size affect TCP
Fixes: #11884
2019-03-13 19:34:05 +01:00
Lennart Poettering
aa11cab98c resolved: don't follow cnames if we already noticed truncation 2019-03-13 19:34:05 +01:00
Balint Reczey
6c8a2c6793 virt: detect WSL environment as a container (id: wsl) 2019-03-13 18:42:27 +01:00
Lennart Poettering
1b63cc6ea9 bus-unit-procs: use empty_or_root() where appropriate 2019-03-13 17:44:11 +01:00
Lennart Poettering
25b1d72dcc bus-unit-util: split out code that shows a unit's process tree
The code is complex enough to deserve its own .c file. Let's split this
out.
2019-03-13 17:41:41 +01:00
Lennart Poettering
e45c81b8bc shared: split out code to wait for jobs to complet into its own source file
It's complex enough and quite a few functions. Let's hence split this
out.

No code change, just some rearranging of source files.
2019-03-13 17:39:24 +01:00
Lennart Poettering
aee7082fbd systemctl: drop unnecessary {} 2019-03-13 17:38:43 +01:00
Lennart Poettering
96e895efaf systemctl: use strv_consume() where appropriate 2019-03-13 17:38:43 +01:00
Lennart Poettering
fb1ac50e4e systemctl: minimize scope of 'p' 2019-03-13 17:38:43 +01:00
Lennart Poettering
7bc4bf4a69 execute: use path_join() where appropriate 2019-03-13 17:38:43 +01:00
Lennart Poettering
db7091dca2 bus-unit-util: insist on full initialization 2019-03-13 17:38:43 +01:00
Lennart Poettering
2cdb2c2dc3 bus-unit-util: never call into log_job_error_with_service_result() if we are not a service
The call can't handle non-services, hence don't bother.
2019-03-13 17:38:43 +01:00
Lennart Poettering
61e209eb3a bus-unit-util: move explanations array to inner scope
It's specific to service units, hence let's minimize the scope since it
has no validity outside of the log message generation for service units.
2019-03-13 17:38:43 +01:00
Lennart Poettering
190c22189d bus-unit-util: use structure initialization 2019-03-13 17:38:43 +01:00
Lennart Poettering
1c070ea086 bus-unit-util: use free_and_strdup() where we can 2019-03-13 17:38:43 +01:00
Lennart Poettering
9a1996455e systemctl: refactor code to watch unit ActiveState a bit
let's split out one function, to make this reusable
2019-03-13 17:38:43 +01:00
Lennart Poettering
ef9fafbd91 tests: add tests for embedded newlines in /proc/cmdline
Prompted by: #7097
2019-03-13 17:07:02 +01:00
Lennart Poettering
cc5957dca0 bootspec: don't log in boot_entries_load_config_auto() about no ESP
Let's do it in the caller instead. That way, logind can stay silent
about it.

Fixes: #11950
2019-03-13 17:06:24 +01:00
Zbigniew Jędrzejewski-Szmek
a3b1790c1a
Merge pull request #11986 from poettering/util-split
some splitting up of util.[ch]
2019-03-13 17:02:14 +01:00
Tobias Jungel
7f15b71460 networkd: Add bridge port capabilities
This PR adds the configuration switches for multicast flooding, neighbor
suppression and learning of a bridge port.
2019-03-13 16:27:22 +01:00
Adam Jackson
183e8c0bea login: mark nomodeset fb devices as master-of-seat
When 'nomodeset' is specified, there's no DRM driver to take over from
efifb. This means no device will be marked as a seat master, so gdm will
never find a sufficiently active seat to start on.

I'm not aware of an especially good way to detect this through a proper
kernel API, so check for the word 'nomodeset' on the command line and
allow fbdev devices to be seat masters if found.

For https://bugzilla.redhat.com/show_bug.cgi?id=1683197.
2019-03-13 12:17:34 +01:00
Lennart Poettering
760877e90c util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00