1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 03:25:27 +03:00
Commit Graph

39474 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
afae22ca41
Merge pull request #12245 from poettering/empty-or-dash
introduce empty_or_dash() helper
2019-04-08 15:22:44 +02:00
Lennart Poettering
30ab7a519e man: elaborate on fd ownership in sd_event_add_io(3)
Replaces: #12239
2019-04-08 15:09:30 +02:00
Peter A. Bigot
4ea0f675ae units: add time-set.target
time-sync.target is supposed to indicate system clock is synchronized
with a remote clock, but as used through 241 it only provided a system
clock that was updated based on a locally-maintained timestamp.  Systems
that are powered off for extended periods would not come up with
accurate time.

Retain the existing behavior using a new time-set.target leaving
time-sync.target for cases where accuracy is required.

Closes #8861
2019-04-08 14:34:05 +02:00
Lennart Poettering
ca7410fe43 coccinelle: add coccinelle script for empty_or_dash() use 2019-04-08 14:31:15 +02:00
Paul Menzel
82d0776da2 man/systemd-sysusers: Fix typo in *from* to *form* 2019-04-08 13:46:34 +02:00
Lennart Poettering
dc90e0faae basic: add new helper call empty_or_dash_to_null()
We have a function like this at two places already. Let's unify it in
one generic location and let's port a number of users over.
2019-04-08 12:11:11 +02:00
Lennart Poettering
e7b88b7bc1 tree-wide: introduce empty_or_dash() helper
At quite a few places we check isempty() || streq(…, "-"), let's add a
helper to simplify that, and replace that by a single function call.
2019-04-08 12:03:33 +02:00
Lennart Poettering
ea505047c5
Merge pull request #12238 from keszybz/one-genuine-bugfix+lots-of-line-wrapping
One genuine bugfix and lots of line wrapping
2019-04-08 11:19:34 +02:00
Lennart Poettering
83d4ab5533 pam-systemd: use secure_getenv() rather than getenv()
And explain why in a comment.
2019-04-08 10:24:03 +02:00
Jonas DOREL
565026b49a man: correct units path usage according to FHS (#11388)
According to the Filesystem Hierarchy Standard, "The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated". So it should not be used by installed packages.
2019-04-08 08:19:58 +02:00
Zbigniew Jędrzejewski-Szmek
330d1defdb sysusers: use return_error_errno() where possible 2019-04-07 22:00:11 +02:00
Zbigniew Jędrzejewski-Szmek
71fb15888b sysusers: add missing initalizer
I assume that this is the error causing the invalid free in
https://bugzilla.redhat.com/show_bug.cgi?id=1670679.
2019-04-07 21:49:08 +02:00
Zbigniew Jędrzejewski-Szmek
124d7cb2a0 logind: linewrap some long lines and remove unnecessary conditional 2019-04-07 21:48:54 +02:00
Jussi Pakkanen
700805f6c5 meson: drop misplaced -Wl,--undefined argument
Ld's man page says the following:

  -u symbol
  --undefined=symbol

  Force symbol to be entered in the output file as an undefined symbol. Doing
  this may, for example, trigger linking of additional modules from standard
  libraries. -u may be repeated with different option arguments to enter
  additional undefined symbols. This option is equivalent to the "EXTERN"
  linker script command.

  If this option is being used to force additional modules to be pulled into
  the link, and if it is an error for the symbol to remain undefined, then the
  option --require-defined should be used instead.

This would imply that it always requires an argument, which this does not
pass. Thus it will grab the next argument on the command line as its
argument. Before it took one of the many -lrt args (presumably) and now it
grabs something other random linker argument and things break.

[zj: this line was added in the first version of the meson configuration back
in 5c23128dab. AFAICT, this was a mistake. No
such flag appeared in Makefile.am at the time.]

https://github.com/mesonbuild/meson/issues/5113
2019-04-07 19:37:08 +02:00
Lennart Poettering
d855b2ab36
Merge pull request #12234 from yuwata/calendarspec-fix-oss-fuzz-14108
Calendarspec cleanups and fixes integer overflow
2019-04-07 19:36:32 +02:00
Yu Watanabe
daa4aca1cb calendarspec: fix possible integer overflow
Fixes oss-fuzz#14108.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14108
2019-04-08 00:50:07 +09:00
Yu Watanabe
fb3ba5ec11 calendarspec: use _cleanup_ attributes for CalendarComponent 2019-04-08 00:50:02 +09:00
Yu Watanabe
9eef82e5a8 calendarspec: rename free_chain() to chain_free() 2019-04-08 00:21:37 +09:00
Yu Watanabe
4122b14b3a calendarspec: use structured initializers 2019-04-08 00:18:54 +09:00
Lennart Poettering
1eacc47062 nspawn: create boot_id and kmsg files for overmounting in /run, not /tmp
/tmp might not be mounted at all yet (given that we support
SYSTEMD_NSPAWN_TMPFS_TMP=0 to turn this off), and /tmp is a dir systemd
usually tries to unmount during shutdown (unlike /run), and we shouldn't
keep it busy. Hence let's just move these deleted files to /run so that
we don't keep /tmp needlessly busy.
2019-04-07 08:55:31 +02:00
Lennart Poettering
9ff46eded2 lgtm: warn about strerror() use 2019-04-05 16:58:52 +02:00
Lennart Poettering
9f717d42cb meson: sort source files again 2019-04-05 16:58:30 +02:00
Luís Ferreira
df09b49af6 hwdb: Add accelerometer orientation quirk for the Teclast F6 Pro 2019-04-05 16:52:12 +09:00
Lennart Poettering
949082ac21 test-journal: move tests to /var/tmp/ and set FS_NOCOW_FL
The journal files might not be tiny hence let's write them to /var/tmp/
instead of /tmp. Also, let's turn on NOCOW on the files, as these tests
might apparently be slow on btrfs.

Fixes: #12210
2019-04-04 12:18:13 +02:00
Yu Watanabe
6e79d2b5a4 ask-passwd: slightly optimize handling arguments
It is not necessary to copy arguments for each console.
2019-04-04 08:07:03 +02:00
Yu Watanabe
8c69fe79df bus-util: treat org.freedesktop.DBus.Error.ServiceUnknown nicely when polkit does not exist
Fixes #12209.
2019-04-04 08:06:04 +02:00
Yu Watanabe
ad2d50f840
Merge pull request #12208 from poettering/base-file-system-tweaks
base-filesystem: be nicer to read-only fs images
2019-04-04 13:05:12 +09:00
Yu Watanabe
482882b7b7
Merge pull request #12207 from poettering/portable-bus-policy-fix
portabled dbus policy fix
2019-04-04 12:59:04 +09:00
Yu Watanabe
11efeca11e udevadm: drop unused option 2019-04-04 12:55:06 +09:00
Lennart Poettering
65e5d6934e tty-ask-pw-agent: use right array
No point in copying the array if we are not going to use the copy.

Prompted by: https://github.com/systemd/systemd/pull/12183#issuecomment-479591781
2019-04-04 12:33:25 +09:00
Lennart Poettering
fc40bfa7e2 udev-util: allocate an event loop of our own for waiting
We can't use the per-thread default one here, as it might already be
running (for example, that's the case in portabled), and our event loops
are not recursive, hence running them a second time is not OK.
2019-04-04 02:15:14 +09:00
Lennart Poettering
8258578fb1 shared: be friendly to EROFS images
There are environments where /lib might not be necessary (think:
statically compiled portable service binary), hence don't insist on it
if the image is read-only.
2019-04-03 17:27:20 +02:00
Lennart Poettering
65290fbf3f shared: path_join() is your friend 2019-04-03 17:27:20 +02:00
Lennart Poettering
8a383bf2c0 shared: no need to initialize variable 2019-04-03 17:27:19 +02:00
Lennart Poettering
70f7b85ad1 portabled: fix method name
yikes.
2019-04-03 17:24:12 +02:00
Lennart Poettering
3aeeafb4c8 portabled: reorder methods in vtable
Let's stick to the same order in the per-image vtable and the manager
vtable.
2019-04-03 17:24:12 +02:00
Lennart Poettering
b66c8eba22 portabled: fix dbus policy
Let's whitelist the method calls actually defined, not some outdated old
names.
2019-04-03 17:24:12 +02:00
Zbigniew Jędrzejewski-Szmek
b3e8032bb4
Merge pull request #12198 from keszybz/seccomp-parsing-logging
Seccomp parsing logging cleanup
2019-04-03 17:19:14 +02:00
Zbigniew Jędrzejewski-Szmek
223ed2ae3c
Merge pull request #12205 from keszybz/update-release-docs
docs: let's not close the milestone early
2019-04-03 17:18:35 +02:00
Zbigniew Jędrzejewski-Szmek
3be4939149 docs: also document updates to stable repo 2019-04-03 16:43:17 +02:00
Zbigniew Jędrzejewski-Szmek
afa4e4a9db docs: let's not close the milestone early 2019-04-03 16:23:43 +02:00
Lennart Poettering
3b4ce4b08c
Merge pull request #12202 from keszybz/seccomp-arm64
Fixes for S[GU]ID filter on arm64
2019-04-03 15:47:18 +02:00
Zbigniew Jędrzejewski-Szmek
da4dc9a674 seccomp: rework how the S[UG]ID filter is installed
If we know that a syscall is undefined on the given architecture, don't
even try to add it.

Try to install the filter even if some syscalls fail. Also use a helper
function to make the whole a bit less magic.

This allows the S[UG]ID test to pass on arm64.
2019-04-03 13:33:06 +02:00
Zbigniew Jędrzejewski-Szmek
dff6c6295b test-seccomp: fix compilation on arm64
It has no open().
2019-04-03 13:24:43 +02:00
Zbigniew Jędrzejewski-Szmek
51be9a8c41 kernel-install: add a check that the vmlinuz arg is sane 2019-04-03 11:25:40 +02:00
Zbigniew Jędrzejewski-Szmek
f5a44d42af docs: update release steps for meson 2019-04-03 11:25:15 +02:00
Zbigniew Jędrzejewski-Szmek
7eb8a47e42 build-sys: bump package version 2019-04-03 10:00:14 +02:00
Zbigniew Jędrzejewski-Szmek
d822bd4e26 Merge pull request #12121 from poettering/contrib 2019-04-03 09:53:51 +02:00
Zbigniew Jędrzejewski-Szmek
58f6ab4454 pid1: pass unit name to seccomp parser when we have no file location
Building on previous commit, let's pass the unit name when parsing
dbus message or builtin whitelist, which is better than nothing.

seccomp_parse_syscall_filter() is not needed anymore, so it is removed,
and seccomp_parse_syscall_filter_full() is renamed to take its place.
2019-04-03 09:17:42 +02:00
Zbigniew Jędrzejewski-Szmek
6bfb1daff1 basic/log: log any available location information in log_syntax()
We would log "(null):0: Failed to parse system call, ignoring: rseq" from
log_syntax_internal() from log_syntax() from seccomp_parse_syscall_filter_full()
from seccomp_parse_syscall_filter() from config_parse_syscall_filter(),
when generating the built-in @default whitelist. Since it was not based on the
unit file, we would not pass a file name.

So let's make sure that log_syntax() does not print "(null)" pointer (which is
iffy and ugly), and use the unit name as fallback or nothing if both are missing.
In principle, one of the two should be always available, since why use log_syntax()
otherwise, but let's make things more resilient by guarding against this case too.
log_syntax() is called from a thousand places, and often in error path, so it's
hard to verify all callers.
2019-04-03 09:13:37 +02:00