Commit Graph

35564 Commits

Author SHA1 Message Date
Hans de Goede 222b75d33e hwdb: Add mapping for unknown keycodes on Microsofy Reclusa keyboard
Add mapping for unknown keycodes on Microsoft Reclusa keyboard.
2018-10-12 16:56:08 +02:00
Hans de Goede 390611babb hwdb: Add accelerometer orientation quirk for the Onda V80 Plus tablet
Add accelerometer orientation quirk for the Onda V80 Plus tablet.
2018-10-12 16:55:59 +02:00
Hans de Goede a2b9ed9c4b 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.
2018-10-12 16:55:59 +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
Lennart Poettering 202d37cb8b Set theme jekyll-theme-minimal 2018-10-12 14:10:25 +02:00
Lennart Poettering 1e26d1cbdc Set theme jekyll-theme-dinky 2018-10-12 13:49:09 +02:00
Lennart Poettering e2e2a6455d Create CNAME 2018-10-12 13:48:34 +02:00
Lucas Werkmeister d3c05587ce man: fix <manvolnum> of epoll_ctl(2) 2018-10-12 13:46:11 +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 8274a30d0e 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.
2018-10-12 12:26:29 +02:00
Lennart Poettering 0f78c4dbe4 update TODO 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
Yu Watanabe 657ccaac1b sd-device: drop unnecessary header 2018-10-12 17:54:23 +09:00
Yu Watanabe 3ffd12bfbe test: add tests for $SYSTEMD_MEMPOOL=
This adds tests for b4f607433c and
205c085bc3 (#9792).
2018-10-12 17:54:23 +09:00
hellcp e7f7f19abc Add LOGO to os-release 2018-10-12 10:15:30 +02:00
Davide Cavalca ccac62563e tests: fix fallthrough condition for supplementary groups 2018-10-11 22:24:03 +02:00
Yu Watanabe 958b8c7bd7 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.
2018-10-11 22:23:39 +02:00
Lennart Poettering 8e2b687957 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
2018-10-11 22:07:14 +02:00
Lennart Poettering 696c0b890e macro: drop -Wdeclaration-after-statement exclusion magic, we dropped that warning anyway from our build 2018-10-11 22:05:55 +02:00
Lennart Poettering 8e04444385 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.
2018-10-11 17:25:27 +02:00
Lennart Poettering 02619c033f
Merge pull request #10353 from keszybz/more-manager-reloading
More manager reloading cleanups
2018-10-11 17:25:03 +02:00
Zbigniew Jędrzejewski-Szmek 0e3cc902fa Revert "meson: use c_args in generator scripts (#10289)"
This reverts commit 56f56d5ad8.

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
56f56d5ad8 wasn't very strong, let's just revert
it as this seems to be the simplest solution.
2018-10-11 17:22:40 +02:00
Zbigniew Jędrzejewski-Szmek 05067c3c1f 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.
2018-10-11 14:34:02 +02:00
Zbigniew Jędrzejewski-Szmek 4df7d537c8 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.
2018-10-11 14:34:00 +02:00
Zbigniew Jędrzejewski-Szmek d147e2b66b manager: use the _cleanup_ mechanism to do n_reloading counter handling
No functional change.
2018-10-11 14:33:22 +02:00
Zbigniew Jędrzejewski-Szmek 3d7cf72070 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.
2018-10-11 14:29:34 +02:00
Lennart Poettering 9cebb234b1 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.
2018-10-11 14:07:38 +02:00
Lennart Poettering 960d4b29d7
Merge pull request #10334 from keszybz/nomempool
Use mempool only in progs linked to libsystemd-shared.so
2018-10-11 13:44:34 +02:00
Lennart Poettering 2dde358e58
Merge pull request #10358 from yuwata/fix-10333
resolve: fix member access within null pointer
2018-10-11 13:32:15 +02:00
Yu Watanabe 25270cf3db resolve: fix member access within null pointer
Fixes #10333.
2018-10-11 18:36:21 +09:00
Yu Watanabe f55f2dce05 resolve: use structured initializers 2018-10-11 18:35:04 +09:00
Zbigniew Jędrzejewski-Szmek abc8caf76c meson: use vars we already have defined in status 2018-10-11 11:10:53 +02:00
Zbigniew Jędrzejewski-Szmek a5d8835c78 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
2018-10-11 11:10:37 +02:00
Zbigniew Jędrzejewski-Szmek 7c48ea0280 Move use_pool() to mempool.c and rename to mempool_enabled()
The only user is in hashmap.c, but it's a mempool thing.
2018-10-11 10:55:41 +02:00
Zbigniew Jędrzejewski-Szmek 6939fb9eb4 meson: update bug reference
https://github.com/mesonbuild/meson/issues/1644 was resolved in 0.42:
be4428005d,
but still no-go.
2018-10-11 10:55:41 +02:00