Yu Watanabe
a4a90e65c7
cryptsetup-generator: define main through macro
2018-12-02 12:18:54 +01:00
Yu Watanabe
f1bcdd0590
sd-bus: introduce track_item_hash_ops and use it
2018-12-02 12:18:49 +01:00
Yu Watanabe
6121fc3059
dhcp: introduce dhcp_lease_hash_ops and use it
2018-12-02 12:17:28 +01:00
Yu Watanabe
5f5b612203
cgtop: use SWAP_TWO() macro
2018-12-02 12:06:07 +01:00
Yu Watanabe
fb8d181e59
cgtop: introduce group_hash_ops and use it
2018-12-02 12:06:02 +01:00
Yu Watanabe
98233ee5e0
test: add tests for destructors of hashmap or set
2018-12-02 12:05:16 +01:00
Yu Watanabe
59a5cda7b9
hash-func: add destructors for key and value
...
If they are set, then they are called in hashmap_clear() or
hashmap_free().
2018-12-02 11:59:07 +01:00
Yu Watanabe
7a08d314f2
tree-wide: make hash_ops typesafe
2018-12-02 07:53:27 +01:00
Yu Watanabe
25073e5012
hash-funcs: make basic hash_ops typesafe
2018-12-02 07:48:29 +01:00
Yu Watanabe
d1005d1c00
hash-funcs: introduce macro to create typesafe hash_ops
2018-12-02 07:48:12 +01:00
Yu Watanabe
e30f9c972b
util: define free_func_t
2018-12-02 06:34:25 +01:00
Yu Watanabe
ee05335f43
hashmap: fix minor coding style issue
2018-12-02 06:34:25 +01:00
Yu Watanabe
302a796f5a
network: use typesafe netlink_call_async() macro where applicable
2018-12-02 06:29:32 +01:00
Yu Watanabe
10ff4eb621
network: rename ndisc_route_handler() to ndisc_netlink_message_handler()
...
As it is also called when configuring addresses.
2018-12-02 06:28:44 +01:00
Yu Watanabe
bd1175bc46
network: add assertions
...
As they do not have default callback functions.
2018-12-02 06:23:45 +01:00
Yu Watanabe
4645ad47ac
network: use route_remove_handler() as the default callback of route_remove()
2018-12-02 06:23:45 +01:00
Yu Watanabe
63ae056909
network: use address_remove_handler() as the default callback of address_remove()
2018-12-02 06:23:45 +01:00
Yu Watanabe
29889b4d24
network: set default callbacks for routing_policy_rule_configure() and routing_policy_rule_remove()
2018-12-02 06:23:45 +01:00
Yu Watanabe
cccf9517f1
network: move address_label_handler() to networkd-address-label.c
...
And use it as the default callback function of address_label_configure().
2018-12-02 06:23:45 +01:00
Yu Watanabe
a9eea6065c
network: simplify dhcp6_get_prefix_delegation()
2018-12-02 06:23:45 +01:00
Yu Watanabe
3365841384
netlink: add typesafe netlink functions
2018-12-02 06:23:40 +01:00
Yu Watanabe
1e26b1dfc7
macro: introduce DEFINE_TRIVIAL_DESTRUCTOR() macro
2018-12-02 06:21:11 +01:00
Yu Watanabe
deae09ccc5
libsystemd: introduce _sd_destroy_t
2018-12-02 06:21:11 +01:00
Yu Watanabe
d2b42d63c4
core,run: make SocketProtocol= accept protocol name in upper case an protocol number
2018-12-02 06:13:47 +01:00
Yu Watanabe
3a269dcf51
network: make IPProtocol= also accept IP protocol number
2018-12-02 06:13:47 +01:00
Yu Watanabe
97f9df9e30
network: rename Protocol= in [RoutingPolicyRule] to IPProtocol=
2018-12-02 06:13:47 +01:00
Yu Watanabe
dca2309108
test: add tests for ip_protocol_{from,to}_name()
2018-12-02 06:13:47 +01:00
Yu Watanabe
0667a0c497
util: introduce parse_ip_protocol()
...
Not only protocol name in lower case, but it optionally accepts
IP protocol name in upper case and IP protocol number.
2018-12-02 06:13:41 +01:00
Yu Watanabe
cedfe0b02b
util: cast smaller type to large type
2018-12-02 05:58:18 +01:00
Yu Watanabe
da96ad5ae2
util: rename socket_protocol_{from,to}_name() to ip_protocol_{from,to}_name()
2018-12-02 05:48:27 +01:00
Lennart Poettering
5dd9527883
tree-wide: remove various unused functions
...
All found with "cppcheck --enable=unusedFunction".
2018-12-02 13:35:34 +09:00
Evgeny Vereshchagin
c26ae3013d
Merge pull request #11013 from evverx/travis-clang
...
travis: also build systemd with clang
2018-12-02 03:54:21 +03:00
Susant Sahani
58a02e4c97
ip rule: fix clang warning.
...
```
[2/1209] Compiling C object 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o'.
FAILED: src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o
clang -Isrc/network/src@network@@networkd-core@sta -Isrc/network -I../src/network -Isrc/basic -I../src/basic -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -Isrc/libsystemd-network -I../src/libsystemd-network -I. -I../ -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=gnu99 -O0 -g -Wextra -Werror=undef -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Wdate-time -Wnested-externs -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-error=nonnull -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -fPIE -Wno-typedef-redefinition -Wno-gnu-variable-sized-type-not-at-end -Werror=shadow -include config.h -fPIC -MD -MQ 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o' -MF 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o.d' -o 'src/network/src@network@@networkd-core@sta/networkd-routing-policy-rule.c.o' -c ../src/network/networkd-routing-policy-rule.c
../src/network/networkd-routing-policy-rule.c:1071:33: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->sport.start, rule->sport.end);
^~~~~~~~~~~~~~~~~
../src/network/networkd-routing-policy-rule.c:1071:52: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->sport.start, rule->sport.end);
^~~~~~~~~~~~~~~
../src/network/networkd-routing-policy-rule.c:1078:33: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->dport.start, rule->dport.end);
^~~~~~~~~~~~~~~~~
../src/network/networkd-routing-policy-rule.c:1078:52: error: format specifies type 'unsigned char' but the argument has type '__u16' (aka 'unsigned short') [-Werror,-Wformat]
rule->dport.start, rule->dport.end);
^~~~~~~~~~~~~~~
4 errors generated.
```
2018-12-01 15:45:12 +01:00
Lennart Poettering
67e2ea1542
cgroup: suffix unit file settings with "=" in log output
...
Let's follow our recommendations from CODING_STYLE and suffix unit file
settings with "=" everywhere.
2018-12-01 12:57:51 +01:00
Lennart Poettering
be2c032781
core: don't try to write CPU quota and memory limit cgroup attrs on root cgroup
...
In the kernel sources attempts to write to either are refused with
EINVAL. Not sure why these attributes are exported anyway on cgroupsv1,
but this means we really should ignore them altogether.
This simplifies our code as this means cgroupsv1 is more alike cgroupsv2
in this regard.
Fixes : #10969
2018-12-01 12:57:51 +01:00
Aleksei Timofeyev
09e5c07fbd
resolved: add missed io-util.h header to resolved-dnstls-openssl.c
...
Regression after commit 5cfa2c3dc0
2018-12-01 12:49:01 +01:00
Evgeny Vereshchagin
37cbcd4642
travis: also build systemd with clang
2018-12-01 04:53:11 +01:00
Evgeny Vereshchagin
f5e75e08b0
travis: use latest instead of rawhide
2018-12-01 06:45:45 +03:00
Lennart Poettering
2c8f15aeca
Merge pull request #11006 from poettering/conf-file-fix
...
minor fixes for conf-files.c
2018-12-01 00:47:22 +01:00
Lennart Poettering
ac20048fc0
Merge pull request #11002 from keszybz/path_join-merging
...
Path join merging
2018-12-01 00:44:58 +01:00
Lennart Poettering
f8ee4eaa48
Merge pull request #11004 from keszybz/remove-fixme-comment
...
socket-util: drop obsolete FIXME comment and add test
2018-12-01 00:01:11 +01:00
Zbigniew Jędrzejewski-Szmek
652ef29887
path-util: allow NULLs in arguments to path_join()
...
This removes the need to remember to put strempty() in places, thus reducing
the likelihood of a stupid mistake.
2018-11-30 22:21:17 +01:00
Lennart Poettering
59ea6e57a5
networkd: refuse IPv6 RADV prefixes that lack Prefix= setting
...
Fixes : #9589
2018-11-30 22:19:28 +01:00
Zbigniew Jędrzejewski-Szmek
15dca3711d
basic/socket-util: use c-escaping to print unprintable socket paths
...
We are pretty careful to reject abstract sockets that are too long to fit in
the address structure as a NUL-terminated string. And since we parse sockets as
strings, it is not possible to embed a NUL in the the address either. But we
might receive an external socket (abstract or not), and we want to be able to
print its address in all cases. We would call socket_address_verify() and
refuse to print various sockets that the kernel considers legit.
Let's do the strict verification only in case of socket addresses we parse and
open ourselves, and do less strict verification when printing addresses of
existing sockets, and use c-escaping to print embedded NULs and such.
More tests are added.
This should make LGTM happier because on FIXME comment is removed.
2018-11-30 21:58:47 +01:00
Zbigniew Jędrzejewski-Szmek
3a48499153
shared/socket-util: do not print empty CID
...
That's just ugly.
2018-11-30 21:40:04 +01:00
Zbigniew Jędrzejewski-Szmek
39e73acb9b
test-socket-util: add test for socket_address_print
2018-11-30 21:40:02 +01:00
Zbigniew Jędrzejewski-Szmek
041103a688
test-socket-util: the usual modernization
2018-11-30 21:37:44 +01:00
Lennart Poettering
b806f0b0aa
Merge pull request #10701 from poettering/analyze-security
...
systemd-analyze: add a new "security" verb for analyzing unit sandboxing options
2018-11-30 19:41:59 +01:00
Lennart Poettering
380b82d678
conf-files: remove unused function
2018-11-30 16:56:35 +01:00
Lennart Poettering
a7181c671a
conf-files: remove misplaced log_oom()
...
The caller should log in this case (and all callers in fact already do),
hence let's remove the duplicate logging here.
2018-11-30 16:55:57 +01:00