Yu Watanabe
f8d596cdfb
udevadm-trigger: replace udev_monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
13aca84769
udevadm-info,trigger: replace udev_device by sd_device
2018-10-17 03:31:20 +09:00
Yu Watanabe
a46556f77d
udevadm-monitor: replace udev_monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
13831507ed
rfkill: replace udev_monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
eb968396bb
login: replace udev_monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
d0955f0091
core: replace udev_monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
d2ebf9527e
network: replace udev_monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
e39b4d254d
libudev: re-implement udev-monitor by sd_device_monitor
2018-10-17 03:31:20 +09:00
Yu Watanabe
b1c097af8d
sd-device: introduce sd_device_monitor
2018-10-17 03:30:54 +09:00
Yu Watanabe
8da2f9e807
Merge pull request #10412 from poettering/sockaddr-sun-path
...
various fixes related to struct sockaddr_un handling
2018-10-17 01:25:58 +09:00
Lennart Poettering
6dd91b3682
tree-wide: CMP()ify all the things
...
Let's employ coccinelle to fix everything up automatically for us.
2018-10-16 17:45:53 +02:00
Hui Yiqun
2d53f310de
networkd: type support for "throw" in [Route] section
2018-10-16 17:09:21 +02:00
Lennart Poettering
a53f90ca24
siphash24: add helper for calculating the hash value for a string
...
Let's shorten some code.
2018-10-16 16:27:15 +02:00
Lennart Poettering
cb542e8488
udev: (void)ify calls to kill() where we knowingly ignore the return values
...
CID 1368231
CID 1368229
2018-10-16 13:52:21 +02:00
Lennart Poettering
eb276e9841
udev: don't use devname before we acquired it
...
CID 1396107
2018-10-16 13:52:21 +02:00
Lennart Poettering
cdc2af3e15
core: log about unit_watch_pid() failing
...
CID 1237509
2018-10-16 13:52:21 +02:00
Lennart Poettering
2011149a3c
Merge pull request #10327 from yuwata/test-sd-device-enumerator-subsystem
...
sd-device-enumerator: dedup enumerated devices and add test for subsystem filtering
2018-10-16 12:48:01 +02:00
Zbigniew Jędrzejewski-Szmek
0919b554c6
Merge pull request #9824 from poettering/login-unit-fixes
...
many logind improvements
2018-10-16 09:34:27 +02:00
Zbigniew Jędrzejewski-Szmek
43debabc8b
Merge pull request #10391 from poettering/systemctl-exit-code-fixes
...
systemctl exit code fixes
2018-10-16 08:42:34 +02:00
Lennart Poettering
271f518f35
nspawn: TAKE_FD() is your friend
2018-10-15 19:45:37 +02:00
Lennart Poettering
fbda85b078
tree-wide: use sockaddr_un_unlink() at two more places where appropriate
2018-10-15 19:44:34 +02:00
Lennart Poettering
a4209121d7
udev: use safe_close() where we can
2018-10-15 19:40:51 +02:00
Lennart Poettering
6d5e65f645
tree-wide: add a single version of "static const int one = 1"
...
All over the place we define local variables for the various sockopts
that take a bool-like "int" value. Sometimes they are const, sometimes
static, sometimes both, sometimes neither.
Let's clean this up, introduce a common const variable "const_int_one"
(as well as one matching "const_int_zero") and use it everywhere, all
acorss the codebase.
2018-10-15 19:40:51 +02:00
Lennart Poettering
8e8132c6b8
socket-util: tighten socket_address_verify() checks a bit
2018-10-15 19:40:51 +02:00
Lennart Poettering
48e6a2dc84
socket-util: tweak commenting in socket_address_get_path()
...
Let's make clear explicitly that there's always a NUL byte following the
path, and how.
2018-10-15 19:40:51 +02:00
Lennart Poettering
69995bffb7
socket-util: include trailing NUL byte in SOCKADDR_UN_LEN() count for fs sockets
...
This is what unix(7) recommends, hence do so.
2018-10-15 19:40:51 +02:00
Lennart Poettering
95cb14b068
sd-bus: rework how we initialize struct sockaddr_un
...
Let's use structured initialization, but more importantly, let's
increase salen by 1, if we reference AF_UNIX sockets in the file system,
so that they also contain the trailing NUL byte. This is what unix(7)
suggests to do, hence follow it.
2018-10-15 19:40:51 +02:00
Lennart Poettering
1d261418e2
sd-bus: make parsing of AF_UNIX socket addresses more strict
...
Insist on NUL termination, just to be safe rather than sorry. The kernel
doesn't require it, but it's really annoying if people rely on this,
hence refuse this early.
2018-10-15 19:40:51 +02:00
Lennart Poettering
15a3e96f92
tree-wide: port various users over to sockaddr_un_set_path()
...
CID 1396140
CID 1396141
2018-10-15 19:40:51 +02:00
Lennart Poettering
5cf91ea9c8
socket-util: add sockaddr_un_set_path() helper
...
Properly initializing sun_path from foreign data is not easy, given the
size constraints, and NUL confusion. Let's add a helper function for
this.
2018-10-15 19:35:00 +02:00
Lennart Poettering
44ed5214ad
tree-wide: use structured initialization for sockaddr_un
2018-10-15 19:35:00 +02:00
Lennart Poettering
ececf6c082
core: be more specific in error message
2018-10-15 19:35:00 +02:00
Lennart Poettering
686192048a
strxcpyx: minor coding style updates
2018-10-15 19:35:00 +02:00
Lennart Poettering
057e85805c
socket-address: document socket address parsing size restrictions in a comment
2018-10-15 19:35:00 +02:00
Lennart Poettering
9ec30b2769
socket-util: use structured initialization
2018-10-15 19:35:00 +02:00
Lennart Poettering
0b7e8b322d
tree-wide: make use of TAKE_FD() at two more places
2018-10-15 19:35:00 +02:00
Lennart Poettering
155b687669
tree-wide: use sockaddr_un_unlink() whereever appropriate
...
Let's port everything over.
2018-10-15 19:35:00 +02:00
Lennart Poettering
9f20fc28f0
socket-util: add new sockaddr_un_unlink() helper
...
The helper is supposed to properly handle cases where .sun_path does not
contain a NUL byte, and thus copies out the path suffix a NUL as
necessary.
This also reworks the more specific socket_address_unlink() to be a
wrapper around the more generic sockaddr_un_unlink()
2018-10-15 19:35:00 +02:00
Lennart Poettering
242c41b850
alloc-util: add alloca() counterparts for memdup() and memdup_suffix0()
2018-10-15 19:35:00 +02:00
Yu Watanabe
6cc4d59b35
Merge pull request #10392 from poettering/manager-no-inotify-fail
...
make sure /etc/localtime issues don't cause systemd to fail boot
2018-10-15 07:15:12 +09:00
Lennart Poettering
ca193035e9
Merge pull request #10394 from yuwata/fixes-found-by-clang
...
Fix warnings reported by clang
2018-10-14 20:11:19 +02:00
Yu Watanabe
e7aa9512e4
udev: use readlink_malloc() or its friend
...
Follow-up for a2554acec6 and
7006860271 .
2018-10-14 19:59:49 +02:00
Yu Watanabe
40990eac27
test: use fabsl instead of fabs as json_variant_real() returns 'long double'
2018-10-14 03:29:43 +09:00
Yu Watanabe
172e4806dd
busctl: drop unused variable
2018-10-14 03:29:43 +09:00
Yu Watanabe
cb16b085c0
core: set _unused_ attribute to 'reloading'
...
Follow-up for 4df7d537c8 .
2018-10-13 23:50:04 +09:00
Lennart Poettering
ea5c5f680d
core: ensure it's not fatal if we cannot watch /etc/localtime
...
See: #9602
2018-10-13 15:13:07 +02:00
Lennart Poettering
0cb21d8c60
core: add debug logging if we cant watch /etc/localtime itself
2018-10-13 15:12:58 +02:00
Yu Watanabe
b5f24a3858
test: make test-sd-device stricter
2018-10-13 21:45:50 +09:00
Yu Watanabe
cd8d816d78
sd-device: dedup enumerated devices
2018-10-13 21:45:50 +09:00
Yu Watanabe
68db4a0caf
test: add test for subsystem filtering of sd_device_enumerator
2018-10-13 21:45:50 +09:00