Yu Watanabe
491d3911db
test: fix tests for supplementary groups
...
Fixes #9881 .
2018-10-02 09:48:53 +02:00
Yu Watanabe
5c434af721
Merge pull request #10218 from keszybz/export-sd-device-hwdb
...
Export functions in sd-device and sd-hwdb
2018-10-01 19:45:55 +02:00
Yu Watanabe
f9c8c01fcc
test: try system bus if user bus cannot be opened
2018-10-01 10:15:54 +02:00
Yu Watanabe
e986910e87
import: sparse_write() returns negative errno
2018-10-01 08:29:16 +02:00
Yu Watanabe
213e759ad5
dhcp6: fix memleak about sd_event
2018-09-30 14:17:33 +02:00
Yu Watanabe
455e799943
Merge pull request #10200 from evverx/fuzz-dhcp6-client
...
Add a fuzzer for dhcp6-client
2018-09-29 13:41:52 +02:00
Yu Watanabe
431a4bc8c0
dhcp6: fix memleak
...
Let's drop client_set_lease() because just writing what it does in both
places is simpler.
Fixes #10157 .
2018-09-27 18:14:19 +02:00
Yu Watanabe
cb1bdeaf56
dhcp6: fix buffer size checking
2018-09-27 23:48:51 +09:00
Yu Watanabe
23976cb928
dhcp6: use offsetof instead of sizeof
2018-09-27 23:41:23 +09:00
Yu Watanabe
e2975f8548
sd-dhcp-lease: fix memleaks
2018-09-27 18:04:59 +09:00
Yu Watanabe
09348d4081
sd-dhecp-lease: use free_and_replace() at one more
2018-09-27 18:04:08 +09:00
Yu Watanabe
727ba17f55
network: fix memleak around Network.dhcp_vendor_class_identifier
2018-09-27 17:48:34 +09:00
Yu Watanabe
598c85cc46
network: fix alignment
2018-09-27 17:48:34 +09:00
Yu Watanabe
eeab051b28
network: strdup iif and oif when creating RoutingPolicyRule object
2018-09-27 17:48:34 +09:00
Yu Watanabe
8e37fcbd21
network: use TAKE_PTR() at one more place
2018-09-27 17:48:34 +09:00
Yu Watanabe
1b3194d8f2
network: fix memleak about routing policy
2018-09-27 17:48:34 +09:00
Yu Watanabe
9d66b48c7c
network: use structured initializer at one more place
2018-09-27 17:48:34 +09:00
Yu Watanabe
f3241c61f1
ndisc: fix two infinite loops
2018-09-26 18:54:21 +00:00
Yu Watanabe
0fbc35524c
libsystemd: add missing 'global' specifier in libsystemd.sym
2018-09-25 23:30:58 +02:00
Yu Watanabe
6c9c51e5e2
fs-util: make symlink_idempotent() optionally create relative link
2018-09-24 18:52:53 +03:00
Yu Watanabe
c679e12af1
tree-wide: drop unnecessary initializations
2018-09-23 17:18:50 +09:00
Yu Watanabe
2c740afd16
tree-wide: do not assign unused return values
2018-09-23 17:18:50 +09:00
Yu Watanabe
8a80712bcd
logind-acl: replace strdup()+set_consume() by set_put_strdup()
2018-09-23 17:18:50 +09:00
Yu Watanabe
8090b41ed5
gpt-auto-generator: do not assign '*ret' on error
2018-09-23 17:18:50 +09:00
Yu Watanabe
403660c508
tree-wide: use streq() instead of streq_ptr()
2018-09-23 17:18:50 +09:00
Yu Watanabe
dcfbde3a43
sd-device: make sd_device_get_*() return -ENOENT if the values are not set
2018-09-23 17:18:19 +09:00
Yu Watanabe
feae122f3e
test-udev: use LOG_REALM_UDEV
...
Otherwise, even if SYSTEMD_LOG_LEVEL=debug is specified, the test does
not show most debug messages.
2018-09-22 09:56:40 +02:00
Yu Watanabe
51b006e18d
udevadm: show only version number for '--version' option
...
This effectively reverts 2bc54be485
and relevant changes in #9920 , as it is used to determine the version
of udev, e.g., dracut.
Fixes dracutdevs/dracut#468 .
2018-09-21 10:58:54 +02:00
Yu Watanabe
642d1a6d6e
test-execute: skip several tests when running in container
2018-09-21 00:45:00 +09:00
Yu Watanabe
738c74d7b1
test-execute: also check python3 is installed or not
2018-09-21 00:45:00 +09:00
Yu Watanabe
767eab4750
test-process-util: skip several verifications when running in unprivileged container
2018-09-21 00:44:29 +09:00
Yu Watanabe
9590065f37
test-fs-util: skip some tests when running in unprivileged container
2018-09-21 00:44:29 +09:00
Yu Watanabe
cd90ec7544
test-seccomp: add log messages when skipping tests
2018-09-21 00:32:44 +09:00
Yu Watanabe
92f6a1b6bc
test-process-util: logs something when skipping tests
2018-09-21 00:32:36 +09:00
Yu Watanabe
80f1b34442
sd-hwdb: initialize variable
...
The variable 'fn' was not initialized on compat mode.
Fixes CID#1395731.
2018-09-20 14:28:03 +02:00
Yu Watanabe
d6609f8280
hwdb,udevadm: also unify hwdb_query() and hwdb_test()
2018-09-19 17:38:07 +09:00
Yu Watanabe
e3b9fd0a27
sd-hwdb: use structured initializers
2018-09-19 17:36:19 +09:00
Yu Watanabe
6a34639e76
hwdb: unify duplicated code and move it to hwdb-util.c
...
Both 'systemd-hwdb update' and 'udevadm hwdb --update' creates hwdb
database. The database created by systemd-hwdb containes additional
information such that priority, line number, and source filename.
The unified function 'hwdb_update()' can take a flag 'compat' which
controls the format version of created database.
2018-09-19 17:36:03 +09:00
Yu Watanabe
73c63957d2
sd-hwdb: adjust included headers
2018-09-19 16:52:59 +09:00
Yu Watanabe
4d7783e937
hwdb: use _cleanup_ attribute at one more place
2018-09-19 16:52:59 +09:00
Yu Watanabe
bf84dc168c
hwdb: make trie_node_cleanup() can take NULL
2018-09-19 16:52:59 +09:00
Yu Watanabe
cf37f937ee
nspawn: suppress one more log message when --quiet is passed
...
Fixes #10119 .
2018-09-19 08:42:17 +02:00
Yu Watanabe
dc5f9c6f39
busctl,sd-lldp: explicitly specify type of argument in compare function
...
Several functions are shared by qsort and hash_ops or Prioq.
This makes these functions explicitly specify argument type,
and cast to __compar_fn_t where necessary.
2018-09-19 08:28:54 +09:00
Yu Watanabe
bc861c2e09
tree-wide: use typesafe_bsearch() or typesafe_bsearch_r()
2018-09-19 08:08:03 +09:00
Yu Watanabe
f0f6d791fe
util: introduce typesafe_bsearch() and typesafe_bsearch_r()
2018-09-19 08:06:57 +09:00
Yu Watanabe
ba0a7bfb98
tree-wide: use typesafe_qsort_r()
2018-09-19 08:05:13 +09:00
Yu Watanabe
5532395be7
util: introduce typesafe_qsort_r()
2018-09-19 08:04:40 +09:00
Yu Watanabe
93bab28895
tree-wide: use typesafe_qsort()
2018-09-19 08:02:52 +09:00
Yu Watanabe
010d436e02
verbs: reset optind ( #10116 )
...
optind may be used in each verb, e.g., udevadm. So, let's initialize
optind before calling verbs.
Without this, e.g., udevadm -d hwdb --update causes error in parsing arguments.
2018-09-18 16:24:58 +02:00
Yu Watanabe
aca835ed2e
core/execute: do not use the negative errno when setup_namespace() returns -ENOANO
...
Without this, log shows meaningless error message 'No anode', e.g.,
===
Failed to unshare the mount namespace: Operation not permitted
foo.service: Failed to set up mount namespacing: No anode
foo.service: Failed at step NAMESPACE spawning /usr/bin/test: No anode
===
Follow-up for 1beab8b0d0 .
2018-09-18 14:31:09 +09:00
Yu Watanabe
2e4a4faea8
core/namespace: add more log messages
2018-09-18 14:31:09 +09:00
Yu Watanabe
5485deee6e
sd-device: use qsort_safe() ( #10099 )
...
The number of found devices may be zero. So, let's use qsort_safe().
Follow-up for 0a1665890c .
Fixes #10096 .
2018-09-16 23:46:58 +09:00
Yu Watanabe
0ac4f1a513
Merge pull request #10070 from keszybz/test-reporting
...
Test reporting improvements
2018-09-15 15:55:15 +09:00
Yu Watanabe
3332004e28
test-catalog: drop unused variable
...
Follow-up for 49cdae63d1 .
2018-09-15 01:59:14 +09:00
Yu Watanabe
72a4d9f96c
bus-util: use _printf_ attribute
...
Follow-up for eda193578e .
Fixes oss-fuzz#10350.
2018-09-15 01:50:59 +09:00
Yu Watanabe
2b8b1056d9
test: unset $XDG_{CONFIG,DATA}_DIRS
...
When $XDG_DATA_DIRS is unset, then, the default value
'/usr/local/share:/usr/share' is used.
When $XDG_DATA_DIRS contain the default paths but the order
is inverted: '/usr/share:/usr/local/share', then test-path-lookup fails.
Fixes #10002 .
2018-09-13 12:13:54 +02:00
Yu Watanabe
fd1939fbe7
meson: do not build tests by default when '-Dtests=false'
...
[zj: it is still possible to build tests explicitly by calling
ninja -C build test-name. This way we have full flexibility.]
2018-09-13 12:07:34 +02:00
Yu Watanabe
964bc0ad60
test: log when skipping tests in more cases
...
Follow-up for the previous commit.
2018-09-13 12:07:34 +02:00
Yu Watanabe
d491e65e74
man: document RUNTIME_DIRECTORY= or friends
2018-09-13 17:02:58 +09:00
Yu Watanabe
6088662d57
test-execute: add tests for $RUNTIME_DIRECTORY= or friends
2018-09-13 17:02:58 +09:00
Yu Watanabe
fb2042dd55
core: add new environment variable $RUNTIME_DIRECTORY= or friends
...
The variable is generated from RuntimeDirectory= or friends.
If multiple directories are set, then they are concatenated with
the separator ':'.
2018-09-13 17:02:58 +09:00
Yu Watanabe
a2917d3d2a
test: replace swear words by 'hoge'
2018-09-13 17:02:58 +09:00
Yu Watanabe
474a595af7
test: add tests for strv_join_prefix()
2018-09-13 17:02:58 +09:00
Yu Watanabe
2b9a7d2e96
strv: introduce strv_join_prefix()
2018-09-13 17:02:58 +09:00
Yu Watanabe
7c1cb6f198
core: add one more assert()
2018-09-13 17:02:58 +09:00
Yu Watanabe
76a9460d44
core: fix assert() about number of built environment variables
...
Follow-up for 4b58153dd2 and
fd63e712b2 .
2018-09-13 17:02:58 +09:00
Yu Watanabe
f28255e2d5
bash-completion: systemctl: re-implement __filter_units_by_properties()
...
This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.
2018-09-12 14:17:22 +09:00
Yu Watanabe
eda193578e
bus-util: make --property= optionally take value
2018-09-12 12:11:25 +09:00
Yu Watanabe
8aae9a66fa
sd-device,libudev: make an argument for *_set_sysattr_value() const
2018-09-11 12:45:21 +09:00
Yu Watanabe
7f9e03952a
libudev-monitor: use assert_return() in many places
2018-09-11 12:45:21 +09:00
Yu Watanabe
e38242b03a
libudev-monitor: add missing error checks in udev_monitor_enable_receiving()
2018-09-11 12:45:21 +09:00
Yu Watanabe
a9808d8445
libudev-monitor: introduce udev_monitor_send_sd_device()
...
And use it in udev_monitor_send_device().
2018-09-11 12:45:21 +09:00
Yu Watanabe
23c457a7fb
libudev-monitor: re-implement udev_monitor_receive_sd_device()
2018-09-11 12:45:21 +09:00
Yu Watanabe
759d9f3f8d
libudev-monitor: use Hashmap or Set to store filters
2018-09-11 12:45:21 +09:00
Yu Watanabe
5e1e4c247b
libudev-monitor: use structured initializer
2018-09-11 12:45:21 +09:00
Yu Watanabe
a062a72f1b
libudev-monitor: rename monitor_set_nl_address() and make it return negative errno
2018-09-11 12:45:21 +09:00
Yu Watanabe
be1791ad6a
libudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c
...
As the function itself is quite generic.
2018-09-11 12:45:21 +09:00
Yu Watanabe
3d01fa902c
libudev-monitor: use structured initializer in bpf_*()
...
This also drop inline attribute from the functions.
2018-09-11 12:45:21 +09:00
Yu Watanabe
7f79720711
libudev-monitor: use 'unsigned' instead of 'unsigned int'
2018-09-11 12:45:21 +09:00
Yu Watanabe
02e7ae2fdc
libudev-device: create sd_device at first in udev_device_new_from_*()
2018-09-11 12:45:21 +09:00
Yu Watanabe
a7e9db150b
libudev-device: drop prototypes of unexistent functions
2018-09-11 12:45:21 +09:00
Yu Watanabe
536cbd7fa6
libudev: drop a prototype of unexistent function
2018-09-11 12:45:21 +09:00
Yu Watanabe
76387b9abb
libudev-device: coding style fixes
2018-09-11 12:45:21 +09:00
Yu Watanabe
33a03e6eff
libudev-device: fix return value of udev_device_has_tag()
2018-09-11 12:45:21 +09:00
Yu Watanabe
1b6374d285
libudev-device: use original negative errno
2018-09-11 12:45:21 +09:00
Yu Watanabe
71074e3a10
libudev-device: use structured initializer
2018-09-11 12:45:21 +09:00
Yu Watanabe
60fdee32bd
libudev-enumerate: use structured initializer
2018-09-11 12:45:21 +09:00
Yu Watanabe
2b19953a0d
libudev-hwdb: use assert_return_errno()
2018-09-11 12:45:21 +09:00
Yu Watanabe
68b80b8557
libudev-hwdb: use structured initializer
2018-09-11 12:45:21 +09:00
Yu Watanabe
b485aa5852
libudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct
2018-09-11 12:45:21 +09:00
Yu Watanabe
f8cdabc0ec
libudev-queue: coding style fixes
2018-09-11 12:45:21 +09:00
Yu Watanabe
09f638ebd9
libudev-queue: drop prototypes of nonexistent functions
2018-09-11 12:45:21 +09:00
Yu Watanabe
2dac88a9d1
libudev-queue: use _cleanup_ attribute and TAKE_FD()
2018-09-11 12:45:21 +09:00
Yu Watanabe
d35c0e8d53
libudev-queue: use assert_return()
2018-09-11 12:45:21 +09:00
Yu Watanabe
ccda7f87f5
libudev-queue: use structured initializer
2018-09-11 12:45:21 +09:00
Yu Watanabe
bc54df90e4
libudev: modernize code a bit
2018-09-11 12:45:21 +09:00
Yu Watanabe
5ccb44a53f
libudev: use structured initializer
2018-09-11 12:45:21 +09:00
Yu Watanabe
2454727d5a
libudev: drop unused element in udev struct
2018-09-11 12:45:21 +09:00
Yu Watanabe
ff6f97f0cf
libudev: drop outdated comments
2018-09-11 12:45:21 +09:00
Yu Watanabe
3c6ac21929
libudev: use DEFINE_PUBLIC_TRIVIAL_REF_UNREF_FUNC() macro where applicable
2018-09-11 12:45:21 +09:00