Commit Graph
17834 Commits
Author SHA1 Message Date
Jan Engelhardt 240c4b0868 vconsole: match on vtcon events, not fbcon ones
I observe that upon loading of framebuffer drivers, I do not get the
desired system font, but the kernel-level defaults (usually
lib/fonts/font_8x16.c, but your mileage may vary depending on kernel
config and boot options).

The fbcon driver may be loaded at a time way before the first
framebuffer device is active, such that the vconsole setup helper
runs too early.

The existing rule is non-fitting. The going live of the fbcon kernel
component does not indicate the proper time at which to load the
visuals, which really ought to be done when a new vtcon object comes
into existence. (The font table is a per-vtcon property.)

(cherry picked from commit a52750d148)
(cherry picked from commit b83da13fff)
2015-03-27 13:55:23 -04:00
Michael Biebl 64a51989b9 vconsole: don't hard-code systemd-vconsole-setup binary path 2015-03-27 13:52:15 -04:00
Zbigniew Jędrzejewski-Szmek 317ca85db0 Revert "vconsole: match on vtcon events, not fbcon ones"
This reverts commit b71cdaca9b.

The file got renamed in the meanwhile.
2015-03-27 13:51:41 -04:00
Michal Schmidt 56979fdd6f core/namespace: fix path sorting
The comparison function we use for qsorting paths is overly indifferent.
Consider these 3 paths for sorting:
 /foo
 /bar
 /foo/foo
qsort() may compare:
 "/foo" with "/bar" => 0, indifference
 "/bar" with "/foo/foo" => 0, indifference
and assume transitively that "/foo" and "/foo/foo" are also indifferent.

But this is wrong, we want "/foo" sorted before "/foo/foo".
The comparison function must be transitive.

Use path_compare(), which behaves properly.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1184016
(cherry picked from commit a0827e2b12)
(cherry picked from commit 85a6fabdd3)
2015-03-23 02:37:20 -04:00
Michal Schmidt d3797cb2e6 shared: add path_compare(), an ordering path comparison
... and make path_equal() a simple wrapper around it.

(cherry picked from commit 2230852bd9)
(cherry picked from commit 533cc35f09)
2015-03-23 02:37:12 -04:00
Zbigniew Jędrzejewski-Szmek 347a55643e timedated: flip internal status after executing operation
timedated would set the internal status before calling out to systemd to do
the actual change. When the operation was refused because of a SELinux denial,
the state kept in timedated would get out of sync, and the second call from
timedatectl would appear to succeed.

https://bugzilla.redhat.com/show_bug.cgi?id=1014315

(cherry picked from commit 192b98b8fe)
(cherry picked from commit fb14f86a71)

[Amended to reverse the condition.]
2015-03-23 02:36:47 -04:00
Will Woods 78db230ae6 selinux: fix SEGV during switch-root if SELinux policy loaded
If you've got SELinux policy loaded, label_hnd is your labeling handle.
When systemd is shutting down, we free that handle via mac_selinux_finish().

But: switch_root() calls mkdir_p_label(), which tries to look up a label
using that freed handle, and so we get a bunch of garbage and eventually
SEGV in libselinux.

(This doesn't happen in the switch-root from initramfs to real root because
there's no SELinux policy loaded in initramfs, so label_hnd is NULL and we
never attempt any lookups.)

So: make sure that mac_selinux_finish() actually sets label_hnd to NULL, so
nobody tries to use it after it becomes invalid.

https://bugzilla.redhat.com/show_bug.cgi?id=1185604
(cherry picked from commit f5ce2b4958)
(cherry picked from commit 19e98bf405)
2015-03-23 02:32:24 -04:00
Mathieu Chevrier 3e3ed4d07d gpt-auto-generator: fix detection of /srv
https://bugs.freedesktop.org/show_bug.cgi?id=89226
(cherry picked from commit d736e4f3e7)
(cherry picked from commit 4bbc153799)
2015-03-23 02:32:12 -04:00
Kay Sievers e2f9926caf hwdb: update
(cherry picked from commit b83cbcb7d9)
(cherry picked from commit 9ac622b00c)
2015-03-23 02:31:39 -04:00
Umut Tezduyar Lindskog 81495a07be cgtop: fix assert when not on tty
systemd-cgtop --dept=1 -b -n 10 -d 0.1 | cat

Assertion 'new_length >= 3' failed at src/shared/util.c:3 \
595, function ellipsize_mem(). Aborting.
Aborted (core dumped)

(David: add comment)

(cherry picked from commit 510c4a0f1e)
(cherry picked from commit b964d7b573)
2015-03-23 02:31:18 -04:00
David Herrmann fb7406ef1e console: fix error-code inversion
The error-code propagated via sysview is always negative. Avoid
multiplying by -1 before returning it. Otherwise, we will return >0
instead of <0, which will not be detected as error by sysview-core.

(cherry picked from commit 84c3561c58)
(cherry picked from commit c04228cbd9)
2015-03-23 02:30:55 -04:00
Tom Gundersen 23190abc30 udevd: close race in udev settle
The udev-settle guarantees that udevd is no longer processing any of the
events casued by udev-trigger. The way this works is that it sends a
synchronous PING to udevd after udev-trigger has ran, and when that returns
it knows that udevd has started processing the events from udev-trigger.
udev-settle will then wait for the event queue to empty before returning.

However, there was a race here, as we would only update the /run state at
the beginning of the event loop, before reading out new events and before
processing the ping.

That means that if the first uevent arrived in the same event-loop iteration
as the PING, we would return the ping before updating the queue state in /run
(which would happen on the next iteration).

The race window here is tiny (as the /run state would probably get updated
before udev-settle got a chance to read /run), but still a possibility.

Fix the problem by updating the /run state as the last step before returning
the PING.

We must still update it at the beginning of the loop as well, otherwise we
risk being stuck in poll() with a stale state in /run.

Reported-by: Daniel Drake <drake@endlessm.com>
(cherry picked from commit db93e063bd)
(cherry picked from commit 0c9591e78e)
2015-03-23 02:30:02 -04:00
Zbigniew Jędrzejewski-Szmek efb07dbf84 sd-journal: return error when we cannot open a file
Lack of this caused journalctl not to display a hint about missing groups
properly when the user lacks permissions.

(cherry picked from commit 7b300be75e)
(cherry picked from commit 67c29191b0)
2015-03-23 02:29:19 -04:00
Zbigniew Jędrzejewski-Szmek 3e6b696431 login: fix copy-pasto in error path
CID #1256583.

(cherry picked from commit dcee01125d)
(cherry picked from commit c29a899e63)
2015-03-23 02:29:08 -04:00
Jan Engelhardt b71cdaca9b vconsole: match on vtcon events, not fbcon ones
I observe that upon loading of framebuffer drivers, I do not get the
desired system font, but the kernel-level defaults (usually
lib/fonts/font_8x16.c, but your mileage may vary depending on kernel
config and boot options).

The fbcon driver may be loaded at a time way before the first
framebuffer device is active, such that the vconsole setup helper
runs too early.

The existing rule is non-fitting. The going live of the fbcon kernel
component does not indicate the proper time at which to load the
visuals, which really ought to be done when a new vtcon object comes
into existence. (The font table is a per-vtcon property.)

(cherry picked from commit a52750d148)
(cherry picked from commit b83da13fff)

Conflicts:
	src/vconsole/90-vconsole.rules
2015-03-23 02:28:38 -04:00
Hannes Reinecke 7ab8dc0dd4 Allow up to 4096 simultaneous connections
On large system we hit the limit on 512 simultaneous dbus
connections, resulting in tons of annoying messages:

Too many concurrent connections, refusing

This patch raises the limit to 4096.

(cherry picked from commit cbecf9bf92)
(cherry picked from commit 7eaa810935)
2015-03-23 02:27:40 -04:00
Hannes Reinecke d53586d247 Remove the cap on epoll events
Currently the code will silently blank out events if there are more
then 512 epoll events, causing them never to be handled at all. This
patch removes the cap on the number of events for epoll_wait, thereby
avoiding this issue.

(cherry picked from commit 1c724e9e0e)
(cherry picked from commit c2695a243c)
2015-03-23 02:27:32 -04:00
Zbigniew Jędrzejewski-Szmek b4d5fc4e05 hwdb: fix Dell XPS12 9Q33 key name
https://bugs.freedesktop.org/show_bug.cgi?id=84437
(cherry picked from commit 4f70555d76)
(cherry picked from commit cc32b9d93a)
2015-03-23 02:27:22 -04:00
John Paul Adrian Glaubitz bd476b3055 Use correct uname identifiers in arch_map for SuperH architecture
https://bugs.freedesktop.org/show_bug.cgi?id=89421
(cherry picked from commit 3a867c6a23)
(cherry picked from commit 9b6d110970)
2015-03-23 02:27:12 -04:00
Arend van Spriel e618003499 hwdb: add sdio identifiers for Broadcom WLAN cards
This patch adds the sdio identifiers known to be supported by
the brcmfmac open-source driver.

(cherry picked from commit 0c591b6c92)
(cherry picked from commit c10e229f82)
2015-03-23 02:25:36 -04:00
Marcel Holtmann 4028946d3d hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 3cabeab119)
(cherry picked from commit d150bc380c)
2015-03-23 02:25:14 -04:00
Chris Morin ebe3008887 man: make bootup graph consistent
(cherry picked from commit b44787bd43)
(cherry picked from commit 1295853b39)
2015-03-23 02:24:33 -04:00
Michal Schmidt 40fa3b1875 shared: handle unnamed sockets in socket_address_equal()
Make sure we don't inspect sun_path of unnamed sockets.
Since we cannot know if two unnamed sockets' adresses refer to the same
socket, just return false.

(cherry picked from commit 710708a54c)
(cherry picked from commit 04691e6f81)
2015-03-23 02:24:17 -04:00
Michal Schmidt cd9740bae3 core, shared: in deserializing, match same files reached via different paths
When dbus.socket is updated like this:
-ListenStream=/var/run/dbus/system_bus_socket
+ListenStream=/run/dbus/system_bus_socket
... and daemon-reload is performed, bad things happen.
During deserialization systemd does not recognize that the two paths
refer to the same named socket and replaces the socket file with a new
one. As a result, applications hang when they try talking to dbus.

Fix this by finding a match not only when the path names are equal, but
also when they point to the same inode.
In socket_address_equal() it is necessary to move the address size
comparison into the abstract sockets branch. For path name sockets the
comparison must not be done and for other families it is redundant
(their sizes are constant and checked by socket_address_verify()).

FIFOs and special files can also have multiple pathnames, so compare the
inodes for them as well. Note that previously the pathname checks used
streq_ptr(), but the paths cannot be NULL.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1186018
(cherry picked from commit c78e47a61f)
(cherry picked from commit 25e6978bb3)
2015-03-23 02:23:52 -04:00
Lubomir Rintel 67ca59c0e3 hwdb: fix ThinkPad X* Tablet special keys
ThinkPad tablet firmware has DMI product name and version reversed:

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: LENOVO
        Product Name: 7762AS1
        Version: ThinkPad X61 Tablet
        Serial Number: LKZCDH2
        UUID: 6ADBC681-4FC9-11CB-844F-B47CB9210BE2
        Wake-up Type: Power Switch
        SKU Number: Not Specified
        Family: ThinkPad X61 Tablet

(cherry picked from commit 39addb81b6)
(cherry picked from commit bfc587ff72)
2015-03-23 02:23:35 -04:00
Zbigniew Jędrzejewski-Szmek b53c70c883 shared/util: assume ac when /sys/class/power_supply is missing
On s390 (at least) /sys/class/power_supply is not present. We should
treat this like if this directory was empty, and not an error.

(cherry picked from commit 6d89003462)
(cherry picked from commit 0436d5c5f4)
2015-03-23 02:23:20 -04:00
Zbigniew Jędrzejewski-Szmek 0a11be8375 journal-remote: fix saving of binary fields
Binary fields were not processed properly, and resulting journal files
were non-conforming, resulting in an error ("Invalid field.") when reading.

https://bugs.freedesktop.org/show_bug.cgi?id=89391
(cherry picked from commit 09d801a82a)
(cherry picked from commit 91a3ba9064)
2015-03-23 02:22:54 -04:00
Cristian Rodríguez d3a64c1f3a shared: AFS is also a network filesystem
(cherry picked from commit ba89821c10)
(cherry picked from commit 3c350019fe)
2015-03-23 02:22:28 -04:00
Zbigniew Jędrzejewski-Szmek 946560fa72 sysctl: downgrade message about sysctl overrides to debug
Printing it at info level was tedious. We don't do that for any other
overrides.

(cherry picked from commit 7933e4266f)
(cherry picked from commit 2439dc6083)
2015-03-23 02:21:30 -04:00
Lennart Poettering 333e1f76f0 unit: use weaker dependencies between mount and device units in --user mode
When running in user mode unmounting of mount units when a device
vanishes is unlikely to work, and even if it would work is already done
by PID 1 anyway. HEnce, when creating implicit dependencies between
mount units and their backing devices, created a Wants= type dependency
in --user mode, but leave a BindsTo= dependency in --system mode.

(cherry picked from commit 5bd4b17360)
(cherry picked from commit fc9805756d)
2015-03-23 02:20:54 -04:00
Aaro Koskinen 4d2eb4f25d bootchart: svg: fix checking of list end
If we have less samples than expected, systemd-bootchart will crash.

(cherry picked from commit c1682f17a0)
(cherry picked from commit 668529dde3)
2015-03-23 02:20:31 -04:00
Zbigniew Jędrzejewski-Szmek 25b558800d systemctl: bump NOFILE only for systemctl_main
It is not necessary when running as telinit, etc.

https://bugzilla.redhat.com/show_bug.cgi?id=1184712
(cherry picked from commit 95d383ee47)
(cherry picked from commit 1df0ddca3a)
2015-03-23 02:20:17 -04:00
Michal Schmidt 120029c8c1 journal-remote: fix client_cert memory leak
Found by Valgrind while testing the previous memory leak fix.

(cherry picked from commit 32c3d7144c)
(cherry picked from commit 5852d2efbf)
2015-03-23 02:19:13 -04:00
Michal Schmidt 93a2ca67dd journal-remote: fix certificate status memory leak
The output of gnutls_certificate_verification_status_print() needs to be
freed.

Noticed this while staring at verify_cert_authorized() to see what could
possibly confuse gcc5 on armv7hl to segfault during compilation.

(cherry picked from commit 9c3cf9693a)
(cherry picked from commit 7057db8b36)
2015-03-23 02:19:01 -04:00
Marcel Holtmann 811843de4f hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 488c8d08c3)
2015-03-23 02:17:35 -04:00
Lennart Poettering caa51bc8d3 hwdb: update
(cherry picked from commit 407d02621e)
2015-03-23 02:17:23 -04:00
Zbigniew Jędrzejewski-Szmek b1cb97af13 core: make RuntimeDirectory honor SELinux labels
https://bugzilla.redhat.com/show_bug.cgi?id=1192726
(cherry picked from commit ca905b2fce)

Conflicts:
	src/core/execute.c
2015-03-23 02:16:31 -04:00
Lennart Poettering 304a33c23c hwdb: update name databases
(cherry picked from commit 6813a2fe4e)
2015-03-23 02:13:57 -04:00
Martin Pitt 428e287efa rules: simplify mmc RPMB handling
We don't actually want a by-path/ symlink for MMC RPMB devices, so just add
them to the blacklist. This will prevent creating wrong by-path links and
blkid'ing those.

(cherry picked from commit 0c13be389f)
2015-03-23 02:13:41 -04:00
Martin Pitt 1c9c067901 rules: Fix by-path of mmc RPMB partitions and don't blkid them
Linux 3.10+ exposes RPMB (Replay Protected Memory Block) partitions of MMC
devices [1] ; trying to read them with blkid or other unspecific means will
cause kernel buffer I/O errors and timeouts. So don't run blkid on these.

Also ensure that /dev/disk/by-path creates proper symlinks and exposes the
-rpmb partition separately, instead of letting the "normal" partition symlink
point to the rpbm device (this is a race condition).

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=090d25fe224c0

https://launchpad.net/bugs/1333140
(cherry picked from commit b87b01cf83)
2015-03-23 02:13:32 -04:00
Lennart Poettering 5e0da7f600 exec: also evaluate working_directory_missing_ok when not applying chroots
(cherry picked from commit cf1d0302ae)

Conflicts:
	src/core/execute.c
2015-03-23 02:13:01 -04:00
Lennart Poettering 32283b968a core: disarm shutdown watchdog if we fail to set timeout
Better safe than sorry, if drivers are stupid, and reset immediately on
device closing if the timeout could not be initialized.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777735
(cherry picked from commit c2cc6b9aef)
2015-03-23 02:10:49 -04:00
Lennart Poettering c17e9668d6 core: don't fail to run services in --user instances if $HOME is missing
Otherwise we cannot even invoke systemd-exit.service anymore, thus not
even exit.

https://bugs.freedesktop.org/show_bug.cgi?id=83100
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759320
(cherry picked from commit 4c08c8242a)

Conflicts:
	src/core/execute.c
2015-03-23 02:10:32 -04:00
Lennart Poettering 531201b4b6 core: don't watch for socket events when service is in SERVICE_STOP
If a service has an ExecStop= program that uses the socket the service was
activated by to tell it to terminate, then that should not be used as
trigger to start the service again.

http://lists.freedesktop.org/archives/systemd-devel/2015-February/028058.html
(cherry picked from commit d54ddab8cb)
2015-03-23 02:08:22 -04:00
Michael Olbrich 27834dd75b systemctl: don't update the reboot parameter if none is given
Otherwise systemd-reboot.service will remove the parameter that was set
before. This was broken in commit "b986229efe2cc96157aa14c37bab7843311bbef1
systemctl: bugfix for systemctl reboot command with argument"

(cherry picked from commit c31c4324c5)
2015-03-23 02:08:05 -04:00
Lennart Poettering e341873c56 core: correct a log message
The log message talks specifically about services, though it actually
applies to any kind of unit.

(cherry picked from commit 418761f586)

Conflicts:
	src/core/unit.c
2015-03-23 02:08:01 -04:00
Hui Wang 2d52b2dd8c keymap: Add microphone mute keymap for several HP laptops
On these several HP laptops, the microphone mute hotkey is "Fn+F8" and
the scancode for this hotkey is 0x81, but this scancode was mapped to
fn_esc in the HP generic keymap section. To fix this problem, we add
a machine specific keymap section to add the correct keymap rule.

BugLink: https://bugs.launchpad.net/bugs/1409721
BugLink: https://bugs.launchpad.net/bugs/1334968
Signed-off-by: Hui Wang <hui.wang@canonical.com>
(cherry picked from commit 4b9bb683ee)
2015-03-23 01:59:26 -04:00
Umut Tezduyar Lindskog 171335eb58 sysctl: consider --prefix while parsing the files
not while applying the parsed sysctl values. Otherwise
info "Overwriting earlier assignment of %s in file %s" is
visible many times even though the given --prefix doesn't
try to set the overridden value.

This also optimizes the startup tiny bit since we have udev
rules running on network devices and setting sysctl through
the rules.

(cherry picked from commit b99802f769)
2015-03-23 01:58:16 -04:00
Zbigniew Jędrzejewski-Szmek 2586e65f45 build-sys: remove reference to long gone file
Interesting that automake doesn't complain about this at all.
That file was removed in 3fb97a58fa.

(cherry picked from commit a08d90d6b3)
2015-03-23 01:57:57 -04:00
Zbigniew Jędrzejewski-Szmek 4d97551673 shared/log: read /proc/cmdline only in daemons
http://lists.freedesktop.org/archives/systemd-devel/2015-February/027960.html
(cherry picked from commit ee46e55570)

Conflicts:
	src/shared/log.c
2015-03-23 01:54:10 -04:00