Commit Graph

22348 Commits

Author SHA1 Message Date
Yu Watanabe 915375ed3b test: add tests for sd_netlink_slot_set_*() 2018-10-16 18:49:42 +09:00
Yu Watanabe c940a2310a test: add tests for sd_netlink_slot_get_*() 2018-10-16 18:42:42 +09:00
Yu Watanabe 8190a388a6 sd-netlink: make sd_netlink_slot take its description 2018-10-16 18:42:23 +09:00
Yu Watanabe 1a7baaa9e2 sd-netlink: add functions which manage sd_netlink_slot object 2018-10-15 18:10:25 +09:00
Yu Watanabe ee38400bba sd-netlink: introduce sd_netlink_slot 2018-10-15 18:10:04 +09:00
Yu Watanabe 0c40d13a07 sd-bus: rename argument 2018-10-15 09:27:53 +09: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
Lennart Poettering ee7b9f1dfc format-table: don't use unsigned when there's no point in it
CID 1394372
2018-10-13 12:37:13 +02:00
Lennart Poettering c504106c35 journal-upload: check for overflow
CID 1394386
2018-10-13 12:37:13 +02:00
Lennart Poettering 0b2c35b812 wait-online: more voidifyin of sd_event_add_signal()
CID 1394444
2018-10-13 12:37:13 +02:00
Lennart Poettering db2d75dfbb machinectl: voidify calls to sd_event_add_signal()
CID 1394445
2018-10-13 12:37:13 +02:00
Lennart Poettering babdf0d315 udevadm: assert_se() around sigprocmask()
CID #1395708
2018-10-13 12:37:13 +02:00
Lennart Poettering 9db296fddd efivars: add missing OOM check
CID #1395833
2018-10-13 12:37:13 +02:00
Lennart Poettering 165ad41b7f sd-ndisc: change return value of ndisc_reset() to void
We never generate anything other than 0 anyway, and we never check it,
hence let's just simplify things.
2018-10-13 12:37:13 +02:00
Lennart Poettering 76f713dfa4 sd-ndisc: voidify sd_ndisc_stop() call
CID 1395839
2018-10-13 12:37:13 +02:00
Lennart Poettering fcadf032c0 json: fix memleak on OOM
CID 1396083
2018-10-13 12:37:13 +02:00
Lennart Poettering 913c898ca0 cgroup: voidify a few things 2018-10-13 12:37:13 +02:00
Lennart Poettering b9839ac9d9 cgroup: make sure whitelist_device() always returns a valid return value
CID 1396094
2018-10-13 12:37:13 +02:00
Lennart Poettering 48440643f7 journal: voidify fd_nonblock()
CID #1396098
CID #1396096
CID #1396091
CID #1396086
2018-10-13 12:37:13 +02:00
Yu Watanabe fd8879498d Revert "alloc-util: return NULL if 0-sized allocation is requested"
This reverts commit c05107767b.
2018-10-13 12:34:32 +02:00
Yu Watanabe 8837715ef2
Merge pull request #10371 from poettering/sd-event-man-fix
trivial sd-event man page fixes
2018-10-13 17:30:44 +09:00
Jason A. Donenfeld 7d0b26a027 networkd: fix attribute length for wireguard (#10380)
This is actually a u16, not a u32, so the kernel complains:

kernel: netlink: 'systemd-network': attribute type 5 has an invalid length

This is due to:

if (nla_attr_len[pt->type] && attrlen != nla_attr_len[pt->type]) {
        pr_warn_ratelimited("netlink: '%s': attribute type %d has an invalid length.\n",
                            current->comm, type);
}

Presumably this has been working fine in functionality on little-endian
systems, but nobody bothered to try on big-endian systems.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-10-13 17:28:49 +09:00
Davide Cavalca b75f0c69b3 shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
Yu Watanabe b4b3649a94
Merge pull request #10366 from poettering/in-set-fixes
IN_SET() compile time check fixes
2018-10-13 17:25:36 +09:00
Lennart Poettering a6ee956610
Merge pull request #10356 from dtardon/covscan
assorted coverity/clang fixes
2018-10-12 18:43:04 +02:00
David Tardon e7e36b9030 efivars: check path_len before using it as loop boundary 2018-10-12 14:51:35 +02:00
David Tardon c52368509f journal-file: avoid calling ftruncate with invalid fd
This can happen if journal_file_close is called from the failure
handling code of journal_file_open before f->fd was established.
2018-10-12 14:51:35 +02:00
David Tardon 0b777d20e9 firewall-util: add an assert that we're not overwriting a buffer
... like commit f28501279d does for
out_interface.
2018-10-12 14:51:35 +02:00
David Tardon e99742ef3e login: avoid leak of name returned by uid_to_name() 2018-10-12 14:51:35 +02:00
David Tardon c05107767b alloc-util: return NULL if 0-sized allocation is requested
That would almost certainly be an error (e.g., an overflow in computing
_need_), so it's better to fail.
2018-10-12 14:51:35 +02:00
David Tardon 8192548ef7 do not try to allocate 0 bytes 2018-10-12 14:51:35 +02:00
David Tardon f369f47c26 be consistent about sun_path length
Most places use the whole buffer for name, without leaving extra space
for the trailing NUL.
2018-10-12 12:38:49 +02:00
David Tardon 4db1879acd dissect-image: use right comparison function
fstype can be NULL here.
2018-10-12 12:38:49 +02:00
David Tardon de699c7a06 console: avoid promotion to signed int
coverity message:
sign_extension: Suspicious implicit sign extension: "keydata.Key.ScanCode" with type "UINT16" (16 bits, unsigned) is promoted in "keydata.Key.ScanCode << 16" to type "int" (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, unsigned).  If "keydata.Key.ScanCode << 16" is greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
2018-10-12 12:38:41 +02:00
Lennart Poettering a55d8bedd2
Merge pull request #10176 from yuwata/udev-cleanup-7
udev: replace udev_device by sd_device
2018-10-12 12:26:33 +02:00
Lennart Poettering bde0848d88 sd-event: slightly extend explanatory comment 2018-10-12 12:26:29 +02:00
Lennart Poettering 76137725f0
Merge pull request #10369 from yuwata/test-mempool
meson,test: mempool related fixes and add tests for 'thread safety'
2018-10-12 12:21:44 +02:00
Lennart Poettering 2aab8a1e04
Merge pull request #10201 from yuwata/fix-10196
sd-netlink: add destroy_callback to sd_netlink_call_async() and fix memleaks in networkd
2018-10-12 11:36:08 +02:00
Yu Watanabe eb43e8a76d test: sort included headers 2018-10-12 17:54:23 +09:00
Yu Watanabe be44b572f3 meson: fix '-Dstatic-libsystemd=true' or '-Dstatic-libudev=true'
Follow-up for a5d8835c78.
2018-10-12 17:54:23 +09:00
Yu Watanabe cb3e926a5d test: add test for 'thread safety' of libudev
This adds a test for 715a970548d03fed18dc66c411c8b42ff21029cf.
2018-10-12 17:54:23 +09:00
Yu Watanabe 5eddbba3a1 meson: do not use mempool from libudev.so
Follow-up for a5d8835c78.
2018-10-12 17:54:23 +09:00
Yu Watanabe a6ee01caf3 test: add test for 'thread safety' of sd-device
This adds a test for a5d8835c78.
2018-10-12 17:54:23 +09:00