Commit Graph

26449 Commits

Author SHA1 Message Date
Peter Hutterer 1d6a2375f4 hwdb: axis resolution override for the Lenovo Y700 (#3769)
https://bugs.freedesktop.org/show_bug.cgi?id=97011
2016-07-21 10:55:36 +02:00
Lennart Poettering 1f5dc27b66 Merge pull request #3770 from AlexanderKurtz/master
bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".
2016-07-21 10:55:05 +02:00
Thomas H. P. Andersen f8298f7be3 core: remove duplicate includes (#3771) 2016-07-21 10:52:07 +02:00
Zbigniew Jędrzejewski-Szmek be1354d8df Merge pull request #3760 from poettering/rfkill-fix
rfkill dead-lock fix
2016-07-20 22:19:05 -04:00
Lennart Poettering e4a3e122b2 documentation: add a short document describing how to test your systemd build tree (#3763) 2016-07-20 22:15:54 -04:00
Alexander Kurtz 00f69504a2 bootctl: Always use upper case for "/EFI/BOOT" and "/EFI/BOOT/BOOT*.EFI".
If the ESP is not mounted with "iocharset=ascii", but with "iocharset=utf8"
(which is for example the default in Debian), the file system becomes case
sensitive. This means that a file created as "FooBarBaz" cannot be accessed as
"foobarbaz" since those are then considered different files.

Moreover, a file created as "FooBar" can then also not be accessed as "foobar",
and it also prevents such a file from being created, as both would use the same
8.3 short name "FOOBAR".

Even though the UEFI specification [0] does give the canonical spelling for
the files mentioned above, not all implementations completely conform to that,
so it's possible that those files would already exist, but with a different
spelling, causing subtle bugs when scanning or modifying the ESP.

While the proper fix would of course be that everybody conformed to the
standard, we can work around this problem by just referencing the files by
their 8.3 short names, i.e. using upper case.

Fixes: #3740

[0] <http://www.uefi.org/specifications>, version 2.6, section 3.5.1.1
2016-07-21 03:02:15 +02:00
Alexander Kurtz b7536c45ef bootctl: Use lower case string constants in case-insensitive comparisons. 2016-07-21 02:20:12 +02:00
Topi Miettinen 176e51b710 namespace: fix wrong return value from mount(2) (#3758)
Fix bug introduced by #3263: mount(2) return value is 0 or -1, not errno.

Thanks to Evgeny Vereshchagin (@evverx) for reporting.
2016-07-20 17:43:21 +03:00
Daniele Medri 01a326affd PO: italian updates (#3761) 2016-07-20 13:02:28 +02:00
Lennart Poettering 42c32d6ff4 Merge pull request #3759 from poettering/namespace-fixup
minor follow-up fixes for #3685
2016-07-20 09:22:40 +02:00
Lennart Poettering 32eae3c2a8 rules: make sure always set at least one property on rfkill devices
The rfkill service waits for rfkill device initialization as reported by
udev_device_is_initialized(), and if that is never reported it might dead-lock.

However, udev never reports completed initialization for devices that have no
properties or tags set. For some rfkill devices this might be the case, in
particular those which are connected to exotic busses, where path_id returns
nothing.

This patch simply sets the SYSTEM_RFKILL property on all rfkill devices, to
ensure that udev_device_is_initialized() always reports something useful and we
don't dead-lock.

Fixes: #2745
2016-07-20 09:17:57 +02:00
Lennart Poettering 891a15cab2 man: document a tiny bit better what udev_device_get_is_initialized() actually returns 2016-07-20 09:17:33 +02:00
Lennart Poettering 5fd7cf6fe2 namespace: minor improvements
We generally try to avoid strerror(), due to its threads-unsafety, let's do
this here, too.

Also, let's be tiny bit more explanatory with the log messages, and let's
shorten a few things.
2016-07-20 08:57:25 +02:00
Lennart Poettering d724118e20 core: hide legacy bus properties
We usually hide legacy bus properties from introspection. Let's do that for the
InaccessibleDirectories= properties too.

The properties stay accessible if requested, but they won't be listed anymore
if people introspect the unit.
2016-07-20 08:55:50 +02:00
mulkieran 13317a22e5 man: revise entry about specifying a file path (#3739)
* Specifying a device node has an effect much larger than a simple shortcut
for a field/value match, so the original sentence is no longer a good way
to start the paragraph.
* Specifying a device node causes matches to be generated for all ancestor
devices of the device specified, not just its parents.
* Indicates that the path must be absolute, but that it may be a link.
* Eliminates a few typos.
2016-07-19 23:15:22 -04:00
Zbigniew Jędrzejewski-Szmek dfc6109fcd man: mention that locale changes might require initramfs to be rebuilt (#3754)
https://bugzilla.redhat.com/show_bug.cgi?id=1151651

Also explain what localectl does a bit better:
https://bugzilla.redhat.com/show_bug.cgi?id=1357861
2016-07-19 21:24:23 +02:00
Lennart Poettering 069a92c658 Merge pull request #3685 from kinvolk/alessandro/inaccessible-paths
namespace: unify limit behavior on non-directory paths
2016-07-19 21:17:49 +02:00
Evgeny Vereshchagin 4526e15d06 Merge pull request #3636 from poettering/logs-show-utf8
improve handling of trailing newline in journal logging
2016-07-19 21:11:41 +03:00
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