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

26532 Commits

Author SHA1 Message Date
Lennart Poettering
0d23bc57da sd-journal: suppress empty lines
Let's make sure our logging APIs is in sync with how stdout/stderr logging
works.
2016-07-19 17:51:20 +02:00
Alessandro Puccetti
2a624c36e6 doc,core: Read{Write,Only}Paths= and InaccessiblePaths=
This patch renames Read{Write,Only}Directories= and InaccessibleDirectories=
to Read{Write,Only}Paths= and InaccessiblePaths=, previous names are kept
as aliases but they are not advertised in the documentation.

Renamed variables:
`read_write_dirs` --> `read_write_paths`
`read_only_dirs` --> `read_only_paths`
`inaccessible_dirs` --> `inaccessible_paths`
2016-07-19 17:22:02 +02:00
Alessandro Puccetti
c4b4170746 namespace: unify limit behavior on non-directory paths
Despite the name, `Read{Write,Only}Directories=` already allows for
regular file paths to be masked. This commit adds the same behavior
to `InaccessibleDirectories=` and makes it explicit in the doc.
This patch introduces `/run/systemd/inaccessible/{reg,dir,chr,blk,fifo,sock}`
{dile,device}nodes and mounts on the appropriate one the paths specified
in `InacessibleDirectories=`.

Based on Luca's patch from https://github.com/systemd/systemd/pull/3327
2016-07-19 17:22:02 +02:00
Lennart Poettering
4c5db93f8a man: document that sd_journal_print() strips trailing whitespace 2016-07-19 14:21:49 +02:00
Lennart Poettering
8980058a37 journalctl: make sure that journalctl's --all switch also has an effect on json output
With this change, binary record data is formatted as string if --all is
specified when using json output. This is inline with the effect of --all on
the other available output modes.

Fixes: #3416
2016-07-19 14:21:49 +02:00
Lennart Poettering
c24f1f9df1 sd-journal: when formatting log messages, implicitly strip trailing whitespace
When converting log messages from human readable text into binary records to
send off to journald in sd_journal_print(), strip trailing whitespace in the
log message. This way, handling of logs made via syslog(), stdout/stderr and
sd_journal_print() are treated the same way: trailing (but not leading)
whitespace is automatically removed, in particular \n and \r. Note that in case
of syslog() and stdout/stderr based logging the stripping takes place
server-side though, while for the native protocol based transport this takes
place client-side. This is because in the former cases conversion from
free-form human-readable strings into structured, binary log records takes
place on the server-side while for journal-native logging it happens on the
client side, and after conversion into binary records we probably shouldn't
alter the data anymore.

See: #3416
2016-07-19 14:21:49 +02:00
Lennart Poettering
bb557f90f8 mkosi: make sure we fail on error 2016-07-19 12:30:34 +02:00
Harald Hoyer
340defcd06 kernel-install: recognize /boot/efi mountpoint (#3751)
install everything in /boot/efi, if this is a mountpoint
2016-07-19 12:10:09 +02:00
Atrotors
1efbf65819 update 60-evdev to include rules for ASUS UX305 touchpad (#3698) 2016-07-19 11:43:15 +02:00
Zbigniew Jędrzejewski-Szmek
53274d4cab Merge pull request #3749 from phomes/trivial-fixes3
Trivial fixes3
2016-07-18 19:03:08 -04:00
Thomas Hindoe Paaboel Andersen
12c40d4cc4 resolved: replace bitwise and with logical and 2016-07-18 22:42:13 +02:00
Thomas Hindoe Paaboel Andersen
ba19c6e181 treewide: remove unused variables 2016-07-18 22:32:08 +02:00
Thomas Hindoe Paaboel Andersen
65a6195e76 basic: fix whitespace 2016-07-18 22:14:23 +02:00
Thomas Hindoe Paaboel Andersen
82edec5451 network: fix indentation 2016-07-18 22:09:57 +02:00
Jan Janssen
03e749af53 sd-boot: Fix waiting for keyboard input (#3735)
WaitForKeyEx may never return on some UEFI systems depending
on firmware, hardware configuration and the phase of the moon.
Use ConIn->WaitForKey unconditionally instead.

Fixes #3632
2016-07-18 15:19:32 -04:00
Marcel Holtmann
14eb41b2a4 hwdb: Update database of Bluetooth company identifiers 2016-07-18 14:56:46 +02:00
tblume
201b13c81e nspawn: decrease mkdir error logging in /sys to debug priority (#3748)
Such mkdir errors happen for example when trying to mkdir /sys/fs/selinux.

/sys is documented to be readonly in the container, so mkdir errors below /sys
can be expected.
They shouldn't be logged as warnings since they lead users to think that
there is something wrong.
2016-07-18 12:23:08 +02:00
Lennart Poettering
b6070695c8 Merge pull request #3745 from keszybz/fix-make-nulstr-confusion
Fix make nulstr confusion
2016-07-18 11:12:47 +02:00
Daniel Mack
d909beef0a Merge pull request #3746 from keszybz/trivial-fixes
Trivial fixes
2016-07-18 09:54:06 +02:00
Zbigniew Jędrzejewski-Szmek
fc549b9605 Drop parentheses in two places 2016-07-17 19:58:07 -04:00
Zbigniew Jędrzejewski-Szmek
96ace31dcd systemd-resolve: remove spurious newline with no global settings 2016-07-17 19:58:02 -04:00
Zbigniew Jędrzejewski-Szmek
7b7c1aacf6 systemd-resolve: use plural "DNS Servers"
Usually multiple DNS servers are configured, and it looks strange to have
singular in the heading.
2016-07-17 19:58:02 -04:00
Zbigniew Jędrzejewski-Szmek
b60df13b39 basic/strv: add an extra NUL after strings in strv_make_nulstr
strv_make_nulstr was creating a nulstr which was not a valid nulstr,
because it was missing the terminating NUL. This didn't cause any issues,
because strv_parse_nulstr correctly parsed the result, using the
separately specified length.

But it's confusing to have something called nulstr which really isn't.
It is likely that somebody will try to use strv_make_nulstr() in
some other place, incorrectly.

This patch changes strv_parse_nulstr() to produce a valid nulstr, and
changes the output length parameter to be the minimum number of bytes
which can be later on parsed by strv_parse_nulstr(). This allows the
only user in ask-password-api to be slightly simplified.

Based-on-patch-by: Jean-Sébastien Bour <jean-sebastien@bour.name>

Fixes #3689.
2016-07-17 15:34:57 -04:00
Jean-Sébastien Bour
f41794d036 basic/strv: exhibit strv_make_nulstr missing final NUL char (systemd/systemd#3689) 2016-07-17 18:14:59 +02:00
Lukáš Nykrýn
ccc2c98e1b manager: don't skip sigchld handler for main and control pid for services (#3738)
During stop when service has one "regular" pid one main pid and one
control pid and the sighld for the regular one is processed first the
unit_tidy_watch_pids will skip the main and control pid and does not
remove them from u->pids(). But then we skip the sigchld event because we
already did one in the iteration and there are two pids in u->pids.

v2: Use general unit_main_pid() and unit_control_pid() instead of
reaching directly to service structure.
2016-07-16 15:04:13 -04:00
Michael Biebl
7fbbf283c8 man: mention system-shutdown hook directory in synopsis (#3741)
The distinction between systemd-shutdown the binary vs system-shutdown
the hook directory (without the 'd') is not immediately obvious and can
be quite confusing if you are looking for a directory which doesn't exist.

Therefore explicitly mention the hook directory in the synopsis with a
trailing slash to make it clearer which is which.
2016-07-16 12:51:45 -04:00
Zbigniew Jędrzejewski-Szmek
e306f2df03 man: replace dash with mdash where appropriate 2016-07-16 11:09:25 -04:00
Lennart Poettering
1b0ff615c7 build-sys: add mkosi hookup (#3731)
This adds a build script and a settings file for "mkosi", a tool for putting
together full, bootable disk images for container managers of EFI systems and
VMs.

With these files it's enough to type "mkosi" in the project directory to
generate a bootable Fedora 24 OS image with a version of systemd compiled fresh
from the working tree.

See https://github.com/systemd/mkosi
2016-07-15 20:00:44 -04:00
Susant Sahani
2f27e2c556 networkd: fix for 3692 (#3699)
We should look that the kind is invalid rather than pointer is NULL.
2016-07-15 18:50:51 +02:00
Rusty Bird
542127ea96 rules: UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG property (#3714)
Sometimes, the persistent storage rules should be skipped for a subset
of devices. For example, the Qubes operating system prevents dom0 from
parsing untrusted block device content (such as filesystem metadata) by
shipping a custom 60-persistent-storage.rules, patched to bail out early
if the device name matches a hardcoded pattern.

As a less brittle and more flexible alternative, this commit adds a line
to the two relevant .rules files which makes them test the value of the
UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG device property, modeled
after the various DM_UDEV_DISABLE_*_RULES_FLAG properties.
2016-07-15 18:47:42 +02:00
Zbigniew Jędrzejewski-Szmek
2ed968802c tree-wide: get rid of selinux_context_t (#3732)
9eb9c93275
deprecated selinux_context_t. Replace with a simple char* everywhere.

Alternative fix for #3719.
2016-07-15 18:44:02 +02:00
Stef Walter
8d00539d99 udev: Line buffer 'udev monitor' output (#3733)
Callers of the 'udev monitor' tool expect to see output when
an event occurs. The stdio buffering defeats that. This patch
switches it to line buffering.
2016-07-15 12:24:34 +02:00
ntzrmtthihu777
b010a6a1ae zsh-completion: fix option ordering in set-x11-keymap (#3646) 2016-07-15 04:59:45 -04:00
Zbigniew Jędrzejewski-Szmek
1071fd0823 macros: provide %_systemdgeneratordir and %_systemdusergeneratordir (#3672)
... as requested in
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/DJ7HDNRM5JGBSA4HL3UWW5ZGLQDJ6Y7M/.
Adding the macro makes it marginally easier to create generators
for outside projects.

I opted for "generatordir" and "usergeneratordir" to match
%unitdir and %userunitdir. OTOH, "_systemd" prefix makes it obvious
that this is related to systemd. "%_generatordir" would be to generic
of a name.
2016-07-15 09:35:49 +02:00
Daniel Mack
a34349e733 network-ndisc: avoid VLAs (#3725)
Do not allocate objects of dynamic and potentially large size on the stack
to avoid both clang compilation errors and unpredictable runtime behavior
on exotic platforms. Use the heap for that instead.

While at it, refactor the code a bit. Access 's->domain' via
NDISC_DNSSL_DOMAIN(), and refrain from allocating 'x' independently, but
rather reuse 's' if we're dealing with a new entry to the set.

Fixes #3717
2016-07-14 22:56:11 -04:00
Michal Soltys
f749954d92 correct information about implicit dependencies (#3730)
systemd.special.xml: corrections about implicit
dependencies for basic.target, sysinit.target and shutdown.target.

systemd.target.xml: corrections about implicit dependencies for
target units in general.
2016-07-14 22:20:45 -04:00
Zbigniew Jędrzejewski-Szmek
20f873deb2 Merge pull request #3709 from poettering/journald-shutdown-sync
journald-related shutdown fixes for slow I/O
2016-07-14 21:47:49 -04:00
Andreas Pokorny
d3a37494e6 Fix tablet detection, by replicating decision tree of non-multi-touch axes (#3724)
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-07-14 22:42:10 +02:00
Peter Hutterer
404304f64a hwdb: add axis corrections for the Lenovo V360 touchpad (#3712)
https://bugs.freedesktop.org/show_bug.cgi?id=96875
2016-07-14 09:28:53 +02:00
Valentin Vidić
0a86e68147 basic/mount-util: recognize ocfs2 as network fs (#3713) 2016-07-14 07:34:36 +02:00
Lennart Poettering
2e79d1828a shutdown: already sync IO before we enter the final killing spree
This way, slow IO journald has to wait for can't cause it to reach the killing
spree timeout and is hit by SIGKILL in addition to SIGTERM.
2016-07-12 17:38:19 +02:00
Lennart Poettering
d450612953 shutdown: use 90s SIGKILL timeout
There's really no reason to use 10s here, let's instead default to 90s like we
do for everything else.

The SIGKILL during the final killing spree is in most regards the fourth level
of a safety net, after all: any normal service should have already been stopped
during the normal service shutdown logic, first via SIGTERM and then SIGKILL,
and then also via SIGTERM during the finall killing spree before we send
SIGKILL. And as a fourth level safety net it should only be required in
exceptional cases, which means it's safe to rais the default timeout, as normal
shutdowns should never be delayed by it.

Note that journald excludes itself from the normal service shutdown, and relies
on the final killing spree to terminate it (this is because it wants to cover
the normal shutdown phase's complete logging). If the system's IO is
excessively slow, then the 10s might not be enough for journald to sync
everything to disk and logs might get lost during shutdown.
2016-07-12 17:32:30 +02:00
Michael Biebl
595bfe7df2 Various fixes for typos found by lintian (#3705) 2016-07-12 12:52:11 +02:00
Jakub Wilk
037a3ded54 man: fix indefinite articles (#3694) 2016-07-12 11:58:14 +02:00
Luca Bruno
391b81cd03 seccomp: only abort on syscall name resolution failures (#3701)
seccomp_syscall_resolve_name() can return a mix of positive and negative
(pseudo-) syscall numbers, while errors are signaled via __NR_SCMP_ERROR.
This commit lets the syscall filter parser only abort on real parsing
failures, letting libseccomp handle pseudo-syscall number on its own
and allowing proper multiplexed syscalls filtering.
2016-07-12 11:55:26 +02:00
Michael Biebl
e18ec3c71d Merge pull request #3702 from torstehu/fix-typo
treewide: fix typos and remove accidental repetition of words
2016-07-12 02:47:25 +02:00
Torstein Husebø
61233823aa treewide: fix typos and remove accidental repetition of words 2016-07-11 16:18:43 +02:00
WaLyong Cho
d5db7fe66a systemctl: show failed condition list
When unit has multiple condition list, systemctl is not showing which
conditions were failed. When user want to know which conditions were
failed, user has to check for each conditions.
So, show failed condition list also.
2016-07-11 10:19:55 +09:00
Ivan Shapovalov
d6cdc4cd4b man: improve wording for calendar spec's repetition values (#3687) 2016-07-08 21:08:07 +02:00
Alessandro Puccetti
14ca5c9cb4 nspawn-completion: implementation of shell completion of --notify-ready (#3679)
Relative to: https://github.com/systemd/systemd/pull/3474
2016-07-08 17:44:20 +02:00