Commit graph

43797 commits

Author SHA1 Message Date
Dan Streetman 1b43e24602 network: attach sd-event in link_load() when creating link dhcp_client or ipv4ll
Commit 08c588d18b moved attachment of the
sd-event into creation of the dhcp_client or ipv4ll in dhcp4_configure()
or ipv4ll_configure(), but these can also be created in link_load(),
so that creation needs to also perform sd-event attachment.

Without this, dhcp_client or ipv4ll created in link_load() will not have
an ->event and will fail assertion, causing networkd to fail, e.g.:

Assertion 'client->event' failed at src/libsystemd-network/sd-dhcp-client.c:1283, function client_start_delayed(). Ignoring.
ens2: Could not acquire DHCPv4 lease: Invalid argument
ens2: Failed
2020-03-24 17:49:08 +01:00
Susant Sahani 12ef8fb6f1 networkctl: Add more bridge properties 2020-03-24 10:08:48 +01:00
Zbigniew Jędrzejewski-Szmek 2e7d6d1d32
Merge pull request #15185 from ssahani/fix-sip-copy-paste
network: DHCP lease load SIP copy paste error
2020-03-24 10:03:57 +01:00
pelzvieh 137d448751 davfs is a network file system 2020-03-24 10:01:25 +01:00
Arusekk 71180f8e57 Fall back to kexec when no kexec binary exists
This may be not a popular setup, but in case kexec resides somewhere different
than the default location for KEXEC (`/usr/sbin/kexec`), don't just reboot and
try doing `reboot(RB_KEXEC)` instead, just like what `kexec -e` normally does.
2020-03-24 09:50:11 +01:00
Balint Reczey cdc6c95737 units: Don't mount tracefs in LXC
Mounting tracefs fails in unprivileged LXC containers and latest LXD
(3.23) bind mounts tracefs already.

Fixes https://github.com/lxc/lxd/issues/7059
2020-03-23 08:34:48 +01:00
Vito Caputo d4a3494e65 swap: check p->what for NULL
Commit 61f9cf4e4c introduced swap_get_parameters(s) but only
checked its return for NULL and not its ->what.

Fixes https://github.com/systemd/systemd/issues/15070
2020-03-23 08:30:32 +01:00
ml 992622c428 man: fix typo in loader.conf(5) 2020-03-22 20:22:03 +01:00
Daan De Meyer b0f4c02e2d sd-bus: Add sd_bus_send docs + cleanups. 2020-03-22 20:21:11 +01:00
Susant Sahani 1f807af6de networkctl: Add support to display SIP servers
```
❯ build/networkctl status veth99                                                                                                                                                           ─╯
● 17: veth99
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /usr/lib/systemd/network/veth99.network
                          Type: ether
                         State: routable (configured)
                        Driver: veth
                    HW Address: 1e:04:f8:b8:2f:d4
                           MTU: 1500 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 192.168.5.35 (DHCP4)
                                fe80::1c04:f8ff:feb8:2fd4
                       Gateway: 192.168.5.1
                           DNS: 192.168.5.1
                           NTP: 192.168.5.1
                           SIP: 192.168.5.4
                                192.168.5.5
                     Time Zone: Europe/Berlin

Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 21 23:26:32 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:25:35 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:25:36 Zeus systemd-networkd[671]: veth99: Gained IPv6LL
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Link DOWN
Mar 22 10:29:02 Zeus systemd-networkd[671]: veth99: Lost carrier
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Link UP
Mar 22 10:29:13 Zeus systemd-networkd[671]: veth99: Gained carrier
Mar 22 10:29:14 Zeus systemd-networkd[671]: veth99: Gained IPv6LL

```
2020-03-22 15:59:05 +01:00
Susant Sahani eb46288cca sd-network: Provice APIs to access SIP servers given by DHCP4 server 2020-03-22 10:39:23 +01:00
Susant Sahani be1af90585 network: DHCP lease load SIP copy paste error 2020-03-21 18:34:46 +01:00
Daan De Meyer 60ef094297 sd-bus: Add sd_bus_reply_method_return docs + cleanups 2020-03-19 20:51:17 +01:00
Daan De Meyer 4bd859be95 sd-bus: add sd_bus_message_seal docs + cleanups 2020-03-19 14:27:56 +01:00
Finn b5b179e49e Fix keys on Medion Akoya P6669 2020-03-19 10:10:29 +01:00
Arnaud Ferraris 19bb87fbfa login: allow non-console sessions to change vt
When starting a wayland session through a systemd service for a non-root
user, the compositor (based on wlroots) is denied the authorization to
change vt.
Once the user logs in, either through a local console or via ssh, the
compositor can work properly.

This is related to the login polkit policy:
- `allow_inactive` has value `auth_admin_keep`, denying any non-root
  user session the authorization to change vt
- `allow_active` has value `yes`, which explains why the vt change
  becomes possible once the user logs in through another channel

By changing the `allow_inactive` value to `yes`, any user session setup
in a service file can switch vt, allowing wayland sessions for non-root
users.
2020-03-19 09:29:23 +01:00
Franck Bui b39648ed47 logind: log a more accurate error when we failed at session creation
We used to log the following error:

  "Start job for unit user-1000.slice failed with 'canceled'"

which can be really misleading if the actual job failed at *stopping* a unit.

Indeed "Start" was hard coded but it was wrong since we can also fail with stop
jobs which are enqueued when a session is stopped.
2020-03-19 09:22:43 +01:00
Zbigniew Jędrzejewski-Szmek 677ceb0c2f
Merge pull request #15153 from keszybz/man-bus-address
Add two man pages for sd-bus
2020-03-19 09:11:14 +01:00
David Wood 7354900ddd network: Fix split in SendOption= on client and server
When specifying `DHCPv4.SendOption=`, it is used by systemd-networkd to
set the value of that option within the DHCP request that is sent out.
This differs to setting `DHCPServer.SendOption=`, which will place all
the options together as suboptions into the vendor-specific information
(code 43) option.

This commit adds two new config options, `DHCPv4.SendVendorOption=` and
`DHCPServer.SendVendorOption=`. These both have the behaviour of the old
`DHCPServer.SendOption=` flag, and set the value of the suboption in the
vendor-specific information option.

The behaviour of `DHCPServer.SendOption=` is then changed to reflect
that of `DHCPv4.SendOption=`. It will set the value of the corresponding
option in the DHCP request.
2020-03-19 09:08:40 +01:00
Susant Sahani d69b62de44 networkctl: Add support to display IPv6 addrgenmode 2020-03-19 08:57:59 +01:00
Christian Göttsche 194fe32296 selinux: delay mac_selinux_enforcing call after SELinux was determined to be enabled
Calling `mac_selinux_enforcing()`, which calls `security_getenforce()`, on a SELinux disabled system causes the following error message to be printed:
    Failed to get SELinux enforced status: No such file or directory

Fixes: 257188f80c ("selinux: cache enforced status and treat retrieve failure as enforced mode")
Supersedes: #15145
2020-03-19 08:56:30 +01:00
Daan De Meyer cc46b9d913 sd-bus: sd_bus_set/get_method_call_timeout docs + cleanups. 2020-03-18 20:07:45 +01:00
Zbigniew Jędrzejewski-Szmek 9178398f2e man: say "is" not "has been" 2020-03-18 19:57:44 +01:00
Zbigniew Jędrzejewski-Szmek 92b6df1d68 man: mention sd_bus_is_anonymous() and sd_bus_is_trusted() 2020-03-18 19:57:44 +01:00
Zbigniew Jędrzejewski-Szmek cc3d85eb97 sd-bus: mark sd_bus_try_close() as deprecated
codesearch.debian.net shows no uses (except for the definition in systemd and
elogind).

$ cat > test.c

int main() {
  sd_bus_try_close(NULL);
  return 0;
}
$ gcc -Isrc/systemd -Wall -o testbus test.c -lsystemd
test.c: In function ‘main’:
test.c:4:3: warning: ‘sd_bus_try_close’ is deprecated [-Wdeprecated-declarations]
    4 |   sd_bus_try_close(NULL);
      |   ^~~~~~~~~~~~~~~~
In file included from test.c:1:
src/systemd/sd-bus.h:180:5: note: declared here
  180 | int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */
      |     ^~~~~~~~~~~~~~~~
2020-03-18 19:57:44 +01:00
Zbigniew Jędrzejewski-Szmek 99cde098f8 bus: drop dead code for kdbus support
sd_bus_try_close() always returns -EOPNOTSUPP if bus is a valid object.
It nevers returns -EBUSY. So we'd always go into the "fallback" path.
2020-03-18 19:57:44 +01:00
Zbigniew Jędrzejewski-Szmek 9783b59bf6 man: describe sd_bus_default_flush_close() 2020-03-18 19:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 3f549982a5 man: add sd_bus_set_address(3) 2020-03-18 19:57:43 +01:00
Zbigniew Jędrzejewski-Szmek d3d5ff4bc2 sd-bus: make bus_set_address_user always go through sd_bus_set_address
This way all the checks are done, and we don't leak a pointer if
bus_set_address_user() is called twice.
2020-03-18 19:57:43 +01:00
Zbigniew Jędrzejewski-Szmek 27622235c4 man: add sd_bus_start(3) 2020-03-18 19:57:43 +01:00
Susant Sahani b1d6fe7055 networkctl: Add support to display bond 2020-03-18 16:12:07 +01:00
Zbigniew Jędrzejewski-Szmek 8c357762c7
Merge pull request #14749 from msekletar/cpu-aff-numa-v3
core: add support for setting CPUAffinity= to special "numa" value
2020-03-18 13:35:58 +01:00
Daan De Meyer 953ee402cb sd-bus: sd_bus_call/sd_bus_call_async_docs + cleanups. 2020-03-18 10:45:14 +01:00
Yu Watanabe b48772f6cb
Merge pull request #15143 from ssahani/networkctl-tunnel-geneve
networkctl: Add support to display geneve tunnel info
2020-03-18 18:33:38 +09:00
Susant Sahani 5712d689b9 networkctl: Add support to display vti and vti6 tunnels 2020-03-18 05:21:41 +01:00
Susant Sahani ad760bc1e7 networkctl: add support to display ip6gre, ip6gretap, ip6erspan 2020-03-18 04:27:09 +01:00
Joerg Behrmann 1f667d8a7c docs: Add syntax for templated units to systemd.preset man page
This documents the syntax

     enable template@.service foo bar baz

that was introduced in #9901 to preset templated units.
2020-03-17 17:12:06 +01:00
Zbigniew Jędrzejewski-Szmek 34bc838f15
Merge pull request #15136 from yuwata/network-dhcp4-use-gateway
network: add a flag to ignore gateway provided by DHCP server
2020-03-17 16:51:18 +01:00
Zbigniew Jędrzejewski-Szmek 52d247154b
Merge pull request #15108 from keszybz/systemctl-set-default-notices
Make systemctl set-default hint about some common issues
2020-03-17 16:39:45 +01:00
Susant Sahani 4d75ea1ea3 networkctl: Add support to display gre gretap and erspan 2020-03-17 14:31:54 +01:00
Susant Sahani 4e1a1991c6 networkctl: Add support to display geneve tunnel info 2020-03-17 12:47:51 +01:00
duguxy 24a3c4299f
hwdb: add support for Lenovo Legion Y9000X2020 (#15127) 2020-03-17 12:24:00 +01:00
Piotr Drąg 0208c4bb3c po: update Polish translation 2020-03-17 12:21:04 +01:00
Alexander Malafeev 1f5d1de269 Fix volume control keys on Lenovo Yoga S940
With the default config repeated press of fn+VolumeUp or fn+VolumeDown lead to
repeated presses even after release, which leads to volume going to 100% or 0%.
2020-03-17 12:16:13 +01:00
Zbigniew Jędrzejewski-Szmek 12877da215 systemctl: print a notice when set-default is not effective
$ sudo ln -svf multi-user.target /run/systemd/generator.early/default.target
'/run/systemd/generator.early/default.target' -> 'multi-user.target'
$ sudo build/systemctl set-default --root=/ sysinit.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/sysinit.target.
Note: "multi-user.target" is the default unit (possibly a runtime override).

The output is not super informative, but it should be enough to point the user in
the right direction.

Fixes #3645.
2020-03-17 12:11:09 +01:00
Susant Sahani dca352245b networkctl: Add support to show tunnel (ipip/sit) local and remote address 2020-03-17 19:45:41 +09:00
Daan De Meyer 9735c644be sd-bus: Add sd_bus_method_call/sd_bus_method_call_async docs + cleanups. 2020-03-17 17:12:58 +09:00
Anita Zhang a4f4a4e441
Merge pull request #15138 from ssahani/networkctl-vlan
networkctl: Add support to display vlan ID
2020-03-16 12:56:07 -07:00
Anita Zhang 272e6b8c62
Merge pull request #15139 from DaanDeMeyer/sd-bus-remove-unused-cite
sd-bus: Remove unused man cite of `sd_bus_slot_new_signal`.
2020-03-16 12:50:26 -07:00
Daan De Meyer aff618c769 sd-bus: Remove unused man cite of sd_bus_slot_new_signal. 2020-03-16 19:52:40 +01:00