Zbigniew Jędrzejewski-Szmek [Wed, 23 Oct 2019 07:20:46 +0000 (09:20 +0200)]
nspawn: fix handling of --console=help
We shouldn't continue to run the container after printing help.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 14:26:42 +0000 (16:26 +0200)]
Revert "sysusers: properly mark generated accounts as locked"
This reverts the gist of commit
636e72bce63e7e99b76357f7d524d16f61558775.
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.
Thibault Nélis [Mon, 21 Oct 2019 18:37:08 +0000 (20:37 +0200)]
journal: Consistently capitalize printed header entries
Per comments in https://github.com/systemd/systemd/pull/13808.
Marko Myllynen [Mon, 21 Oct 2019 18:58:51 +0000 (21:58 +0300)]
Remove unprintable non-ASCII char from special glyph ASCII fallback table
Anita Zhang [Tue, 22 Oct 2019 00:13:57 +0000 (17:13 -0700)]
Merge pull request #13811 from keszybz/logind-signal-emitting-fix
Logind signal emitting fix
Peter Wu [Sun, 20 Oct 2019 17:10:31 +0000 (18:10 +0100)]
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")
Hans de Goede [Sat, 19 Oct 2019 11:29:37 +0000 (13:29 +0200)]
hwdb: Add Medion Akoya E2215T MD60198 sensor orientation quirk
Add sensor orientation quirk for the Medion Akoya E2215T so that
desktop-environments show their graphics the right way up.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:10:50 +0000 (15:10 +0200)]
mailmap: add entry to fix authorship of commit
471cffcfb0e005b7c4044b3b52cc4f25d217efac was committed on a debug VM where I
didn't have git set up properly.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:07:36 +0000 (15:07 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 13:05:58 +0000 (15:05 +0200)]
logind: fix emission of PropertiesChanged on seats
The story is the same as in
471cffcfb0e005b7c4044b3b52cc4f25d217efac:
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.
Zbigniew Jędrzejewski-Szmek [Mon, 21 Oct 2019 07:33:19 +0000 (09:33 +0200)]
logind: drop {}
Daniel [Sun, 20 Oct 2019 23:48:34 +0000 (01:48 +0200)]
Add Schneider SCT101CTM to sensor hwdb
Zbigniew Jędrzejewski-Szmek [Thu, 17 Oct 2019 10:37:12 +0000 (12:37 +0200)]
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
Anita Zhang [Sat, 19 Oct 2019 01:36:48 +0000 (18:36 -0700)]
Merge pull request #13795 from ddstreet/test-41
WIP: test: debug TEST-41 failure on Ubuntu CI
Dan Streetman [Thu, 17 Oct 2019 15:06:18 +0000 (11:06 -0400)]
test: correct TEST-41 StartLimitBurst test
TEST-41 verifies that the StartLimitBurst property will correctly
limit the number of unit restarts, but the test currently doesn't
adjust the StartLimitIntervalSec which defaults to 10 seconds.
On Ubuntu CI, running under un-accelerated qemu, it can take more than
10 seconds to perform all 3 restarts, which avoids the burst limit,
and fails the test.
Instead, specify a long StartLimitIntervalSec in the test, so we can
be sure to correctly test StartLimitBurst even on slow testbeds.
Fixes #13794.
David Tardon [Thu, 3 Oct 2019 17:05:06 +0000 (19:05 +0200)]
add test for ExecStopPost
This is a follow-up to #4843.
Benjamin Bouvier [Tue, 1 Oct 2019 09:12:10 +0000 (12:12 +0300)]
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.
Aaron Plattner [Thu, 17 Oct 2019 19:56:15 +0000 (12:56 -0700)]
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>
Dan Streetman [Thu, 17 Oct 2019 18:06:43 +0000 (14:06 -0400)]
test: blacklist TEST-41 on Ubuntu CI
This test has been failing on Ubuntu CI since introduced, let's
blacklist it until we can debug what's causing it to fail.
Jonas Jelten [Thu, 17 Oct 2019 10:10:13 +0000 (12:10 +0200)]
ceph is a network filesystem
Jan Synacek [Thu, 17 Oct 2019 08:52:38 +0000 (10:52 +0200)]
rule-syntax-check: add CONST
Chris Down [Thu, 17 Oct 2019 03:10:05 +0000 (23:10 -0400)]
Merge pull request #13743 from anitazha/dropin_all_the_things
core: support top level drop-ins through -.service.d for service units
Yu Watanabe [Thu, 17 Oct 2019 00:41:36 +0000 (09:41 +0900)]
Merge pull request #13784 from keszybz/constify-unit-pointers
Constify unit pointers
Anita Zhang [Wed, 16 Oct 2019 21:21:59 +0000 (14:21 -0700)]
Merge pull request #13754 from claudiozz/master
Allow restart for oneshot units
Anita Zhang [Wed, 16 Oct 2019 20:50:10 +0000 (13:50 -0700)]
Merge pull request #13786 from keszybz/systemctl-start-glob-warning
systemctl: emit warning if start is used with globs
Claudio Zumbo [Tue, 8 Oct 2019 22:04:29 +0000 (15:04 -0700)]
Allow restart for oneshot units
Picked up from https://github.com/systemd/systemd/pull/7474 , so
coauthored by @robermorales.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Oct 2019 15:33:32 +0000 (17:33 +0200)]
systemctl: emit warning if start is used with globs
Fixes #6379.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Oct 2019 14:33:54 +0000 (16:33 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Oct 2019 14:32:45 +0000 (16:32 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Oct 2019 14:21:56 +0000 (16:21 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Wed, 16 Oct 2019 09:31:22 +0000 (11:31 +0200)]
Merge pull request #13663 from ssahani/dhcp-send-option-data
network: DHCPv4 client- add support to send arbitary option and data
RoadrunnerWMC [Tue, 15 Oct 2019 21:43:36 +0000 (14:43 -0700)]
Add Acer Switch SW312-31 to sensor hwdb
See issue #13732
Franck Bui [Tue, 15 Oct 2019 14:43:17 +0000 (16:43 +0200)]
logind: make session_prepare_vt() static
Anita Zhang [Wed, 16 Oct 2019 00:16:51 +0000 (17:16 -0700)]
Merge pull request #13726 from bluca/portable_detach_symlink
portabled: allow to detach an image with a unit in linked-runtime state
Anita Zhang [Sat, 5 Oct 2019 00:39:34 +0000 (17:39 -0700)]
shared/dropin: support -.service.d/ top level drop-in for service units
Closes #12830
Yu Watanabe [Mon, 14 Oct 2019 13:51:51 +0000 (22:51 +0900)]
test-network: disable IPv6AcceptRA= to speed up tests
Susant Sahani [Thu, 26 Sep 2019 18:06:02 +0000 (20:06 +0200)]
network: DHCPv4 client: add support to send arbitary option and data
Yu Watanabe [Mon, 14 Oct 2019 14:35:54 +0000 (23:35 +0900)]
Merge pull request #13760 from keszybz/unit-loading-unification
Unit loading unification
Yu Watanabe [Mon, 14 Oct 2019 14:25:23 +0000 (23:25 +0900)]
Merge pull request #13735 from ssahani/ip-nexthop
network: introduce ip nexthop routing
Jan Synacek [Mon, 7 Oct 2019 08:03:07 +0000 (10:03 +0200)]
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.
Yu Watanabe [Mon, 14 Oct 2019 12:18:01 +0000 (21:18 +0900)]
test-network: add a test case for nexthop
Yu Watanabe [Mon, 14 Oct 2019 12:19:04 +0000 (21:19 +0900)]
network: update comment as DHCP is deprecated now
Susant Sahani [Fri, 4 Oct 2019 19:40:51 +0000 (21:40 +0200)]
network: introduce ip nexthop routing
Used to manipulate entries in the kernel's nexthop tables.
Example:
```
[NextHop]
Id=3
Gateway=192.168.5.1
```
Yu Watanabe [Sun, 13 Oct 2019 17:00:47 +0000 (02:00 +0900)]
network: ndisc: do not drop all prefixes when a prefix matches a blacklist
Fixes #13767.
Yu Watanabe [Mon, 14 Oct 2019 11:17:28 +0000 (20:17 +0900)]
Merge pull request #13761 from dtardon/program-name
udev: do not hardcode program name
Yu Watanabe [Mon, 14 Oct 2019 11:16:58 +0000 (20:16 +0900)]
Merge pull request #13765 from yuwata/udev-memleak-13764
udev,systemctl: fix memleak caused by wrong cleanup function
Yu Watanabe [Sat, 12 Oct 2019 15:54:34 +0000 (00:54 +0900)]
systemctl: fix memleak caused by wrong cleanup func
Yu Watanabe [Sat, 12 Oct 2019 15:35:49 +0000 (00:35 +0900)]
udev: fix memleak caused by wrong cleanup function
Fixes #13764.
David Tardon [Fri, 11 Oct 2019 12:41:58 +0000 (14:41 +0200)]
udev: do not hardcode program name
David Tardon [Fri, 11 Oct 2019 12:39:56 +0000 (14:39 +0200)]
udev/fido_id: fix program name in usage output
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2019 09:43:32 +0000 (11:43 +0200)]
core: pass around pointer, not struct
Since this is a static function, the compiler is likely to optimize it away
anyway, but let's do the normal thing here.
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2019 10:53:31 +0000 (12:53 +0200)]
shared/bus-unit-util: remove some empty lines
We generally don't add empty lines after if. It looks especially strange
when the block has is just a single line without braces.
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2019 10:48:33 +0000 (12:48 +0200)]
core: adjust load functions for other unit types to be more like service
No functional change, just adjusting code to follow the same pattern
everywhere. In particular, never call _verify() on an already loaded unit,
but return early from the caller instead. This makes the code a bit easier
to follow.
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2019 09:10:50 +0000 (11:10 +0200)]
core: simplify unit_load() a bit
Now all unit types define .load. But even if it wasn't defined, we'd need
to call unit_load_fragment_and_dropin() anyway, so this code would not have
worked correctly.
Also, unit_load_fragment_and_dropin() either returns -ENOENT or changes
UNIT_STUB to UNIT_LOADED, so we don't need to repeat this here.
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2019 08:53:54 +0000 (10:53 +0200)]
core/service: use common implementation of unit_load_fragment_and_dropin()
There is a slight functional change when load_state == UNIT_MERGED. Before,
we would not call unit_load_dropin(), but now we do. I'm not sure if this
causes an actual difference in behaviour, but since all other unit types do
this, I think it's better to do the same thing here too.
Zbigniew Jędrzejewski-Szmek [Fri, 11 Oct 2019 08:41:44 +0000 (10:41 +0200)]
core: turn unit_load_fragment_and_dropin_optional() into a flag
unit_load_fragment_and_dropin() and unit_load_fragment_and_dropin_optional()
are really the same, with one minor difference in behaviour. Let's drop
the second function.
"_optional" in the name suggests that it's the "dropin" part that is optional.
(Which it is, but in this case, we mean the fragment to be optional.)
I think the new version with a flag is easier to understand.
Yu Watanabe [Thu, 10 Oct 2019 23:43:10 +0000 (08:43 +0900)]
Merge pull request #13749 from keszybz/pyparsing-2.4
Compatibility with pyparsing 2.4
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 12:44:35 +0000 (14:44 +0200)]
parse_hwdb: fix compatibility with pyparsing 2.4.*
pyparsing 2.3.1/2.4.0 had some changes to grouping of And matches, and as a
result we'd report 0 properties and 0 matches, and not really do any checks.
With this change we get identical behaviour for pyparsing 2.3.1, 2.4.0, 2.4.2:
$ hwdb/parse_hwdb.py
hwdb/60-evdev.hwdb: 72 match groups, 94 matches, 262 properties
hwdb/60-input-id.hwdb: 3 match groups, 3 matches, 4 properties
hwdb/60-keyboard.hwdb: 173 match groups, 256 matches, 872 properties
Keycode KBD_LCD_MENU1 unknown
Keycode KBD_LCD_MENU4 unknown
Keycode KBD_LCD_MENU2 unknown
Keycode KBD_LCD_MENU3 unknown
hwdb/60-sensor.hwdb: 101 match groups, 120 matches, 105 properties
hwdb/70-joystick.hwdb: 2 match groups, 3 matches, 2 properties
hwdb/70-mouse.hwdb: 104 match groups, 119 matches, 123 properties
hwdb/70-pointingstick.hwdb: 8 match groups, 30 matches, 11 properties
hwdb/70-touchpad.hwdb: 6 match groups, 9 matches, 6 properties
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 12:22:17 +0000 (14:22 +0200)]
parse_hwdb: process files in order
Also, make the pattern more general. There are some plans to add more files
there, let's make sure we don't miss them.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 12:21:26 +0000 (14:21 +0200)]
parse_hwdb: bail with an error if no matches or groups are detected
pyparsing sometimes changes behaviour and stops giving matches. This should
allow us to detect such scenario. With this change, parse_hwdb fails with
pyparsing 2.4 on F31.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 14:52:10 +0000 (16:52 +0200)]
Rename udev's hwdb/ to hwdb.d/
As in the parent commit, this makes the name consistent with the
rest of the source tree and the actuall installation path.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 14:43:18 +0000 (16:43 +0200)]
Rename udev's rules/ to rules.d/
This change is only about the source tree. We have tmpfiles.d/, modprobe.d/,
sysctl.d/, and sysusers.d/, but for historical reasons, rules/ didn't fit this
pattern. We also *install* it as rules.d/. Let's rename to be consistent.
Balint Reczey [Tue, 8 Oct 2019 14:41:24 +0000 (16:41 +0200)]
test: Pass personality test even when i686 userland runs on x86_64 kernel
Zbigniew Jędrzejewski-Szmek [Wed, 9 Oct 2019 10:04:42 +0000 (12:04 +0200)]
Merge pull request #13568 from ddstreet/ubuntu-ci-blacklists
test: add temporarily blacklisted tests
Yu Watanabe [Wed, 9 Oct 2019 06:01:45 +0000 (15:01 +0900)]
Merge pull request #13727 from keszybz/pstore-greedy-realloc
Use greedy realloc in pstore
Yu Watanabe [Wed, 9 Oct 2019 05:51:06 +0000 (14:51 +0900)]
Merge pull request #13753 from keszybz/change-man-ordering
Change section ordering to have commands above options
Hans de Goede [Mon, 23 Sep 2019 09:00:50 +0000 (11:00 +0200)]
hwdb: Update Primebook C11B sensor entry to also work with older BIOS versions
Older Primebook C11B BIOS versions use "Primebook C11B" as product name
instead of "PRIMEBOOK C11B", update the Primebook C11B 60-sensor.hwdb entries
to match on both spellings.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 16:19:59 +0000 (18:19 +0200)]
Highlight the synopsis and summary in --help
This doesn't cover all the binaries, but I don't know how to script
this, and I run out of steam ;)
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 16:00:45 +0000 (18:00 +0200)]
networkctl: add missing dots in --help
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 15:58:44 +0000 (17:58 +0200)]
Move the Commands section above Options section
For executables which take a verb, we should list the verbs first, and
then options which modify those verbs second. The general layout of
the man page is from general description to specific details, usually
Overview, Commands, Options, Return Value, Examples, References.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 13:39:28 +0000 (15:39 +0200)]
Merge pull request #13746 from keszybz/tests-reduce-boilerplate
Reduce test boilerplate
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 09:11:49 +0000 (11:11 +0200)]
test/TEST-31-DEVICE-ENUMERATION: do not use -x to avoid grep loop
https://github.com/systemd/systemd/pull/13746#issuecomment-
539410752:
> [grep] now matches the grep command itself, as it's logged into journal as well, thanks to set -x.
Also, use journalctl --grep and -t to make things a bit quicker.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 07:20:40 +0000 (09:20 +0200)]
Merge pull request #13632 from fbuihuu/ask-password-some-reworks
Ask password some reworks
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 07:10:12 +0000 (09:10 +0200)]
test: add function to reduce copied setup boilerplate
Many tests were also masking systemd-machined.service. But machined
should only start when activated, so having it not masked shouldn't be
noticable. TEST-25-IMPORT needs it.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Oct 2019 06:45:12 +0000 (08:45 +0200)]
test: drop redirection to tty in integration tests
I *think* this was originally added to make it easier to see what was happening
in tests. Later we added the functionality to print the journal on failure, so
this redirection has stopped being useful.
In https://github.com/systemd/systemd/pull/13719#issuecomment-
539292650
@filbranden shows that grep tries to write to stdout and fails. In general,
we should not assume that writing to the console it always possible. We have
special code to handle this in pid1 after all:
99 19:22:10.731965 fstat(1, <unfinished ...>
99 19:22:10.731993 <... fstat resumed>{st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
99 19:22:10.732070 write(1, "ExecStartPost={ path=/bin/echo ; argv[]=/bin/echo ${4_four_ex} ; ignore_errors=no ; start_time=[Mon 2019-10-07 19:22:10 PDT] ; stop_time=[Mon 209-10-07 19:22:10 PDT] ; pid=97 ; code=exited ; status=0 }\n", 203) = -1 EIO (Input/output error)
99 19:22:10.732174 write(2, "grep: ", 6) = -1 EIO (Input/output error)
99 19:22:10.732226 write(2, "write error", 11) = -1 EIO (Input/output error)
99 19:22:10.732263 write(2, ": Input/output error", 20) = -1 EIO (Input/output error)
99 19:22:10.732298 write(2, "\n", 1 <unfinished ...>
99 19:22:10.732325 <... write resumed>) = -1 EIO (Input/output error)
99 19:22:10.732349 exit_group(2) = ?
99 19:22:10.732424 +++ exited with 2 +++
Removing the redirection should make the tests less flakey.
Replaces #13719.
While at it, also drop NotifyAccess=all. I think it was added purposefully in
TEST-20-MAINPIDGAMES, and then cargo culted to newer tests.
Anita Zhang [Sat, 5 Oct 2019 01:14:19 +0000 (18:14 -0700)]
basic/set: const-ify set_first()
set_steal_first() is the version that modifies Set so this one should be
const.
Anita Zhang [Fri, 4 Oct 2019 23:03:04 +0000 (16:03 -0700)]
core: disallow using '-.service' as a service name
-.service.d will become a special top level drop in so don't let it be a
usable service name (otherwise the interaction gets complicated).
Tim Teichmann [Sun, 6 Oct 2019 15:59:53 +0000 (17:59 +0200)]
trivial: rename chromeos to chromiumos
Zbigniew Jędrzejewski-Szmek [Sun, 6 Oct 2019 17:05:57 +0000 (19:05 +0200)]
docs: fix inadvertent change in uid range
https://github.com/systemd/systemd/commit/
a305eda35f18fbacc771cc1582b688d60890a9d2#r35378755
Mario Limonciello [Sat, 5 Oct 2019 01:57:46 +0000 (20:57 -0500)]
trivial: update tools/chromeos/gen_autosuspend_rules.py
Adds CNP PCH xHCI device PCIID to udev rules
Tim Teichmann [Sat, 5 Oct 2019 13:52:37 +0000 (15:52 +0200)]
Add missing license file and information for tools/chromeos/gen_autosuspend_rules.py (#13729)
The license file for the python script that was commited with
b61d777abeecd8b6c76035e11899aae210633534 was missing. The license was copied from https://chromium.googlesource.com/chromiumos/platform2/+/master/LICENSE.
Franck Bui [Fri, 20 Sep 2019 13:13:48 +0000 (15:13 +0200)]
tty-ask-pwd-agent: move ask_password_plymouth() in ask-password-api.c
Franck Bui [Fri, 20 Sep 2019 13:07:31 +0000 (15:07 +0200)]
tty-ask-pwd-agent: small cleanup in process_one_password_file()
Split the part dealing which asks for password on tty in a dedicated function
making process_one_password_file() hopefully easier to read.
No functional changes.
Franck Bui [Thu, 19 Sep 2019 17:01:57 +0000 (19:01 +0200)]
tty-ask-pwd-agent: add a FIXME
Franck Bui [Thu, 19 Sep 2019 14:38:16 +0000 (16:38 +0200)]
tty-ask-pwd-agent: share the same init code for --query and --watch
Previously we would have skipped the init code which consists in setting the
signal handling up and the wall tty block thingie.
Franck Bui [Thu, 19 Sep 2019 13:24:15 +0000 (15:24 +0200)]
tty-ask-pwd-agent: treat SIGINT as a request to exit immediately
Unlike SIGTERM, SIGINT is now treated as a request to exit as soon as
possible. IOW, if SIGINT is received, the agent wont process all remaining
passwords before exiting.
This allows a more comprehensive behavior when C-c is pressed and when the
agent is spawned by systemctl.
Before that patch, pressing C-c killed systemctl but left the agent waiting
for a password since SIGINT was blocked. The result was pretty clumsy.
Franck Bui [Thu, 19 Sep 2019 13:18:18 +0000 (15:18 +0200)]
tty-ask-pwd-agent: give the possiblity to skip a password prompt
If multiple passwords are waiting the agent will prompt for each of them. Give
the possiblity to the user to skip some of them by pressing 'C-d'.
Franck Bui [Tue, 17 Sep 2019 10:30:31 +0000 (12:30 +0200)]
tty-ask-pwd-agent: minor simplification by using FOREACH_DIRENT instead of FOREACH_DIRENT_ALL
Franck Bui [Tue, 17 Sep 2019 09:16:52 +0000 (11:16 +0200)]
fs-util: introduce inotify_add_watch_and_warn() helper
The default message for ENOSPC is very misleading: it says that the disk is
filled, but in fact the inotify watch limit is the problem.
So let's introduce and use a wrapper that simply calls inotify_add_watch(2) and
which fixes the error message up in case ENOSPC is returned.
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2019 14:17:27 +0000 (16:17 +0200)]
pstore: rework memory handling for dmesg
Semmle Security Reports report:
> The problem occurs on the way realloc is being used. When a size
> bigger than the chunk that wants to be reallocated is passed, realloc
> try to malloc a bigger size, however in the case that malloc fails
> (for example, by forcing a big allocation) realloc will return NULL.
>
> According to the man page:
> "The realloc() function returns a pointer to the newly allocated
> memory, which is suitably aligned for any built-in type and may be
> different from ptr, or NULL if the request fails. If size was
> equal to 0, either NULL or a pointer suitable to be passed to free()
> is returned. If realloc() fails, the original block is left
> untouched; it is not freed or moved."
>
> The problem occurs when the memory ptr passed to the first argument of
> realloc is the same as the one used for the result, for example in
> this case:
>
> dmesg = realloc(dmesg, dmesg_size + strlen(pe->dirent.d_name) +
> strlen(":\n") + pe->content_size + 1);
>
> https://lgtm.com/projects/g/systemd/systemd/snapshot/
f8bcb81955f9e93a4787627e28f43fffb2a84836/files/src/pstore/pstore.c?sort=name&dir=A
> SC&mode=heatmap#L300
>
> If the malloc inside that realloc fails, then the original memory
> chunk will never be free but since realloc will return NULL, the
> pointer to that memory chunk will be lost and a memory leak will
> occur.
>
> In case you are curious, this is the query we used to find this problem:
> https://lgtm.com/query/
8650323308193591473/
Let's use a more standard pattern: allocate memory using greedy_realloc, and
instead of freeing it when we wrote out a chunk, let's just move the cursor
back to the beginning and reuse the memory we allocated previously.
If we fail to allocate the memory for dmesg contents, don't write the dmesg
entry, but let's still process the files to move them out of pstore.
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2019 14:14:47 +0000 (16:14 +0200)]
pstore: allow specifying src and dst dirs are arguments
This makes it much easier to debug the program as a normal user, since we
don't need to set up fake input under /sys/fs/pstore/.
Also, let's make the debug output a bit nicer.
Luca Boccassi [Fri, 4 Oct 2019 13:45:41 +0000 (14:45 +0100)]
portabled: allow to detach an image with a unit in linked-runtime state
This is necessary when a directory was attached with
--copy=symlink, otherwise detach will always fail.
Fixed #13725
Ryan Attard [Fri, 4 Oct 2019 12:52:49 +0000 (07:52 -0500)]
ata_id: Add check for fixed format sense codes (#13654)
Original revisions of the SAT (SCSI-ATA Translation) specification
required that all sense data be reported in Descriptor Format (72h).
Later revisions specifcally allow and account for sense data being
reported in Fixed Format (70h).
The current code checks for a Descriptor Format sense structure (0x72),
then looks specifically at the first byte of the first descriptor for the
ATA specific code 0x9, cross referencing it with the first byte which is
just a length field 0x0c (as a sanity check).
In the Fixed Format case(0x70), we can fall back to using the top-level
SCSI Sense data for the Additional Sense code (0x0) and then the
Additional Sense Code Qualifier (0x1d),
That identifies that the sense data is of the format associated with:
`ATA PASS THROUGH INFORMATION AVAILABLE`.
This fallback mechanism retains support for SATLs compliant with ANSI
INCITS 431-2007, and enables support for Fixed Format Sense data
enabled by SATLs with later revisions.
Glad to do so. This patch allows ata_id to export attributes correctly. I believe that any drive can potentially return information in this format on any SATL using the libata-scsi (the Linux builtin SATL), but in this particular case, it appears it is the SATL itself. Attaching the disk to the AHCI controller changes the behavior impacted here. (Not entirely surprisingly, SATLs are are pretty inconsistent).
Test:
This case specifically is an LSI SATL. I'll illustrate that without the patch, ata_id does not return
any output for a valid SATA drive but after the patch does.
1. Verify the device is ATA, by looking at the vpd page specific to ATA drives
```
root@machine:~# sg_vpd -p ai /dev/sdn
ATA information VPD page:
SAT Vendor identification: LSI
SAT Product identification: LSI SATL
SAT Product revision level: 0008
Device signature indicates SATA transport
ATA command IDENTIFY DEVICE response summary:
model: HGST HUH728080ALE604
serial number: ZZZZH3VX
firmware revision: A4GNW7J0
```
2. Look at what udev thinks of the disk, it says ID_BUS=scsi
ATA information says ID_MODEL should be HGST_HUH728080ALE604
udev says it is HGST_HUH728080AL (Missing E604, 4 bytes), and no ATA attributes are
populated.
```
root@machine:~# udevadm info -q all /dev/sdn
P: /devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn
N: sdn
S: disk/by-id/scsi-
35000cca23be1dc3c
S: disk/by-id/wwn-0x5000cca23be1dc3c
S: disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0
E: DEVLINKS=/dev/disk/by-id/wwn-0x5000cca23be1dc3c /dev/disk/by-id/scsi-
35000cca23be1dc3c /dev/disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0
E: DEVNAME=/dev/sdn
E: DEVPATH=/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn
E: DEVTYPE=disk
E: ID_BUS=scsi
E: ID_MODEL=HGST_HUH728080AL
E: ID_MODEL_ENC=HGST\x20HUH728080AL
E: ID_PATH=pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0
E: ID_PATH_TAG=pci-0000_05_00_0-sas-exp0x500605b0000272bf-phy11-lun-0
E: ID_REVISION=W7J0
E: ID_SCSI=1
E: ID_SCSI_SERIAL=ZZZZH3VX
E: ID_SERIAL=
35000cca23be1dc3c
E: ID_SERIAL_SHORT=
5000cca23be1dc3c
E: ID_TYPE=disk
E: ID_VENDOR=ATA
E: ID_VENDOR_ENC=ATA\x20\x20\x20\x20\x20
E: ID_WWN=0x5000cca23be1dc3c
E: ID_WWN_WITH_EXTENSION=0x5000cca23be1dc3c
E: MAJOR=8
E: MINOR=208
E: SUBSYSTEM=block
E: TAGS=:systemd:
```
3. Run ata_id (unpatched) (Outputs nothing, RC=2)
```
root@machine:~# strace -e ioctl /lib/udev/ata_id /dev/sdn -x
ioctl(3, SG_IO, {'Q', BSG_PROTOCOL_SCSI, BSG_SUB_PROTOCOL_SCSI_CMD, request[6]=[12, 00, 00, 00, 24, 00], request_tag=0, request_attr=0, request_priority=0, request_extra=0, max_response_len=32, dout_iovec_count=0, dout_xfer_len=0, din_iovec_count=0, din_xfer_len=36, timeout=30000, flags=0, usr_ptr=0, spare_in=0, dout[0]=NULL}) = -1 EINVAL (Invalid argument)
ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 00, 00, 00, 24, 00], mx_sb_len=32, iovec_count=0, dxfer_len=36, timeout=30000, flags=0, data[36]=[00, 00, 06, 12, 45, 00, 00, 02, 41, 54, 41, 20, 20, 20, 20, 20, 48, 47, 53, 54, 20, 48, 55, 48, 37, 32, 38, 30, 38, 30, 41, 4c, ...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=1, info=0}) = 0
ioctl(3, SG_IO, {'Q', BSG_PROTOCOL_SCSI, BSG_SUB_PROTOCOL_SCSI_CMD, request[12]=[a1, 08, 2e, 00, 01, 00, 00, 00, 00, ec, 00, 00], request_tag=0, request_attr=0, request_priority=0, request_extra=0, max_response_len=32, dout_iovec_count=0, dout_xfer_len=0, din_iovec_count=0, din_xfer_len=512, timeout=30000, flags=0, usr_ptr=0, spare_in=0, dout[0]=NULL}) = -1 EINVAL (Invalid argument)
ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[12]=[a1, 08, 2e, 00, 01, 00, 00, 00, 00, ec, 00, 00], mx_sb_len=32, iovec_count=0, dxfer_len=512, timeout=30000, flags=0, data[0]=[], status=02, masked_status=01, sb[18]=[70, 00, 01, 00, 00, 00, 00, 0a, 00, 00, 00, 00, 00, 1d, 00, 00, 00, 00], host_status=0, driver_status=0x8, resid=512, duration=0, info=0x1}) = 0
ioctl(3, HDIO_GET_IDENTITY, 0x7ffe408f7590) = -1 EINVAL (Invalid argument)
+++ exited with 2 +++
```
Sense buffers visible with the strace:
`sb[18]=[70, 00, 01, 00, 00, 00, 00, 0a, 00, 00, 00, 00, 00, 1d, 00, 00, 00, 00]` is the important bit, see 70, 0a and 1d bytes
4. Run patched version: model is HGST_HUH728080ALE604 as expected, ATA attributes are
correctly populated.
```
root@machine:~# ./ata_id /dev/sdn -x
ID_ATA=1
ID_TYPE=disk
ID_BUS=ata
ID_MODEL=HGST_HUH728080ALE604
ID_MODEL_ENC=HGST\x20HUH728080ALE604\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=A4GNW7J0
ID_SERIAL=HGST_HUH728080ALE604_ZZZZH3VX
ID_SERIAL_SHORT=ZZZZH3VX
ID_ATA_WRITE_CACHE=1
ID_ATA_WRITE_CACHE_ENABLED=1
ID_ATA_FEATURE_SET_HPA=1
ID_ATA_FEATURE_SET_HPA_ENABLED=1
ID_ATA_FEATURE_SET_PM=1
ID_ATA_FEATURE_SET_PM_ENABLED=1
ID_ATA_FEATURE_SET_SECURITY=1
ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=66522
ID_ATA_FEATURE_SET_SMART=1
ID_ATA_FEATURE_SET_SMART_ENABLED=1
ID_ATA_FEATURE_SET_PUIS=1
ID_ATA_FEATURE_SET_PUIS_ENABLED=0
ID_ATA_FEATURE_SET_APM=1
ID_ATA_FEATURE_SET_APM_ENABLED=1
ID_ATA_FEATURE_SET_APM_CURRENT_VALUE=254
ID_ATA_DOWNLOAD_MICROCODE=1
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN2=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_ATA_ROTATION_RATE_RPM=7200
ID_WWN=0x5000cca23be1dc3c
ID_WWN_WITH_EXTENSION=0x5000cca23be1dc3c
```
5. Drop it in place and verify: we see that ata_id does work.
```
root@hw1-b01left-2212a:~# udevadm test /block/sdn
<truncated>
GROUP 6 /lib/udev/rules.d/50-udev-default.rules:55
IMPORT 'ata_id --export /dev/sdn' /lib/udev/rules.d/60-persistent-storage.rules:33
starting 'ata_id --export /dev/sdn'
'ata_id --export /dev/sdn'(out) 'ID_ATA=1'
'ata_id --export /dev/sdn'(out) 'ID_TYPE=disk'
'ata_id --export /dev/sdn'(out) 'ID_BUS=ata'
'ata_id --export /dev/sdn'(out) 'ID_MODEL=HGST_HUH728080ALE604'
'ata_id --export /dev/sdn'(out) 'ID_MODEL_ENC=HGST\x20HUH728080ALE604\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'
'ata_id --export /dev/sdn'(out) 'ID_REVISION=A4GNW7J0'
'ata_id --export /dev/sdn'(out) 'ID_SERIAL=HGST_HUH728080ALE604_ZZZZH3VX'
'ata_id --export /dev/sdn'(out) 'ID_SERIAL_SHORT=ZZZZH3VX'
'ata_id --export /dev/sdn'(out) 'ID_ATA_WRITE_CACHE=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_WRITE_CACHE_ENABLED=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_HPA=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_HPA_ENABLED=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_PM=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_PM_ENABLED=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_SECURITY=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_SECURITY_ENABLED=0'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=66522'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_SMART=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_SMART_ENABLED=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_PUIS=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_PUIS_ENABLED=0'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_APM=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_APM_ENABLED=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_FEATURE_SET_APM_CURRENT_VALUE=254'
'ata_id --export /dev/sdn'(out) 'ID_ATA_DOWNLOAD_MICROCODE=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_SATA=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_SATA_SIGNAL_RATE_GEN2=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_SATA_SIGNAL_RATE_GEN1=1'
'ata_id --export /dev/sdn'(out) 'ID_ATA_ROTATION_RATE_RPM=7200'
'ata_id --export /dev/sdn'(out) 'ID_WWN=0x5000cca23be1dc3c'
'ata_id --export /dev/sdn'(out) 'ID_WWN_WITH_EXTENSION=0x5000cca23be1dc3c'
Process 'ata_id --export /dev/sdn' succeeded.
LINK 'disk/by-id/ata-HGST_HUH728080ALE604_ZZZZH3VX' /lib/udev/rules.d/60-persistent-storage.rules:47
IMPORT builtin 'path_id' /lib/udev/rules.d/60-persistent-storage.rules:65
LINK 'disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0' /lib/udev/rules.d/60-persistent-storage.rules:66
IMPORT builtin 'blkid' /lib/udev/rules.d/60-persistent-storage.rules:81
probe /dev/sdn raid offset=0
LINK 'disk/by-id/wwn-0x5000cca23be1dc3c' /lib/udev/rules.d/60-persistent-storage.rules:88
RUN '/usr/lib/python-dsnet-appliance/hotplug disk udev-disk-add' /etc/udev/rules.d/99-appliance-hotplug.rules:1
update old name, '/dev/disk/by-id/scsi-
35000cca23be1dc3c' no longer belonging to '/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn'
no reference left, remove '/dev/disk/by-id/scsi-
35000cca23be1dc3c'
handling device node '/dev/sdn', devnum=b8:208, mode=0660, uid=0, gid=6
preserve permissions /dev/sdn, 060660, uid=0, gid=6
preserve already existing symlink '/dev/block/8:208' to '../sdn'
creating link '/dev/disk/by-id/ata-HGST_HUH728080ALE604_ZZZZH3VX' to '/dev/sdn'
creating symlink '/dev/disk/by-id/ata-HGST_HUH728080ALE604_ZZZZH3VX' to '../../sdn'
found 'b8:208' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fwwn-0x5000cca23be1dc3c'
creating link '/dev/disk/by-id/wwn-0x5000cca23be1dc3c' to '/dev/sdn'
preserve already existing symlink '/dev/disk/by-id/wwn-0x5000cca23be1dc3c' to '../../sdn'
found 'b8:208' claiming '/run/udev/links/\x2fdisk\x2fby-path\x2fpci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0'
creating link '/dev/disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0' to '/dev/sdn'
preserve already existing symlink '/dev/disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0' to '../../sdn'
created db file '/run/udev/data/b8:208' for '/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn'
ACTION=add
DEVLINKS=/dev/disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0 /dev/disk/by-id/ata-HGST_HUH728080ALE604_ZZZZH3VX /dev/disk/by-id/wwn-0x5000cca23be1dc3c
DEVNAME=/dev/sdn
DEVPATH=/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn
DEVTYPE=disk
ID_ATA=1
ID_ATA_DOWNLOAD_MICROCODE=1
ID_ATA_FEATURE_SET_APM=1
ID_ATA_FEATURE_SET_APM_CURRENT_VALUE=254
ID_ATA_FEATURE_SET_APM_ENABLED=1
ID_ATA_FEATURE_SET_HPA=1
ID_ATA_FEATURE_SET_HPA_ENABLED=1
ID_ATA_FEATURE_SET_PM=1
ID_ATA_FEATURE_SET_PM_ENABLED=1
ID_ATA_FEATURE_SET_PUIS=1
ID_ATA_FEATURE_SET_PUIS_ENABLED=0
ID_ATA_FEATURE_SET_SECURITY=1
ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=66522
ID_ATA_FEATURE_SET_SMART=1
ID_ATA_FEATURE_SET_SMART_ENABLED=1
ID_ATA_ROTATION_RATE_RPM=7200
ID_ATA_SATA=1
ID_ATA_SATA_SIGNAL_RATE_GEN1=1
ID_ATA_SATA_SIGNAL_RATE_GEN2=1
ID_ATA_WRITE_CACHE=1
ID_ATA_WRITE_CACHE_ENABLED=1
ID_BUS=ata
ID_MODEL=HGST_HUH728080ALE604
ID_MODEL_ENC=HGST\x20HUH728080ALE604\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_PATH=pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0
ID_PATH_TAG=pci-0000_05_00_0-sas-exp0x500605b0000272bf-phy11-lun-0
ID_REVISION=A4GNW7J0
ID_SERIAL=HGST_HUH728080ALE604_ZZZZH3VX
ID_SERIAL_SHORT=ZZZZH3VX
ID_TYPE=disk
ID_WWN=0x5000cca23be1dc3c
ID_WWN_WITH_EXTENSION=0x5000cca23be1dc3c
MAJOR=8
MINOR=208
SUBSYSTEM=block
TAGS=:systemd:
USEC_INITIALIZED=6055690
run: '/usr/lib/python-dsnet-appliance/hotplug disk udev-disk-add'
Unload module index
Unloaded link configuration context.
```
6. Query just to double check: (ID_BUS=ata, model correct, etc).
```
root@machine:~# udevadm info /dev/sdn
P: /devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn
N: sdn
S: disk/by-id/ata-HGST_HUH728080ALE604_ZZZZH3VX
S: disk/by-id/wwn-0x5000cca23be1dc3c
S: disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0
E: DEVLINKS=/dev/disk/by-id/wwn-0x5000cca23be1dc3c /dev/disk/by-path/pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0 /dev/disk/by-id/ata-HGST_HUH728080ALE604_ZZZZH3VX
E: DEVNAME=/dev/sdn
E: DEVPATH=/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host2/port-2:0/expander-2:0/port-2:0:11/end_device-2:0:11/target2:0:11/2:0:11:0/block/sdn
E: DEVTYPE=disk
E: ID_ATA=1
E: ID_ATA_DOWNLOAD_MICROCODE=1
E: ID_ATA_FEATURE_SET_APM=1
E: ID_ATA_FEATURE_SET_APM_CURRENT_VALUE=254
E: ID_ATA_FEATURE_SET_APM_ENABLED=1
E: ID_ATA_FEATURE_SET_HPA=1
E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
E: ID_ATA_FEATURE_SET_PUIS=1
E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY=1
E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=66522
E: ID_ATA_FEATURE_SET_SMART=1
E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
E: ID_ATA_ROTATION_RATE_RPM=7200
E: ID_ATA_SATA=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E: ID_ATA_WRITE_CACHE=1
E: ID_ATA_WRITE_CACHE_ENABLED=1
E: ID_BUS=ata
E: ID_MODEL=HGST_HUH728080ALE604
E: ID_MODEL_ENC=HGST\x20HUH728080ALE604\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_PATH=pci-0000:05:00.0-sas-exp0x500605b0000272bf-phy11-lun-0
E: ID_PATH_TAG=pci-0000_05_00_0-sas-exp0x500605b0000272bf-phy11-lun-0
E: ID_REVISION=A4GNW7J0
E: ID_SERIAL=HGST_HUH728080ALE604_ZZZZH3VX
E: ID_SERIAL_SHORT=ZZZZH3VX
E: ID_TYPE=disk
E: ID_WWN=0x5000cca23be1dc3c
E: ID_WWN_WITH_EXTENSION=0x5000cca23be1dc3c
E: MAJOR=8
E: MINOR=208
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=6055690
```
If I install the same disk into a machine using an ATA driver, this behavior changes:
```
root@machine2:~# sg_vpd -p ai /dev/sdb
ATA information VPD page:
SAT Vendor identification: linux
SAT Product identification: libata
SAT Product revision level: 3.00
Device signature indicates SATA transport
ATA command IDENTIFY DEVICE response summary:
model: HGST HUH728080ALE604
serial number: ZZZZH3VX
firmware revision: A4GNW7J0
root@machine-2:~# /lib/udev/ata_id -x /dev/sdb
ID_ATA=1
ID_TYPE=disk
ID_BUS=ata
ID_MODEL=HGST_HUH728080ALE604
ID_MODEL_ENC=HGST\x20HUH728080ALE604\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
ID_REVISION=A4GNW7J0
<truncated>
```
Zbigniew Jędrzejewski-Szmek [Fri, 4 Oct 2019 09:59:06 +0000 (11:59 +0200)]
Merge pull request #13709 from zachsmith/systemd-tmpfiles-allow-append-to-file
systemd-tmpfiles: allow appending content to file
Balint Reczey [Fri, 27 Sep 2019 17:56:05 +0000 (19:56 +0200)]
test-execute: Filter /dev/.lxc in exec-dynamicuser-statedir.service
It appears in nested LXC containers and broke the test in Ubuntu CI.
BugLink: https://bugs.launchpad.net/bugs/1845337
crashfistfight [Thu, 3 Oct 2019 21:53:08 +0000 (23:53 +0200)]
added working volume buttons for medion erazer...
Mark Stosberg [Thu, 3 Oct 2019 20:26:42 +0000 (16:26 -0400)]
man: document updated newline support
Since v239 newlines have been allowed for PassEnvironment=
and EnvironmentFile=, due to #8471.
This PR documents the behavior change.
Mario Limonciello [Mon, 9 Sep 2019 21:49:35 +0000 (22:49 +0100)]
rules: Add automatic suspend udev rules
The ChromeOS ecosystem has a large amount of testing, both automated
and manual across devices including measurement of power regressions.
It's safe to assume that any of these devices will handle USB
auto-suspend appropriately. Use the script from ChromeOS
https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/udev/gen_autosuspend_rules.py
to generate udev rules at build time.
This script in systemd `tools/chromeos/gen_autosuspend_rules.py` should be kept
in sync with the ChromeOS version of the script.
Manually added autosuspend devices should be placed in the new
template `rules/61-autosuspend-manual.rules`
Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Kevin Kuehler [Sat, 14 Sep 2019 08:39:28 +0000 (01:39 -0700)]
systemctl: Default suffixes for timer and socket
* use .timer suffix by default for systemctl list-timers
* use .socket suffix by default for systemctl list-sockets
Franck Bui [Tue, 17 Sep 2019 09:03:04 +0000 (11:03 +0200)]
tty-ask-pwd-agent: rename watch_passwords() and show_passwords()
Those names were a bit confusing both functions process password files the
former relies one the later and waits for new files.
Also show_passwords() was not only used to list password files/requests but
also to query the user.
No functional changes.