]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agosd-netlink: make sd_netlink_slot take its description
Yu Watanabe [Mon, 15 Oct 2018 08:49:53 +0000 (17:49 +0900)] 
sd-netlink: make sd_netlink_slot take its description

5 years agosd-netlink: add functions which manage sd_netlink_slot object
Yu Watanabe [Mon, 15 Oct 2018 08:15:14 +0000 (17:15 +0900)] 
sd-netlink: add functions which manage sd_netlink_slot object

5 years agosd-netlink: introduce sd_netlink_slot
Yu Watanabe [Mon, 15 Oct 2018 07:06:12 +0000 (16:06 +0900)] 
sd-netlink: introduce sd_netlink_slot

5 years agosd-bus: rename argument
Yu Watanabe [Mon, 15 Oct 2018 00:27:53 +0000 (09:27 +0900)] 
sd-bus: rename argument

5 years agoMerge pull request #10392 from poettering/manager-no-inotify-fail
Yu Watanabe [Sun, 14 Oct 2018 22:15:12 +0000 (07:15 +0900)] 
Merge pull request #10392 from poettering/manager-no-inotify-fail

make sure /etc/localtime issues don't cause systemd to fail boot

5 years agoman/systemd.nspawn: fix reference to --timezone argument (#10403)
Ben Boeckel [Sun, 14 Oct 2018 21:16:43 +0000 (17:16 -0400)] 
man/systemd.nspawn: fix reference to --timezone argument (#10403)

5 years agoMerge pull request #10394 from yuwata/fixes-found-by-clang
Lennart Poettering [Sun, 14 Oct 2018 18:11:19 +0000 (20:11 +0200)] 
Merge pull request #10394 from yuwata/fixes-found-by-clang

Fix warnings reported by clang

5 years agoudev: use readlink_malloc() or its friend
Yu Watanabe [Sat, 13 Oct 2018 14:28:02 +0000 (23:28 +0900)] 
udev: use readlink_malloc() or its friend

Follow-up for a2554acec652fc65c8ed0c6c1fede9ba8c3693b1 and
70068602713e8f441c5ddc2618f007f24488e422.

5 years agoMerge pull request #10381 from poettering/coverity-fixes
Yu Watanabe [Sun, 14 Oct 2018 09:58:36 +0000 (18:58 +0900)] 
Merge pull request #10381 from poettering/coverity-fixes

fixes for various recent coverity issues

5 years agotest: use fabsl instead of fabs as json_variant_real() returns 'long double' 10394/head
Yu Watanabe [Sat, 13 Oct 2018 14:59:16 +0000 (23:59 +0900)] 
test: use fabsl instead of fabs as json_variant_real() returns 'long double'

5 years agobusctl: drop unused variable
Yu Watanabe [Sat, 13 Oct 2018 14:56:07 +0000 (23:56 +0900)] 
busctl: drop unused variable

5 years agocore: set _unused_ attribute to 'reloading'
Yu Watanabe [Sat, 13 Oct 2018 14:50:04 +0000 (23:50 +0900)] 
core: set _unused_ attribute to 'reloading'

Follow-up for 4df7d537c8203557d330b68ba7833515ddd4e985.

5 years agocore: ensure it's not fatal if we cannot watch /etc/localtime 10392/head
Lennart Poettering [Sat, 13 Oct 2018 13:12:41 +0000 (15:12 +0200)] 
core: ensure it's not fatal if we cannot watch /etc/localtime

See: #9602

5 years agocore: add debug logging if we cant watch /etc/localtime itself
Lennart Poettering [Sat, 13 Oct 2018 13:12:16 +0000 (15:12 +0200)] 
core: add debug logging if we cant watch /etc/localtime itself

5 years agoformat-table: don't use unsigned when there's no point in it 10381/head
Lennart Poettering [Fri, 12 Oct 2018 17:02:23 +0000 (19:02 +0200)] 
format-table: don't use unsigned when there's no point in it

CID 1394372

5 years agojournal-upload: check for overflow
Lennart Poettering [Fri, 12 Oct 2018 16:59:23 +0000 (18:59 +0200)] 
journal-upload: check for overflow

CID 1394386

5 years agowait-online: more voidifyin of sd_event_add_signal()
Lennart Poettering [Fri, 12 Oct 2018 16:54:37 +0000 (18:54 +0200)] 
wait-online: more voidifyin of sd_event_add_signal()

CID 1394444

5 years agomachinectl: voidify calls to sd_event_add_signal()
Lennart Poettering [Fri, 12 Oct 2018 16:53:17 +0000 (18:53 +0200)] 
machinectl: voidify calls to sd_event_add_signal()

CID 1394445

5 years agoudevadm: assert_se() around sigprocmask()
Lennart Poettering [Fri, 12 Oct 2018 16:52:11 +0000 (18:52 +0200)] 
udevadm: assert_se() around sigprocmask()

CID #1395708

5 years agoefivars: add missing OOM check
Lennart Poettering [Fri, 12 Oct 2018 16:50:46 +0000 (18:50 +0200)] 
efivars: add missing OOM check

CID #1395833

5 years agosd-ndisc: change return value of ndisc_reset() to void
Lennart Poettering [Fri, 12 Oct 2018 16:49:18 +0000 (18:49 +0200)] 
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.

5 years agosd-ndisc: voidify sd_ndisc_stop() call
Lennart Poettering [Fri, 12 Oct 2018 16:47:28 +0000 (18:47 +0200)] 
sd-ndisc: voidify sd_ndisc_stop() call

CID 1395839

5 years agojson: fix memleak on OOM
Lennart Poettering [Fri, 12 Oct 2018 16:38:40 +0000 (18:38 +0200)] 
json: fix memleak on OOM

CID 1396083

5 years agocgroup: voidify a few things
Lennart Poettering [Fri, 12 Oct 2018 16:32:22 +0000 (18:32 +0200)] 
cgroup: voidify a few things

5 years agocgroup: make sure whitelist_device() always returns a valid return value
Lennart Poettering [Fri, 12 Oct 2018 16:31:30 +0000 (18:31 +0200)] 
cgroup: make sure whitelist_device() always returns a valid return value

CID 1396094

5 years agojournal: voidify fd_nonblock()
Lennart Poettering [Fri, 12 Oct 2018 16:26:02 +0000 (18:26 +0200)] 
journal: voidify fd_nonblock()

CID #1396098
CID #1396096
CID #1396091
CID #1396086

5 years agoRevert "alloc-util: return NULL if 0-sized allocation is requested"
Yu Watanabe [Sat, 13 Oct 2018 08:45:14 +0000 (17:45 +0900)] 
Revert "alloc-util: return NULL if 0-sized allocation is requested"

This reverts commit c05107767b589e9aac9711eb385738887f86eb77.

5 years agoman: systemctl: clarify that --lines=0 is allowed (#10375)
Lucas Werkmeister [Sat, 13 Oct 2018 08:31:40 +0000 (10:31 +0200)] 
man: systemctl: clarify that --lines=0 is allowed (#10375)

The term “positive” is often read to exclude 0 (though “strictly
positive” is sometimes used to clarify this), so let’s explicitly state
that --lines=0 is legal and completely disables journal output.

Motivated by an answer on StackExchange [1].

[1]: https://unix.stackexchange.com/a/475068/44049

5 years agoMerge pull request #10371 from poettering/sd-event-man-fix
Yu Watanabe [Sat, 13 Oct 2018 08:30:44 +0000 (17:30 +0900)] 
Merge pull request #10371 from poettering/sd-event-man-fix

trivial sd-event man page fixes

5 years agonetworkd: fix attribute length for wireguard (#10380)
Jason A. Donenfeld [Sat, 13 Oct 2018 08:28:49 +0000 (10:28 +0200)] 
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>
5 years agoshared: add %g, %G specifiers for group / gid (#10368)
Davide Cavalca [Sat, 13 Oct 2018 08:26:48 +0000 (01:26 -0700)] 
shared: add %g, %G specifiers for group / gid (#10368)

5 years agoMerge pull request #10366 from poettering/in-set-fixes
Yu Watanabe [Sat, 13 Oct 2018 08:25:36 +0000 (17:25 +0900)] 
Merge pull request #10366 from poettering/in-set-fixes

IN_SET() compile time check fixes

5 years agoMerge pull request #10356 from dtardon/covscan
Lennart Poettering [Fri, 12 Oct 2018 16:43:04 +0000 (18:43 +0200)] 
Merge pull request #10356 from dtardon/covscan

assorted coverity/clang fixes

5 years agoMerge pull request #10379 from jwrdegoede/hwdb-updates
Lennart Poettering [Fri, 12 Oct 2018 16:21:15 +0000 (18:21 +0200)] 
Merge pull request #10379 from jwrdegoede/hwdb-updates

Hwdb updates

5 years agohwdb: Add mapping for unknown keycodes on Microsofy Reclusa keyboard 10379/head
Hans de Goede [Fri, 12 Oct 2018 14:52:52 +0000 (16:52 +0200)] 
hwdb: Add mapping for unknown keycodes on Microsofy Reclusa keyboard

Add mapping for unknown keycodes on Microsoft Reclusa keyboard.

5 years agohwdb: Add accelerometer orientation quirk for the Onda V80 Plus tablet
Hans de Goede [Fri, 12 Oct 2018 11:10:35 +0000 (13:10 +0200)] 
hwdb: Add accelerometer orientation quirk for the Onda V80 Plus tablet

Add accelerometer orientation quirk for the Onda V80 Plus tablet.

5 years agohwdb: Add accelerometer orientation quirk for the Acer One 10 aka S1003
Hans de Goede [Fri, 12 Oct 2018 08:38:00 +0000 (10:38 +0200)] 
hwdb: Add accelerometer orientation quirk for the Acer One 10 aka S1003

Add accelerometer orientation quirk for the Acer One 10 2-in-1 also known
as the Acer S1003.

5 years agoefivars: check path_len before using it as loop boundary 10356/head
David Tardon [Wed, 10 Oct 2018 12:54:05 +0000 (14:54 +0200)] 
efivars: check path_len before using it as loop boundary

5 years agojournal-file: avoid calling ftruncate with invalid fd
David Tardon [Wed, 10 Oct 2018 11:56:54 +0000 (13:56 +0200)] 
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.

5 years agofirewall-util: add an assert that we're not overwriting a buffer
David Tardon [Wed, 10 Oct 2018 07:33:28 +0000 (09:33 +0200)] 
firewall-util: add an assert that we're not overwriting a buffer

... like commit f28501279d2c28fdbb31d8273b723e9bf71d3b98 does for
out_interface.

5 years agologin: avoid leak of name returned by uid_to_name()
David Tardon [Tue, 9 Oct 2018 15:26:19 +0000 (17:26 +0200)] 
login: avoid leak of name returned by uid_to_name()

5 years agoalloc-util: return NULL if 0-sized allocation is requested
David Tardon [Tue, 9 Oct 2018 14:53:43 +0000 (16:53 +0200)] 
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.

5 years agodo not try to allocate 0 bytes
David Tardon [Fri, 12 Oct 2018 12:48:41 +0000 (14:48 +0200)] 
do not try to allocate 0 bytes

5 years agoSet theme jekyll-theme-minimal
Lennart Poettering [Fri, 12 Oct 2018 12:10:25 +0000 (14:10 +0200)] 
Set theme jekyll-theme-minimal

5 years agoSet theme jekyll-theme-dinky
Lennart Poettering [Fri, 12 Oct 2018 11:49:09 +0000 (13:49 +0200)] 
Set theme jekyll-theme-dinky

5 years agoCreate CNAME
Lennart Poettering [Fri, 12 Oct 2018 11:48:34 +0000 (13:48 +0200)] 
Create CNAME

5 years agoman: fix <manvolnum> of epoll_ctl(2)
Lucas Werkmeister [Fri, 12 Oct 2018 11:24:07 +0000 (13:24 +0200)] 
man: fix <manvolnum> of epoll_ctl(2)

5 years agobe consistent about sun_path length
David Tardon [Tue, 9 Oct 2018 13:04:58 +0000 (15:04 +0200)] 
be consistent about sun_path length

Most places use the whole buffer for name, without leaving extra space
for the trailing NUL.

5 years agodissect-image: use right comparison function
David Tardon [Tue, 9 Oct 2018 11:50:55 +0000 (13:50 +0200)] 
dissect-image: use right comparison function

fstype can be NULL here.

5 years agoconsole: avoid promotion to signed int
David Tardon [Wed, 3 Oct 2018 10:48:58 +0000 (12:48 +0200)] 
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.

5 years agoMerge pull request #10176 from yuwata/udev-cleanup-7
Lennart Poettering [Fri, 12 Oct 2018 10:26:33 +0000 (12:26 +0200)] 
Merge pull request #10176 from yuwata/udev-cleanup-7

udev: replace udev_device by sd_device

5 years agosd-event: slightly extend explanatory comment 10371/head
Lennart Poettering [Fri, 12 Oct 2018 10:12:42 +0000 (12:12 +0200)] 
sd-event: slightly extend explanatory comment

5 years agoman: add missing references to sd_event_add_inotify()
Lennart Poettering [Fri, 12 Oct 2018 10:09:29 +0000 (12:09 +0200)] 
man: add missing references to sd_event_add_inotify()

These man pages list references to the various sd_event_add_xyz() calls
at the bottom, but sd_event_add_inotify() was never added there.

Moreover, some list references to sd_event_add_post() and
sd_event_add_exit() even though these have shared man pages with
sd_event_add_defer(), and given that the "SEE ALSO" section should
probably reference pages instead of functions let's drop this.

Then, let's always specify the sd_event_add_xyz() calls in the same
order.

Finally, in the sd_event_new(3) text explaining the basic logic,
actually mention sd_event_add_post() and sd_event_add_exit() as well, as
in that case we actually want to list functions, not man pages.

5 years agoupdate TODO
Lennart Poettering [Fri, 12 Oct 2018 10:07:45 +0000 (12:07 +0200)] 
update TODO

5 years agoMerge pull request #10369 from yuwata/test-mempool
Lennart Poettering [Fri, 12 Oct 2018 10:21:44 +0000 (12:21 +0200)] 
Merge pull request #10369 from yuwata/test-mempool

meson,test: mempool related fixes and add tests for 'thread safety'

5 years agoMerge pull request #10201 from yuwata/fix-10196
Lennart Poettering [Fri, 12 Oct 2018 09:36:08 +0000 (11:36 +0200)] 
Merge pull request #10201 from yuwata/fix-10196

sd-netlink: add destroy_callback to sd_netlink_call_async() and fix memleaks in networkd

5 years agotest: sort included headers 10369/head
Yu Watanabe [Fri, 12 Oct 2018 08:29:52 +0000 (17:29 +0900)] 
test: sort included headers

5 years agomeson: fix '-Dstatic-libsystemd=true' or '-Dstatic-libudev=true'
Yu Watanabe [Fri, 12 Oct 2018 02:59:55 +0000 (11:59 +0900)] 
meson: fix '-Dstatic-libsystemd=true' or '-Dstatic-libudev=true'

Follow-up for a5d8835c78112206bbf0812dd4cb471f803bfe88.

5 years agotest: add test for 'thread safety' of libudev
Yu Watanabe [Fri, 12 Oct 2018 02:56:45 +0000 (11:56 +0900)] 
test: add test for 'thread safety' of libudev

This adds a test for 715a970548d03fed18dc66c411c8b42ff21029cf.

5 years agomeson: do not use mempool from libudev.so
Yu Watanabe [Fri, 12 Oct 2018 02:55:03 +0000 (11:55 +0900)] 
meson: do not use mempool from libudev.so

Follow-up for a5d8835c78112206bbf0812dd4cb471f803bfe88.

5 years agotest: add test for 'thread safety' of sd-device
Yu Watanabe [Fri, 12 Oct 2018 02:45:20 +0000 (11:45 +0900)] 
test: add test for 'thread safety' of sd-device

This adds a test for a5d8835c78112206bbf0812dd4cb471f803bfe88.

5 years agosd-device: drop unnecessary header
Yu Watanabe [Fri, 12 Oct 2018 02:43:49 +0000 (11:43 +0900)] 
sd-device: drop unnecessary header

5 years agotest: add tests for $SYSTEMD_MEMPOOL=
Yu Watanabe [Fri, 12 Oct 2018 02:12:07 +0000 (11:12 +0900)] 
test: add tests for $SYSTEMD_MEMPOOL=

This adds tests for b4f607433cac749b617e15b3d5d122322ed2bc71 and
205c085bc36c2c61a09dc40621d8561b135d9b57 (#9792).

5 years agoAdd LOGO to os-release
hellcp [Thu, 11 Oct 2018 20:36:40 +0000 (22:36 +0200)] 
Add LOGO to os-release

5 years agotests: fix fallthrough condition for supplementary groups
Davide Cavalca [Thu, 11 Oct 2018 17:45:43 +0000 (10:45 -0700)] 
tests: fix fallthrough condition for supplementary groups

5 years agocore: fix member access within null pointer
Yu Watanabe [Thu, 11 Oct 2018 19:24:27 +0000 (04:24 +0900)] 
core: fix member access within null pointer

config_parse_tasks_max() is also used for parsing system.conf or
user.conf. In that case, userdata is NULL.

Fixes #10362.

5 years agomacro: rework IN_SET a bit 10366/head
Lennart Poettering [Thu, 11 Oct 2018 20:07:14 +0000 (22:07 +0200)] 
macro: rework IN_SET a bit

This makes use of assert_cc() to guard against missing CASE macros,
instead of a manual implementation that might result in a static
variable to be allocated.

More importantly though this changes the base type for the array used to
determine the number of arguments for the compile time check from "int"
to "long double". This is done in order to avoid warnings from "ubsan"
that possibly large constants are assigned to small types. "long double"
hopefully isn't vulnerable to that.

Fixes: #10332
5 years agomacro: drop -Wdeclaration-after-statement exclusion magic, we dropped that warning...
Lennart Poettering [Thu, 11 Oct 2018 20:05:55 +0000 (22:05 +0200)] 
macro: drop -Wdeclaration-after-statement exclusion magic, we dropped that warning anyway from our build

5 years agojournalctl: port JSON output mode to new JSON API
Lennart Poettering [Mon, 23 Jul 2018 18:22:30 +0000 (20:22 +0200)] 
journalctl: port JSON output mode to new JSON API

Also, while we are at it, beef it up, by adding json-seq support (i.e.
https://tools.ietf.org/html/rfc7464). This is particularly useful in
conjunction with jq's --seq switch.

5 years agoMerge pull request #10353 from keszybz/more-manager-reloading
Lennart Poettering [Thu, 11 Oct 2018 15:25:03 +0000 (17:25 +0200)] 
Merge pull request #10353 from keszybz/more-manager-reloading

More manager reloading cleanups

5 years agoRevert "meson: use c_args in generator scripts (#10289)"
Zbigniew Jędrzejewski-Szmek [Thu, 11 Oct 2018 13:12:41 +0000 (15:12 +0200)] 
Revert "meson: use c_args in generator scripts (#10289)"

This reverts commit 56f56d5ad856d9bd1070693490b210e0a0ccde92.

This broke the compilation for coverity under travis. Our build script does
something like this:

$ CFLAGS='-D_Float128=long\ double -D_Float64=double -D_Float64x=long\ double -D_Float32=float -D_Float32x=double' meson cov-build -Dman=false
$ ninja -C build
...
[pid 27096] execve("/usr/bin/cc", ["/usr/bin/cc", "-D_Float128=long", "double", "-D_Float64=double", "-D_Float64x=long", "double", "-D_Float32=float", "-D_Float32x=double", "-E", "-dM", "-include", "linux/capability.h", "-include", "config.h", "-include", "../src/basic/missing.h", "-"], 0x55ab75ea4e80 /* 91 vars */) = 0
cc: error: double: No such file or directory
cc: error: double: No such file or directory
[pid 27096] +++ exited with 1 +++

I'm sure this could be fixed somehow, but since the original motivation for
56f56d5ad856d9bd1070693490b210e0a0ccde92 wasn't very strong, let's just revert
it as this seems to be the simplest solution.

5 years agomanager: simplify error handling in manager_deserialize() 10353/head
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 11:54:13 +0000 (13:54 +0200)] 
manager: simplify error handling in manager_deserialize()

If a memory error occurred, we would still go through the path which sets the
error on ferror(). It is unlikely that ferror() returns true, but it's seems
cleaner to just propagate the error we already have.

The handling of fgets() returning NULL is also simplified: according to the man
page, it returns NULL only on EOF or error. So if feof() returns true, I don't
think we should call ferror() again.

While at it, let's set errno to 0 and check that it is set before returning it
as an error. The man pages for fgets() and feof() do not say anything about
setting errno.

5 years agomanager: also use the reloading "cleanup" function in manager_startup
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 11:41:44 +0000 (13:41 +0200)] 
manager: also use the reloading "cleanup" function in manager_startup

Here the behaviour is nominally changed, because we will decrease the
counter on error. But the only caller quits the program if error occurs,
so this makes no practical difference.

5 years agomanager: use the _cleanup_ mechanism to do n_reloading counter handling
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 11:33:49 +0000 (13:33 +0200)] 
manager: use the _cleanup_ mechanism to do n_reloading counter handling

No functional change.

5 years agomanager: replace fake block with a strjoina
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 11:27:28 +0000 (13:27 +0200)] 
manager: replace fake block with a strjoina

The block was created to avoid declaring variables in the middle of the block.
We could now do that, but it's easier to just use strjoina here.

5 years agobusctl: add a --json= output mode
Lennart Poettering [Wed, 4 Jul 2018 13:28:09 +0000 (15:28 +0200)] 
busctl: add a --json= output mode

A new switch "-j" or "--json=" is added which transforms dbus
marshalling into json. This is extremely useful in combination with
tools such as "jq" to process bus calls further.

5 years agoMerge pull request #10334 from keszybz/nomempool
Lennart Poettering [Thu, 11 Oct 2018 11:44:34 +0000 (13:44 +0200)] 
Merge pull request #10334 from keszybz/nomempool

Use mempool only in progs linked to libsystemd-shared.so

5 years agoMerge pull request #10358 from yuwata/fix-10333
Lennart Poettering [Thu, 11 Oct 2018 11:32:15 +0000 (13:32 +0200)] 
Merge pull request #10358 from yuwata/fix-10333

resolve: fix member access within null pointer

5 years agoresolve: fix member access within null pointer 10358/head
Yu Watanabe [Thu, 11 Oct 2018 09:36:18 +0000 (18:36 +0900)] 
resolve: fix member access within null pointer

Fixes #10333.

5 years agoresolve: use structured initializers
Yu Watanabe [Thu, 11 Oct 2018 09:35:04 +0000 (18:35 +0900)] 
resolve: use structured initializers

5 years agomeson: use vars we already have defined in status 10334/head
Zbigniew Jędrzejewski-Szmek [Thu, 11 Oct 2018 09:10:53 +0000 (11:10 +0200)] 
meson: use vars we already have defined in status

5 years agomempool: only enable mempool use when linked to libsystemd-shared.so
Zbigniew Jędrzejewski-Szmek [Tue, 9 Oct 2018 14:02:55 +0000 (16:02 +0200)] 
mempool: only enable mempool use when linked to libsystemd-shared.so

Mempool use is enabled or disabled based on the mempool_use_allowed symbol that
is linked in.

Should fix assert crashes in external programs caused by #9792.
Replaces #10286.

v2:
- use two different source files instead of a gcc constructor

5 years agoMove use_pool() to mempool.c and rename to mempool_enabled()
Zbigniew Jędrzejewski-Szmek [Tue, 9 Oct 2018 13:53:35 +0000 (15:53 +0200)] 
Move use_pool() to mempool.c and rename to mempool_enabled()

The only user is in hashmap.c, but it's a mempool thing.

5 years agomeson: update bug reference
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 13:04:28 +0000 (15:04 +0200)] 
meson: update bug reference

https://github.com/mesonbuild/meson/issues/1644 was resolved in 0.42:
https://github.com/mesonbuild/meson/pull/2191/commits/be4428005dff8b17af5696c8f05567de9af1a8c5,
but still no-go.

5 years agomeson: remove old comment
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 12:49:22 +0000 (14:49 +0200)] 
meson: remove old comment

The linked page is gone, and I can't quite remember what the
warning was about. Something about recursive copying... Everything
seems to work.

5 years agomeson: drop workaround
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 12:39:14 +0000 (14:39 +0200)] 
meson: drop workaround

It was added way back, and seems to work fine now without it.

5 years agotests: pass halt_on_error=1 to UBSan
Evgeny Vereshchagin [Wed, 10 Oct 2018 02:36:36 +0000 (02:36 +0000)] 
tests: pass halt_on_error=1 to UBSan

By default, UBSan neither crashes nor exits with a non-zero exit code
when undefined behavior has been detected. This is problematic because
it makes it much harder to catch issues like https://github.com/systemd/systemd/issues/10346,
 https://github.com/systemd/systemd/issues/10347, and https://github.com/systemd/systemd/issues/10333.
In fact, those issue were found just because I decided to grep
the test log, which isn't something that I normally do :-)

As it turns out, the only way to make UBSan signal that something is wrong that works more or less
reliably everywhere is to pass halt_on_error=1 (though, it's probably worth noting that it's currently
not set for PID1 in order not to trigger kernel panics).

See https://reviews.llvm.org/D35085#804183 and https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/HEAD/reference.md

5 years agoudev-builtin: move definitions related to builtin commands to udev-builtin.h 10176/head
Yu Watanabe [Wed, 29 Aug 2018 07:12:22 +0000 (16:12 +0900)] 
udev-builtin: move definitions related to builtin commands to udev-builtin.h

5 years agoudev-ctrl: move prototypes of udev_ctrl_*() to udev-ctrl.h
Yu Watanabe [Wed, 29 Aug 2018 07:03:45 +0000 (16:03 +0900)] 
udev-ctrl: move prototypes of udev_ctrl_*() to udev-ctrl.h

5 years agoudev-node: replace udev_device by sd_device and modernize code a bit
Yu Watanabe [Wed, 29 Aug 2018 06:54:56 +0000 (15:54 +0900)] 
udev-node: replace udev_device by sd_device and modernize code a bit

5 years agoudev-watch: replace udev_device by sd_device and modernize code a bit
Yu Watanabe [Fri, 14 Sep 2018 19:13:29 +0000 (04:13 +0900)] 
udev-watch: replace udev_device by sd_device and modernize code a bit

5 years agoudev: drop unused function udev_build_argv()
Yu Watanabe [Wed, 26 Sep 2018 15:28:50 +0000 (00:28 +0900)] 
udev: drop unused function udev_build_argv()

5 years agoman: clarify behaviour of RandomizedDelaySec=
dana [Tue, 9 Oct 2018 19:25:12 +0000 (14:25 -0500)] 
man: clarify behaviour of RandomizedDelaySec=

5 years agoMerge pull request #10316 from poettering/json-api
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 12:21:18 +0000 (14:21 +0200)] 
Merge pull request #10316 from poettering/json-api

just the json stuff from #9762

5 years agoMerge pull request #10351 from keszybz/meson-cpp-fixups
Yu Watanabe [Wed, 10 Oct 2018 10:50:35 +0000 (19:50 +0900)] 
Merge pull request #10351 from keszybz/meson-cpp-fixups

Meson c++-related fixups

5 years agoMerge pull request #10343 from poettering/manager-state-fix
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 10:36:16 +0000 (12:36 +0200)] 
Merge pull request #10343 from poettering/manager-state-fix

various fixes for PID1's Manager object

5 years agoMerge pull request #10349 from poettering/bus-creds-shift-overflow
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 10:04:33 +0000 (12:04 +0200)] 
Merge pull request #10349 from poettering/bus-creds-shift-overflow

sd-bus creds bitshift overflow fix

5 years agotree-wide: various ubsan zero size memory fixes
Lennart Poettering [Wed, 10 Oct 2018 09:34:30 +0000 (11:34 +0200)] 
tree-wide: various ubsan zero size memory fixes

Fixes: #10346
5 years agomeson: c++ is required for the fuzzer builds 10351/head
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 09:56:45 +0000 (11:56 +0200)] 
meson: c++ is required for the fuzzer builds

The configuration would fail with an error about cpp being an unknown language
anyway, but it's nicer to fail early and explicitly.

https://github.com/systemd/systemd/pull/10339#issuecomment-428279175

5 years agomeson: rename cpp_cmd to cxx_cmd
Zbigniew Jędrzejewski-Szmek [Wed, 10 Oct 2018 09:50:57 +0000 (11:50 +0200)] 
meson: rename cpp_cmd to cxx_cmd

cpp is a really bad alias for c++ because it's also the name of the
preprocessor. Let's rename the variable.