Lennart Poettering
3cca6cfd41
Merge pull request #11893 from yuwata/wait-online-take-operstate
...
wait-online: optionally take required minimum operational state
2019-03-13 10:10:43 +01:00
Lennart Poettering
58fa7019a5
Merge pull request #11283 from yuwata/fix-11276
...
core/namespace: introduce new mount mode READWRITE_IMPLICIT
2019-03-13 09:57:18 +01:00
Yu Watanabe
2c65512ee7
cryptsetup: add same-cpu-crypt and submit-from-crypt-cpus options
...
Closes #11946 .
2019-03-13 09:48:50 +01:00
Lennart Poettering
05044ebff9
Merge pull request #11933 from keszybz/coverity
...
Minor tweaks to boot/efi code inspired by coverity
2019-03-13 09:36:57 +01:00
Yu Watanabe
07e1ffe4ae
wait-online: use log_link_debug() or friends
2019-03-13 14:29:03 +09:00
Yu Watanabe
e67ae9f5e6
network: move log_link_debug() or friends to log-link.h
2019-03-13 14:29:03 +09:00
Yu Watanabe
8d6082e4dd
man: update wait-online and RequiredForOnline= setting
2019-03-13 14:29:03 +09:00
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
Yu Watanabe
4ddbf08cfd
test-network: wait more and fix wrong operational state
...
Closes #11977 .
2019-03-13 14:27:39 +09:00
Yu Watanabe
7e46b29bd3
test: add a testcase for ProtectHome=tmpfs vs ProtectSystem=strict
2019-03-13 11:53:59 +09:00
Yu Watanabe
5beb8688e0
core/namespace: logs mount mode when the entry is dropped
2019-03-13 11:53:22 +09:00
Yu Watanabe
1e05071d27
core/namespace: introduce new mount mode READWRITE_IMPLICIT
...
ProtectSystem=strict or ProtectKernelTunable=yes create implicit
read-write mounts, but they are not overridable by TemporaryFileSystem=.
This makes such implicit read-write mounts use the new mount mode.
So, they can be override by TemproraryFileSystem= now.
A typical usecase is that ProtectSystem=strict and ProtectHome=tmpfs.
Fixes #11276 .
2019-03-13 11:51:09 +09:00
Lennart Poettering
fbaefc3ff9
Merge pull request #11919 from poettering/login-simplify
...
various fixes to $HOME and $SHELL validation
2019-03-12 18:33:14 +01:00
Lennart Poettering
f3ae265f5c
update TODO
2019-03-12 16:10:55 +01: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
Davide Cavalca
1485aacb16
meson: scope more git invocations with current_source_dir()
2019-03-12 15:01:47 +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
Sylvain Plantefève
461c92f5ab
po: update French translation
2019-03-12 13:54:29 +01:00
Zbigniew Jędrzejewski-Szmek
388d2993ec
shared/bootspec: avoid going through -1 when calculating array index
...
Coverity was complaining in CID#1399407 that config->entries might be used
while NULL. Let's add an assert to make sure it's not.
Also, let's quit early if we have no entries to loop through. The code was
not incorrect, but it's cleaner to avoid any negative indices.
2019-03-12 13:32:45 +01:00
Zbigniew Jędrzejewski-Szmek
7a2cb0228c
boot: avoid 32-bit calculation for a 64-bit lvalue
...
Coverity CID#1399116:
> Potentially overflowing expression
> gpt_header_buffer.gpt_header.SizeOfPartitionEntry * gpt_header_buffer.gpt_header.NumberOfPartitionEntries
> with type unsigned int (32 bits, unsigned) is evaluated using 32-bit
> arithmetic, and then used in a context that expects an expression of type
> UINTN (64 bits, unsigned).
Let's import the ALIGN_TO macro to sd-boot and use it to avoid the issue.
2019-03-12 13:32:45 +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
ca66b69d5b
bash-completion: also suggest units in reloading or activating
...
Closes #11942 .
2019-03-12 11:25:26 +01:00
Zbigniew Jędrzejewski-Szmek
a729e42d4b
Merge pull request #11897 from mrc0mmand/parallelize-TEST-24-UNIT-TESTS
...
test: parallelize tasks in TEST-24-UNIT-TESTS
2019-03-12 11:21:06 +01:00
Evgeny Vereshchagin
7ba5ded9db
lgtm: replace the query used for looking for fgets with a more general query
...
to make it easier to comlain about `strtok` :-)
Inspired by https://github.com/systemd/systemd/pull/11963 , which, in turn,
was prompted by https://github.com/systemd/systemd/pull/11555 .
2019-03-12 10:08:23 +01:00
Yu Watanabe
1f682e243f
udev: fix memleak in 'udevadm trigger --settle'
...
Fixes #11966 .
2019-03-12 09:15:02 +01:00
Yu Watanabe
7905e6d70e
test: wait for a while active state of .device is updated
2019-03-12 09:49:58 +09: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