Zbigniew Jędrzejewski-Szmek
ea03f6ba0d
sd-id128: return -ENOMEDIUM on null id
...
We currently return -ENOMEDIUM when /etc/machine-id is empty, and -EINVAL when
it is all zeros. But -EINVAL is also used for invalid args. The distinction
between empty and all-zero is not very important, let's use the same return
code.
Also document -ENOENT and -ENOMEDIUM since they can be a bit surprising.
2018-05-31 13:04:18 +02:00
Zbigniew Jędrzejewski-Szmek
63e2ebcdaa
fuzz-journal-remote: allow fuzzer to be built without µhttpd
...
journal-remote still requires µhttpd, but things are easier if the fuzzer
can be built without.
2018-05-31 13:04:18 +02:00
Zbigniew Jędrzejewski-Szmek
40c10d3f00
shared/dissect-image: avoid warning about unused function when compiled w/o blkid
2018-05-31 13:04:18 +02:00
Zbigniew Jędrzejewski-Szmek
757ed4fd2e
log-generator: make message size configurable, add short options
...
Also remove "b''" from the generated MESSAGE= field.
2018-05-31 13:04:18 +02:00
Zbigniew Jędrzejewski-Szmek
864876ec0f
journal-remote: export handle_raw_source()
2018-05-31 13:04:18 +02:00
Zbigniew Jędrzejewski-Szmek
c064d8db40
journal-remote: split out µhttpd support and main() into a separate file
...
This is in preparation to reusing the RemoteServer in other concepts.
I tried to keep changes to minimum:
- arg_* global variables are now passed as state in RemoteServer
- exported functions get the "journal_remote_" prefix
- some variables are renamed
In particular, there is an ugly global RemoveServer* variable. It was originally
added because µhttpd did not allow state to be passed to the callbacks. I'm not
sure if this has been remediated in µhttpd, but either way, this is not changed
here, the global variable is only renamed for clarity.
2018-05-31 13:04:18 +02:00
Zbigniew Jędrzejewski-Szmek
5d889c1365
journal: rewrap function args
2018-05-31 13:04:18 +02:00
Lennart Poettering
9554591d45
tree-wide: drop some double newlines
2018-05-31 12:19:34 +02:00
Lennart Poettering
2f0726c08f
coccinelle says we should use EOPNOTSUPP rather than ENOTSUP
2018-05-31 12:06:54 +02:00
Lennart Poettering
b3c66c4497
portablectl: no need to validate profile name before checking whether it is 'help'
2018-05-31 12:06:37 +02:00
Lennart Poettering
f524522bde
portablectl: support 'help' parameter on --copy=
2018-05-31 12:06:12 +02:00
Lennart Poettering
21cffed715
portablectl: don't join strv if we don't want to display it
2018-05-31 12:05:53 +02:00
Lennart Poettering
810aa42575
portablectl: coccinelle says we should use TAKE_PTR() here, do so
2018-05-31 12:05:20 +02:00
Lennart Poettering
669fc4e5c5
tree-wide: some O_NDELAY → O_NONBLOCK fixes
...
Somehow the coccinelle script misses these, hence fix them manually.
2018-05-31 12:04:39 +02:00
Lennart Poettering
642b59ff40
Merge pull request #9115 from yuwata/rfe-8491
...
locale: re-read configuration files if necessary
2018-05-31 11:54:01 +02:00
Lennart Poettering
309ee4c26c
Merge pull request #9144 from yuwata/sysusers-spec
...
sysusers: support specifier expansion for GECOS and home directory
2018-05-31 11:41:29 +02:00
Lennart Poettering
49f733c053
Merge pull request #9131 from poettering/memory-startswith
...
add new memory_startswith() helper and make use of it everywhere
2018-05-31 11:21:43 +02:00
Lennart Poettering
4a0dbb8129
Merge pull request #9083 from yuwata/empty-assignment
...
load-fragment: make many settings accept empty string
2018-05-31 11:13:52 +02:00
Yu Watanabe
4156e767f6
locale: assume locale is for LANG= when variable name is not specified
...
Closes #6070 .
2018-05-31 17:57:41 +09:00
Lennart Poettering
6696e2a631
smack: make mac_smack_fix() deal somewhat sensible with non-absolute paths
...
This tries to improve the mac_smack_fix() logic a bit, by properly
handling non-absolute paths.
It's still pretty broken though, which is sad for security technology:
non-normalized paths (for example "/usr/../dev/sda") will still not be
treated correctly. I am not sure how to fix that properly though, and I
don't understand SMACK well enough to do so. This fix hence just fixes
to most obvious glaring issue.
2018-05-31 10:50:50 +02:00
Lennart Poettering
a8d1b2422d
Merge pull request #9142 from yuwata/coverity-fixes
...
Coverity fixes
2018-05-31 10:50:10 +02:00
Yu Watanabe
b613b01920
doc: update TODO
2018-05-31 17:39:13 +09:00
Yu Watanabe
33ab22fcb9
man: mention that systemd-sysusers understand the specifier.
2018-05-31 17:37:57 +09:00
Yu Watanabe
b8bed70068
sysusers: support specifier expansion for GECOS and home directory fields
2018-05-31 17:36:22 +09:00
Yu Watanabe
df4fd2c757
locale: re-read configuration files if changed
...
Closes #8491 .
2018-05-31 16:24:45 +09:00
Yu Watanabe
6a837b035f
locale: use _cleanup_free_ and free_and_replace
2018-05-31 16:17:18 +09:00
Yu Watanabe
fe28d88746
locale: check xkb data before requesting authentication
2018-05-31 16:16:25 +09:00
Yu Watanabe
b47ff73b18
locale: return earlier if no operation will be done
2018-05-31 16:15:21 +09:00
Yu Watanabe
17ee3d72da
load-fragment: use free_and_replace()
2018-05-31 13:27:06 +09:00
Yu Watanabe
3c381a671f
load-fragment: add missing oom check
...
Fixes CID#1391379.
2018-05-31 13:26:27 +09:00
Yu Watanabe
66c9dfdddc
portable: fix memleak
...
Fixes CID#1391382.
2018-05-31 13:16:51 +09:00
Yu Watanabe
7be9df7d4a
core/socket: fix coding style
2018-05-31 11:09:41 +09:00
Yu Watanabe
535775805a
load-fragment: move macro-defined config parsers
2018-05-31 11:09:41 +09:00
Yu Watanabe
984faf29da
load-fragment: use DEFINE_CONFIG_PARSE_*() macros
2018-05-31 11:09:41 +09:00
Yu Watanabe
e405b67d23
load-fragment: make IPTOS= accept the empty string
2018-05-31 11:09:41 +09:00
Yu Watanabe
00463fbf0d
load-fragment: make SocketProtocol= accept the empty string
2018-05-31 11:09:41 +09:00
Yu Watanabe
fa65c28176
namespace: rename parse_protect_{home,system}_or_bool() to protect_{home,system}_or_bool_to_string()
...
Hence, we can define config_parse_protect_{home,system}() by using
DEFINE_CONFIG_PARSE_ENUM() macro.
2018-05-31 11:09:41 +09:00
Yu Watanabe
b54e98ef8e
socket-util: rename parse_socket_address_bind_ipv6_only_or_bool() to socket_address_bind_ipv6_only_or_bool_from_string()
...
Hence, we can define config_parse_socket_bind() by using
DEFINE_CONFIG_PARSE_ENUM() macro.
2018-05-31 11:09:41 +09:00
Yu Watanabe
2d1729ca3f
conf-parser: introduce DEFINE_CONFIG_PARSE*() macros
...
This introduces several macros for defining config parsers.
Also this fixes errno in DEFINE_CONFIG_PARSE_ENUM() and _ENUMV()
and makes the log level lower when a duplicated item is
specified to the settings parsed by the function defined by
DEFINE_CONFIG_PARSE_ENUMV().
2018-05-31 11:09:41 +09:00
Yu Watanabe
0a9e363870
load-fragment: drop config_parse_no_new_privileges() and use config_parse_bool() instead
2018-05-31 11:09:41 +09:00
Yu Watanabe
862fcffd9c
load-fragment: make WorkingDirectory= accept the empty string
2018-05-31 11:09:41 +09:00
Yu Watanabe
fb27be3f60
load-fragment: use parse_sec_fix_0() instead of updating the value later
2018-05-31 11:09:41 +09:00
Yu Watanabe
6c58305ac3
load-fragment: use config_parse_sec_fix_0() for TimeoutStopSec=
2018-05-31 11:09:41 +09:00
Yu Watanabe
71e270150f
load-fragment: always include config_parse_warn_compat() in the table used by unit_dump_config_items()
2018-05-31 11:09:41 +09:00
Yu Watanabe
47544ea1cb
load-fragment: drop unused function config_parse_sysv_priority()
2018-05-31 11:09:41 +09:00
Yu Watanabe
b00e1a9e2a
load-fragment: make CPUSchedulingPolicy= accept the empty string
2018-05-31 11:09:41 +09:00
Yu Watanabe
617d253afa
load-fragment: make IOScheduling{Class,Priority}= accept the empty string
2018-05-31 11:09:41 +09:00
Yu Watanabe
de5e6038ca
load-fragment: setting empty string to Nice= resets the previous assignments
2018-05-31 11:09:41 +09:00
Jared Kazimir
18944130b0
hwdb: consolidate multiple razer evdev sections
2018-05-31 00:59:07 +02:00
Lennart Poettering
4afae2a820
Merge pull request #9132 from poettering/sd-bus-slot-set-floating
...
make sure we don't leak bus slots when sd_bus_add_match_async() is used
2018-05-31 00:58:41 +02:00