Yu Watanabe
f023184e6d
wait-online: support $REQUIRED_OPER_STATE_FOR_ONLINE= in state file
...
This also make wait-online optionally take operstate in -i option,
and adds '--operstate' option to wait-online which also takes operstate.
Also, this contains huge refactoring for wait-online.
2019-03-13 14:29:03 +09:00
Yu Watanabe
22eab27caa
sd-network: add sd_network_link_get_required_operstate_for_online()
...
It reads $REQUIRED_OPER_STATE_FOR_ONLINE in serialized link data.
2019-03-13 14:29:03 +09:00
Yu Watanabe
4ac77d63e9
network: make RequiredForOnline= also take operational state
...
This will be used by systemd-networkd-wait-online.
2019-03-13 14:29:03 +09:00
Yu Watanabe
f9974167e4
hashmap: add hashmap_free_free_keyp and friend
2019-03-13 14:29:03 +09:00
Yu Watanabe
c9cc038343
network: introduce 'degraded-carrier' operstate to order all states
...
Previously, 'degraded' state is ambiguous for bonding or bridge master:
1. one or more slave interfaces does not have carrier,
2. no link local address is assigned to the master,
3. combination of the above two.
This makes the above case 1 and 3 are in the new 'degraded-carrier'
state, and makes 'degraded' state as all slaves are active but no
link local address on master.
2019-03-13 14:29:00 +09:00
Yu Watanabe
2cd6b9326c
network: move LinkOperationalState and relevant functions to network-util.[ch]
2019-03-13 14:28:38 +09:00
Lennart Poettering
f3b5c814ab
login: drop redundant newline
2019-03-12 16:10:55 +01:00
Lennart Poettering
b2a3953f81
user-util: extra paranoia, make sure $SHELL can't be fucked with in suid programs
...
It's better to be safe than sorry, let's not allow overriding of the
user shell in suid binaries. Similar for $USER.
2019-03-12 16:10:55 +01:00
Lennart Poettering
9e73208afc
execute: no need to synthesize $HOME for uid==0 again, get_home_dir() already does that
2019-03-12 16:10:55 +01:00
Lennart Poettering
7bbead1d0b
execute: simplify paths we set as HOME/SHELL for invoked programs
2019-03-12 16:10:55 +01:00
Lennart Poettering
db246781a0
user-util: simplify paths retrieved from $HOME and $SHELL
...
Let's add some extra paranoia, after #11910
2019-03-12 16:10:55 +01:00
Lennart Poettering
d575f88bbe
user-util: be more strict when reading $HOME and $SHELL
2019-03-12 16:10:55 +01:00
Lennart Poettering
47436d30bb
user-util: paranoia — add overflow check on ERANGE loop
2019-03-12 16:10:55 +01:00
Lennart Poettering
11de56b9fa
user-util: use SYNTHETIC_ERRNO() where we can
2019-03-12 16:08:57 +01:00
Lennart Poettering
0b78b1370c
path-util: minimize variable scope
2019-03-12 16:08:57 +01:00
Lennart Poettering
458e60b3a9
path-util: check validity before normalization in path_simplify_and_warn()
...
As the normalization check includes a validation check the order
matters.
2019-03-12 16:08:57 +01:00
Lennart Poettering
71ae7b576c
user-util: filter out invalid user record data a bit more thorougly
2019-03-12 16:08:57 +01:00
Lennart Poettering
cd13d971dc
logind: normalize home path when creating user object
...
Triggered by: #11910
2019-03-12 16:08:57 +01:00
Zbigniew Jędrzejewski-Szmek
f5164dfebc
Merge pull request #11964 from mrc0mmand/even-more-fuzzers
...
fuzz: add fuzzers for calendar & time expressions
2019-03-12 15:08:20 +01:00
Zbigniew Jędrzejewski-Szmek
fb6692ed33
Merge pull request #11927 from poettering/network-namespace-path
...
Add NetworkNamespacePath= to unit files
2019-03-12 14:29:14 +01:00
Zbigniew Jędrzejewski-Szmek
ec637f309f
Merge pull request #11943 from yuwata/device-action-seqnum-cleanups
...
sd-device: store parsed SEQNUM and ACTION string
2019-03-12 13:17:33 +01:00
Frantisek Sumsal
55a365cb74
fuzz: add a fuzzer for time utils
2019-03-12 12:04:25 +01:00
Frantisek Sumsal
415b3f0bb2
fuzz: add a fuzzer for calendarspec
2019-03-12 11:57:09 +01:00
Yu Watanabe
1f682e243f
udev: fix memleak in 'udevadm trigger --settle'
...
Fixes #11966 .
2019-03-12 09:15:02 +01:00
Lennart Poettering
995cbd72b2
efivars: make sure efi_loader_entry_name_valid() is always compiled in
...
The string validation should always be done correctly, and not fail just
because EFI is turned off. After all an EFI loader entry name string
remains properly formatted regardless if EFI is on or off...
Fixes : #11948
2019-03-11 21:12:23 +01:00
Yu Watanabe
40769ccc73
libudev: use device_get_seqnum() and device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
91bd2c349b
login: use device_is_in_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a7f95575b1
network: use device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a7395c867e
core/device: use device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a12b87f59c
udevadm-test: check action string earlier
...
The string will be checked later in device_new_from_synthetic_event(),
but let's check it earlier in parse_argv().
2019-03-12 03:49:53 +09:00
Yu Watanabe
2c18a85400
udevadm: use device_get_action()
2019-03-12 03:49:53 +09:00
Yu Watanabe
7a2093236b
udev: refuse to modify SEQNUM by udev rules
2019-03-12 03:49:53 +09:00
Yu Watanabe
d4d690facd
udevd: use device_get_action() and device_get_seqnum()
2019-03-12 03:49:53 +09:00
Yu Watanabe
a707c65b70
util: introduce device_for_action()
...
It will be used in later commits.
2019-03-12 03:49:53 +09:00
Yu Watanabe
5ebd3fc3c1
sd-device: store parsed ACTION= and SEQNUM= udev properties
2019-03-12 03:49:53 +09:00
Lennart Poettering
35d3a35e56
Merge pull request #11960 from mrc0mmand/more-fuzzers
...
fuzz: introduce more fuzzers
2019-03-11 18:04:22 +01:00
Clemens Gruber
c423be28a0
network: introduce TripleSampling= option in CAN section
...
When enabled, three samples are used to determine the value of a
received bit by majority rule.
This patch adds support for the TripleSampling= option in the [CAN]
section of .network files.
2019-03-11 17:15:47 +01:00
Zbigniew Jędrzejewski-Szmek
0e636bf51a
nspawn: fix memleak uncovered by fuzzer
...
Also use TAKE_PTR as appropriate.
2019-03-11 14:29:30 +01:00
Frantisek Sumsal
b5b499b32c
fuzz: add nspawn-settings fuzzer
2019-03-11 14:13:00 +01:00
Frantisek Sumsal
04ddab1462
fuzz: add hostname-util fuzzer
2019-03-11 14:12:06 +01:00
Frantisek Sumsal
18d51b4509
fuzz: add env-file fuzzer
2019-03-11 14:11:28 +01:00
Yu Watanabe
3a6797f19f
machinectl: do not format size if freed disk space is "-1"
...
Closes #11941 .
2019-03-11 14:04:16 +01:00
Yu Watanabe
a289dfd69b
journal-remote: do not request Content-Length if Transfer-Encoding is chunked
...
This fixes a bug introduced by 7fdb237f54 .
Closes #11571 .
2019-03-11 13:52:10 +01:00
Frantisek Sumsal
e5f274bee1
fuzz: add bus-label fuzzer
2019-03-11 13:00:32 +01:00
Yu Watanabe
0a8321d33c
import: do not try to set selinux related attributes if selinux is disabled
...
Closes #11940 .
2019-03-11 10:59:13 +01:00
Yu Watanabe
7750b79695
network: update logs
2019-03-11 08:10:50 +01:00
Lennart Poettering
4cea310fc7
execute: remove one aa profile output from context dump
...
The same data is output a few lines further up already, drop one.
2019-03-11 11:05:22 +09:00
Vesa Jääskeläinen
ab212633d4
Fix compilation without EFI being enabled
...
If EFI is disabled compilation can fail with:
../src/login/logind-dbus.c: In function ‘property_get_reboot_to_boot_loader_entry’:
../src/login/logind-dbus.c:2772:29: error: implicit declaration of function ‘efi_loader_entry_name_valid’; did you mean ‘efi_loader_get_features’? [-Werror=implicit-function-declaration]
} else if (!efi_loader_entry_name_valid(v)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~
efi_loader_get_features
../src/login/logind-dbus.c:2772:29: warning: nested extern declaration of ‘efi_loader_entry_name_valid’ [-Wnested-externs]
This adds stub for efi_loader_entry_name_valid() to enable compilation.
2019-03-11 10:48:49 +09:00
Yu Watanabe
49942d6b1e
timedate: fix emitted value when ntp client is enabled/disabled ( #11951 )
...
This fixes a regression originall caused by cf3872bd2 and
triggered by b4356b5720 .
Fixes #11944
2019-03-10 20:44:21 +01:00
Yu Watanabe
b459700b98
core: simplify and check validity of paths for RequiresMountsFor=
...
Prompted by #11910 .
2019-03-08 15:48:34 +01:00