Yu Watanabe
f39dbf28f3
network: include netinet/in.h to fix build error
2019-10-24 14:20:48 +09:00
Yu Watanabe
a227674cfb
networkctl: add reload command
2019-10-24 14:20:42 +09:00
Yu Watanabe
e272b62136
network: also reload .netdev files
2019-10-24 14:18:16 +09:00
Yu Watanabe
7f06b3e1b9
network: add Reload() dbus method
2019-10-24 14:18:09 +09:00
Yu Watanabe
6f3ad94590
Merge pull request #13828 from keszybz/networkctl-print-wlan
...
networkctl support for ssid and bssid
2019-10-24 11:12:39 +09:00
Michal Suchanek
14cd12b3d5
udev/cdrom_id: Do not open CD-rom in exclusive mode.
...
When you have a CD automunt solution that talks directly to the kernel
independently of udev it races with cdrom_id for exclusive access to the
device failing unpredictably.
The whole is_mounted function in cdrom_id is broken: there is no saying
what happens between calling is_mounted and opening the device.
Hence assume that the device can be mounted asynchronously at any time,
do not use exclusive access, and do away with is_mouted.
Signed-off-by: Michal Suchanek <msuchanek@suse.de >
2019-10-24 00:09:18 +02:00
Zbigniew Jędrzejewski-Szmek
8d07de2534
networkctl: print ssid and bssid
2019-10-24 00:02:43 +02:00
Zbigniew Jędrzejewski-Szmek
172353b110
networkctl: create the sd_device structure just once
...
This is mostly in preparation for future changes: a proper freeing function
is now called on the LinkInfo items.
2019-10-24 00:02:43 +02:00
Zbigniew Jędrzejewski-Szmek
b492aea093
network: split out functions to get ssid and bssid
2019-10-24 00:02:41 +02:00
Yu Watanabe
69ec2fdd9c
Merge pull request #13807 from 1848/ip6gre_key_fix
...
networkd: Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.
2019-10-23 23:18:59 +09:00
David Tardon
7976b9f098
run: add -u as a synonym for --unit
...
Other tools that do have --unit= option (journalctl and systemd-cgls)
already do this, so let's be consistent.
2019-10-23 22:06:32 +09:00
Yu Watanabe
c0c8886141
Merge pull request #13825 from keszybz/nspawn-console-help
...
nspawn: fix handling of --console=help
2019-10-23 22:03:53 +09:00
Zbigniew Jędrzejewski-Szmek
510c4bb31f
Merge pull request #13142 from yuwata/network-wifi-ssid-support-nl80211
...
network: wifi ssid support with nl80211
2019-10-23 14:51:23 +02:00
Zbigniew Jędrzejewski-Szmek
516e9c802f
networkctl: split out helper function
2019-10-23 12:29:04 +02:00
Zbigniew Jędrzejewski-Szmek
ceb366df29
networkctl: show carrier in green for loopback iface
...
We don't ever expect anything different, so let's hightlight
that carrier in this case is OK.
2019-10-23 11:10:32 +02:00
Zbigniew Jędrzejewski-Szmek
dce66ffedb
nspawn: fix handling of --console=help
...
We shouldn't continue to run the container after printing help.
2019-10-23 09:35:36 +02:00
Yu Watanabe
c199cc0704
Merge pull request #13820 from keszybz/dead-code-removal
...
Dead code removal
2019-10-23 16:11:27 +09:00
Zbigniew Jędrzejewski-Szmek
12c829376a
Revert "sysusers: properly mark generated accounts as locked"
...
This reverts the gist of commit 636e72bce6 .
The comment and the tiny cleanup are left alone.
We shouldn't lock the accounts because people actually need to use them, and
if they are locked, various tools will refuse.
See https://github.com/systemd/systemd/pull/13277#issuecomment-529964578
and follow-up comments.
2019-10-22 17:59:11 +09:00
Thibault Nélis
2c54acb112
journal: Consistently capitalize printed header entries
...
Per comments in https://github.com/systemd/systemd/pull/13808 .
2019-10-22 10:32:09 +02:00
Marko Myllynen
de52000695
Remove unprintable non-ASCII char from special glyph ASCII fallback table
2019-10-22 10:31:47 +02:00
Anita Zhang
5b90e5f3f5
Merge pull request #13811 from keszybz/logind-signal-emitting-fix
...
Logind signal emitting fix
2019-10-21 17:13:57 -07:00
Zbigniew Jędrzejewski-Szmek
ecfd9a990c
update-utmp: remove dead conditional
...
Coverity was complaining that runlevel>0 is guaranteed at this point.
CID #1404262 .
While at it, shorten the code a bit.
2019-10-21 21:12:42 +02:00
Zbigniew Jędrzejewski-Szmek
7d895205ef
tty-ask-password: fix dead code path
...
Coverity was complaining that watch==1 always at this point.
CID #1405882 .
Use structured initialization while at it.
2019-10-21 21:12:42 +02:00
Zbigniew Jędrzejewski-Szmek
ce2f43797a
journal-remote: reduce scope of variable
...
https://github.com/systemd/systemd/pull/11953/files#r264188513
2019-10-21 21:12:42 +02:00
Peter Wu
6880558020
resolved: fix connection failures with TLS 1.3 and GnuTLS
...
Prefer TLS 1.3 before TLS 1.2 for DNS-over-TLS support, otherwise
servers compliant with RFC 8446 might end up agreeing TLS 1.2 plus a
downgrade signal which is not expected by GnuTLS clients. This manifests
in the following error:
Failed to invoke gnutls_handshake: An illegal parameter has been received.
Fixes : #13528
Fixes: v242-962-g9c0624dcdb ("resolved: support TLS 1.3 when using GnuTLS for DNS-over-TLS")
2019-10-21 20:35:05 +02:00
Zbigniew Jędrzejewski-Szmek
8163b9f900
logind: fix emission of PropertiesChanged for users
...
The same as parent commit, but users. This is the third and last
foo_object_find() function in logind, so I think that this particular
family of bugs is finally squashed.
2019-10-21 15:07:36 +02:00
Zbigniew Jędrzejewski-Szmek
8cc64c2a36
logind: fix emission of PropertiesChanged on seats
...
The story is the same as in 471cffcfb0 :
device_attach() → seat_send_changed() → sd_bus_emit_properties_changed_strv()
→ emit_properties_changed_on_interface() → node_vtable_get_userdata()
→ seat_object_find(), which returns 0 because message == NULL.
But when we are emitting a signal, message is always NULL. Removing the
overeager check and assert in the called function allow the signal to be
emitted.
Fixes #13769 .
2019-10-21 15:05:58 +02:00
Zbigniew Jędrzejewski-Szmek
4b9e5848e3
logind: drop {}
2019-10-21 09:33:19 +02:00
1848
6ba0e7c8fe
Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.
2019-10-20 00:25:58 +02:00
Zbigniew Jędrzejewski-Szmek
0325f71926
udev: tag any display devices as master-of-seat when nomodeset is used
...
Fixes #13773 . See also https://bugzilla.redhat.com/show_bug.cgi?id=1728240 ,
https://github.com/sddm/sddm/issues/1204 .
When nomodeset is used on the kernel command line, there is no graphics
device that the kernel knows, so we don't tag anything as master-of-seat,
and seat0 has CanGraphical=no.
$ loginctl seat-status seat0 ; loginctl show-seat seat0
seat0
Devices:
├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
│ input:input0 "Power Button"
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1
│ usb:usb1
│ └─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input4
│ input:input4 "QEMU QEMU USB Tablet"
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2
│ usb:usb2
├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
│ sound:card0 "Intel"
├─/sys/devices/platform/i8042/serio0/input/input1
│ input:input1 "AT Translated Set 2 keyboard"
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::capslock
│ │ leds:input1::capslock
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::numlock
│ │ leds:input1::numlock
│ └─/sys/devices/platform/i8042/serio0/input/input1/input1::scrolllock
│ leds:input1::scrolllock
└─/sys/devices/platform/i8042/serio1/input/input3
input:input3 "ImExPS/2 Generic Explorer Mouse"
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=no
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0
Let's tag the PCI device with "master-of-seat", so we get CanGraphical=yes, and "seat",
so it is show as part of the seat:
[fedora@f31-bios ~]$ loginctl seat-status seat0 ; loginctl show-seat seat0
seat0
Devices:
├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
│ input:input0 "Power Button"
├─/sys/devices/pci0000:00/0000:00:01.0
│ [MASTER] pci:0000:00:01.0
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1
│ usb:usb1
│ └─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input4
│ input:input4 "QEMU QEMU USB Tablet"
├─/sys/devices/pci0000:00/0000:00:02.1/0000:02:00.0/usb2
│ usb:usb2
├─/sys/devices/pci0000:00/0000:00:1b.0/sound/card0
│ sound:card0 "Intel"
├─/sys/devices/platform/i8042/serio0/input/input1
│ input:input1 "AT Translated Set 2 keyboard"
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::capslock
│ │ leds:input1::capslock
│ ├─/sys/devices/platform/i8042/serio0/input/input1/input1::numlock
│ │ leds:input1::numlock
│ └─/sys/devices/platform/i8042/serio0/input/input1/input1::scrolllock
│ leds:input1::scrolllock
└─/sys/devices/platform/i8042/serio1/input/input3
input:input3 "ImExPS/2 Generic Explorer Mouse"
Id=seat0
CanMultiSession=yes
CanTTY=yes
CanGraphical=yes
Sessions=
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0
2019-10-19 20:52:42 +02:00
Benjamin Bouvier
e4fc745547
systemd-fsck: fix systemd-fsck/fsck pipe bad closure
...
Currently, when console is disabled but progress is tracked, pipe opened
for communication between systemd-fsck and fsck may be closed
inadvertently (when opening of /dev/console return in error). That lead
to finish fsck prematurely (because it receives a SIGPIPE) and so fsck
may not check correctly filesystems and do not have time to fix memory
corruptions.
This commit changes the opening of /dev/console to be done previously to
pipe creation and so fix the bug described just above.
2019-10-18 16:07:00 +02:00
Aaron Plattner
ab84cf9191
coredump: Include module offsets in stack traces
...
These offsets can be useful to decode stack traces through modules that don't
have symbol names. For example, with a simple test that crashes after calling
through several static functions, systemd-coredump reports this:
Oct 17 : Process 640333 (a.out) of user 1000 dumped core.
Stack trace of thread 640333:
#0 0x00005562c2b9f11d n/a (/tmp/a.out)
#1 0x00005562c2b9f12d n/a (/tmp/a.out)
#2 0x00005562c2b9f139 n/a (/tmp/a.out)
#3 0x00005562c2b9f145 n/a (/tmp/a.out)
#4 0x00007fc768b39153 __libc_start_main (libc.so.6)
#5 0x00005562c2b9f04e n/a (/tmp/a.out)
With this change:
Stack trace of thread 666897:
#0 0x0000555668fbe11d n/a (/tmp/a.out + 0x111d)
#1 0x0000555668fbe12d n/a (/tmp/a.out + 0x112d)
#2 0x0000555668fbe139 n/a (/tmp/a.out + 0x1139)
#3 0x0000555668fbe145 n/a (/tmp/a.out + 0x1145)
#4 0x00007f7b5c828153 __libc_start_main (libc.so.6 + 0x27153)
#5 0x0000555668fbe04e n/a (/tmp/a.out + 0x104e)
Disassembling the test binary shows that these offsets line up:
0000000000001119 <crash>:
1119: 55 push %rbp
111a: 48 89 e5 mov %rsp,%rbp
111d: 0f 0b ud2 <---- #0
000000000000111f <b>:
111f: 55 push %rbp
1120: 48 89 e5 mov %rsp,%rbp
1123: b8 00 00 00 00 mov $0x0,%eax
1128: e8 ec ff ff ff callq 1119 <crash>
112d: 90 nop <---- #1
112e: 5d pop %rbp
112f: c3 retq
0000000000001130 <a>:
1130: 55 push %rbp
1131: 48 89 e5 mov %rsp,%rbp
1134: e8 e6 ff ff ff callq 111f <b>
1139: 90 nop <---- #2
113a: 5d pop %rbp
113b: c3 retq
000000000000113c <main>:
113c: 55 push %rbp
113d: 48 89 e5 mov %rsp,%rbp
1140: e8 eb ff ff ff callq 1130 <a>
1145: b8 00 00 00 00 mov $0x0,%eax <---- #3
114a: 5d pop %rbp
114b: c3 retq
114c: 0f 1f 40 00 nopl 0x0(%rax)
(from libc.so.6)
0000000000027060 <__libc_start_main>:
27060: f3 0f 1e fa endbr64
27064: 41 56 push %r14
27066: 31 c0 xor %eax,%eax
[...]
2714c: 48 8b 44 24 18 mov 0x18(%rsp),%rax
27151: ff d0 callq *%rax
27153: 89 c7 mov %eax,%edi <---- #4
27155: e8 e6 76 01 00 callq 3e840 <exit>
2019-10-18 15:26:47 +02:00
Jonas Jelten
c4742de6d8
ceph is a network filesystem
2019-10-18 10:03:51 +09:00
Chris Down
959daf9bfc
Merge pull request #13743 from anitazha/dropin_all_the_things
...
core: support top level drop-ins through -.service.d for service units
2019-10-16 23:10:05 -04:00
Yu Watanabe
7f66ff56eb
Merge pull request #13784 from keszybz/constify-unit-pointers
...
Constify unit pointers
2019-10-17 09:41:36 +09:00
Anita Zhang
d727acb650
Merge pull request #13754 from claudiozz/master
...
Allow restart for oneshot units
2019-10-16 14:21:59 -07:00
Claudio Zumbo
10e72727ee
Allow restart for oneshot units
...
Picked up from https://github.com/systemd/systemd/pull/7474 , so
coauthored by @robermorales.
2019-10-16 09:44:20 -07:00
Zbigniew Jędrzejewski-Szmek
1d56bc094c
systemctl: emit warning if start is used with globs
...
Fixes #6379 .
2019-10-16 17:33:40 +02:00
Zbigniew Jędrzejewski-Szmek
abc9fa1cf1
core/load-fragment: remove unnecessary intialization
...
manager_load_unit() better set it on success, and unit_set_slice() asserts
that the argument is not NULL, so initializing it to NULL is not useful.
2019-10-16 16:33:54 +02:00
Zbigniew Jędrzejewski-Szmek
47538b7686
core/load-fragment: constify Unit* arguments where possible
...
This makes it easy to tell that the function only uses the Unit* for
reporting, and only makes changes to the other argument (which most likely
also points at the same Unit structure) for modifications.
2019-10-16 16:32:45 +02:00
Zbigniew Jędrzejewski-Szmek
a2262bcafa
core: mark unit_*_printf() functions as taking a const Unit*
...
They should never modify the unit argument, let's make this clear.
Also see 303ee60151 .
2019-10-16 16:21:56 +02:00
Zbigniew Jędrzejewski-Szmek
c8966bffdd
Merge pull request #13663 from ssahani/dhcp-send-option-data
...
network: DHCPv4 client- add support to send arbitary option and data
2019-10-16 11:31:22 +02:00
Franck Bui
a03cdb173e
logind: make session_prepare_vt() static
2019-10-16 10:45:25 +09:00
Anita Zhang
74f632aca4
Merge pull request #13726 from bluca/portable_detach_symlink
...
portabled: allow to detach an image with a unit in linked-runtime state
2019-10-15 17:16:51 -07:00
Anita Zhang
d272467882
shared/dropin: support -.service.d/ top level drop-in for service units
...
Closes #12830
2019-10-15 11:14:54 -07:00
Yu Watanabe
277ba8d1ab
network: add support matching based on BSSID=
2019-10-15 01:59:56 +09:00
Yu Watanabe
0894cfe41c
network: also read BSSID
2019-10-15 01:59:13 +09:00
Yu Watanabe
8d968fdd99
network: support matching based on wifi SSID
2019-10-15 01:59:06 +09:00
Yu Watanabe
ad932b156c
network: introduce link_reconfigure()
...
Will be used in later commits.
2019-10-15 01:57:19 +09:00
Yu Watanabe
1a6bb31fae
network: split link_free() into two parts
2019-10-15 01:57:19 +09:00