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
Yu Watanabe
a1d736e25c
sd-netlink: add nl80211 type systems
2019-10-15 01:57:19 +09:00
Yu Watanabe
31e78d1042
sd-netlink: introduce sd_genl_message_get_family()
2019-10-15 01:57:19 +09:00
Yu Watanabe
2be081ffd6
sd-netlink: support NLMSG_DONE
2019-10-15 01:57:19 +09:00
Yu Watanabe
4e8f0ef921
sd-netlink: save dynamic general netlink message type
2019-10-15 01:57:19 +09:00
Yu Watanabe
2cac03f71d
sd-netlink: drop unnecessarily exported variables
2019-10-15 01:57:19 +09:00
Yu Watanabe
59d4103fd5
sd-netlink: introduce sd_netlink_message_read_string_strdup()
2019-10-15 01:57:19 +09:00
Yu Watanabe
6bf8e24bad
sd-netlink: use structured initializer
2019-10-15 01:57:19 +09:00
Yu Watanabe
ddcda37016
sd-netlink: drop unused variable
2019-10-15 01:57:19 +09:00
Yu Watanabe
338ff28d5f
sd-netlink: add missing license identifier
2019-10-15 01:57:19 +09:00
Yu Watanabe
16a8f172b6
bus-util: make map_basic handle SD_BUS_TYPE_OBJECT_PATH type
2019-10-15 01:57:19 +09:00
Susant Sahani
cb29c15605
network: DHCPv4 client: add support to send arbitary option and data
2019-10-15 00:14:02 +09:00
Yu Watanabe
7d94934b9d
Merge pull request #13760 from keszybz/unit-loading-unification
...
Unit loading unification
2019-10-14 23:35:54 +09:00
Yu Watanabe
3adf85b72f
Merge pull request #13735 from ssahani/ip-nexthop
...
network: introduce ip nexthop routing
2019-10-14 23:25:23 +09:00
Jan Synacek
4801d8afe2
udev: introduce CONST key name
...
Currently, there is no way to match against system-wide constants, such
as architecture or virtualization type, without forking helper binaries.
That potentially results in a huge number of spawned processes which
output always the same answer.
This patch introduces a special CONST keyword which takes a hard-coded
string as its key and returns a value assigned to that key. Currently
implemented are CONST{arch} and CONST{virt}, which can be used to match
against the system's architecture and virtualization type.
2019-10-14 22:01:11 +09:00
Yu Watanabe
4abcdaa08c
network: update comment as DHCP is deprecated now
2019-10-14 21:33:22 +09:00
Susant Sahani
c16c780804
network: introduce ip nexthop routing
...
Used to manipulate entries in the kernel's nexthop tables.
Example:
```
[NextHop]
Id=3
Gateway=192.168.5.1
```
2019-10-14 21:32:48 +09:00
Yu Watanabe
55d3fdcf5e
network: ndisc: do not drop all prefixes when a prefix matches a blacklist
...
Fixes #13767 .
2019-10-14 20:54:43 +09:00
Yu Watanabe
c94f7809e3
Merge pull request #13761 from dtardon/program-name
...
udev: do not hardcode program name
2019-10-14 20:17:28 +09:00