Commit Graph
14592 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek e4798529d9 util: treat fuse.sshfs as a network filesystem
https://bugs.freedesktop.org/show_bug.cgi?id=73727
(cherry picked from commit da92ca5eb5)
2014-06-21 11:03:24 -04:00
Lennart Poettering 92254f72bb core: clean-up signal reset logic when reexec
There's no need to save the old sigmask, if we are going to die. Let's
simplify this. Also, reset all the signal handlers, so that we don't
leave SIG_IGN set for some of them across reexec.

(cherry picked from commit 9bfcda9528)
2014-06-21 11:02:25 -04:00
Ruediger Oertel 3eb31d88fd Reset signal-mask on re-exec to init=..
Process 1 (aka init) needs to be started with an empty signal mask.
That includes the process 1 that's started after the initrd is finished.
When the initrd is using systemd (as it does with dracut based initrds)
then it is systemd that calls the real init.  Normally this is systemd
again, except when the user uses for instance "init=/bin/bash" on the
kernel command line.

(cherry picked from commit 5a85ca1cb6)
2014-06-21 11:02:24 -04:00
Michael Marineau 686e842aec shared: fix search_and_fopen with alternate roots
Update for the current behavior of path_strv_resolve which now returns
paths relative to the given root, not the full absolute paths.

(cherry picked from commit 375eadd911)
2014-06-21 11:00:58 -04:00
Michael Marineau 8d4847827d shared: add root argument to search_and_fopen
This adds the same root argument to search_and_fopen that
conf_files_list already has. Tools that use those two functions as a
pair can now be easily modified to load configuration files from an
alternate root filesystem tree.

(cherry picked from commit 4cf7ea556a)
2014-06-21 11:00:58 -04:00
Michael Marineau 084c41bc14 conf-files: include root in returned file paths
This restores the original root handling logic that was present prior to
112cfb18 when path expansion moved to path_strv_canonicalize_absolute.
That behavior partially went away in 12ed81d9.

Alternatively all users of conf_files_list* could be updated to
concatenate the paths themselves as unit_file_query_preset did but since
no user needs the un-concatenated form that is pointless duplication.

(cherry picked from commit cba2ef0272)

Conflicts:
	src/shared/install.c
2014-06-21 10:57:24 -04:00
Zbigniew Jędrzejewski-Szmek 98023e0968 getty-generator: properly escape instance names
Otherwise the add_symlink() function tries to make directories for
each slash even for the slash after the @ symbol in the final link
name, failing for /dev/3270/tty1.

Based on a patch by Werner Fink <werner@suse.de>.

(cherry picked from commit a2ae516a25)
2014-06-21 10:33:56 -04:00
Thomas Hindoe Paaboel Andersen ca5fd86c37 socket: check return from exec_spawn
(cherry picked from commit cee288adf8)
2014-06-21 10:33:38 -04:00
Ronny Chevalier 266eaa6b59 build-sys: add missing backslash
(cherry picked from commit fe582db94b)
2014-06-21 10:32:22 -04:00
Marcel Holtmann 969654dbb6 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 7cfa80f07e)
2014-06-18 14:42:17 -04:00
Kay Sievers cc1e6e5c14 rules: add loop-control and btrfs-control to "disk" group
(cherry picked from commit 27e7c26268)
2014-06-18 14:42:05 -04:00
Lennart Poettering 137cb035d2 cryptsetup: introduce new cryptsetup-pre.traget unit so that services can make sure they are started before and stopped after any LUKS setup
https://bugzilla.redhat.com/show_bug.cgi?id=1097938
(cherry picked from commit 9542239eaf)
2014-06-18 14:41:49 -04:00
Denis Tikhomirov 385d2ab37b backlight: Do not clamp brightness for LEDs
https://bugs.freedesktop.org/show_bug.cgi?id=77092

On Thu, Jun 05, 2014 at 08:37:20AM +0200, Lennart Poettering wrote:
> The patch is line-broken, please send an uncorrupted patch!
I am very sorry, I forgot that my client limits line width. I will use
mutt now on.
> clamp_brightness() clamps the brightness value to the range of the
> actual device. This is a recent addition that was added to deal with
> driver updates where the resolution is changed. I don't think this part
> should be dropped for LED devices. The clamp_brightness() call hence
> should be called unconditionally, however, internally it should use a
> different min_brightness value if something is an !backlight devices...
Thank you for explanation, this sounds very reasonable to me. Please,
see updated patch:

(cherry picked from commit 4cd2b2cf8c)
2014-06-18 13:52:17 -04:00
Jani Nikula d4666a8893 backlight: handle saved brightness exceeding max brightness
If too high a brightness value has been saved (e.g. due to kernel
mechanism changing from one kernel version to another, or booting the
userspace on another system), the brightness update fails and the
process exits.

Clamp saved brightness between the policy minimum introduced in

commit 7b909d7407
Author: Josh Triplett <josh@joshtriplett.org>
Date:   Tue Mar 11 21:16:33 2014 -0700

    backlight: Avoid restoring brightness to an unreadably dim level

and the absolute maximum.

https://bugs.freedesktop.org/show_bug.cgi?id=78200
(cherry picked from commit 0c9d8f1d4b)
2014-06-18 13:52:05 -04:00
Zbigniew Jędrzejewski-Szmek 45f427fe36 backlight: unify error messages
(cherry picked from commit 938d2699d2)
2014-06-18 13:51:47 -04:00
Thomas Bächler 555853f8ad backlight: do nothing if max_brightness is 0
On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded.
It exposes a backlight device despite the lack of any physical backlight
devices. This fake backlight device has max_brightness set to 0. Since
the introduction of the clamp_brightness function, systemd-backlight
tries to write '1' to brightness and fails.

This patch changes systemd-backlight to exit gracefully when
max_brightness is 0 before performing any action. This affects
both the load and save actions.

(cherry picked from commit 3cadce7d33)
2014-06-18 13:51:36 -04:00
Josh Triplett 7bd1f7eab1 backlight: Avoid restoring brightness to an unreadably dim level
Some systems turn the backlight all the way off at the lowest levels.
Clamp saved brightness to at least 1 or 5% of max_brightness.  This
avoids preserving an unreadably dim screen, which would otherwise force
the user to disable state restoration.

(cherry picked from commit 7b909d7407)
2014-06-18 13:51:21 -04:00
Josh Triplett b8b80c8aa1 backlight: Fix copy/paste error printing an unrelated error code
udev_device_get_sysattr_value returns NULL on failure, but doesn't
provide an error code; thus, when printing an error from it, don't print
an unrelated error code from a previous call.

(cherry picked from commit cddc35f75e)
2014-06-18 13:51:16 -04:00
Lennart Poettering aa5882a2d1 install: simplify symlink --root= logic
(cherry picked from commit 278fa5758c)
2014-06-17 16:53:11 -04:00
Lennart Poettering 9139b554df install: make sure that --root= mode doesn't make us consider all units outside of search path
(cherry picked from commit 8f294b45cb)
2014-06-17 16:53:11 -04:00
Lennart Poettering b83e096610 install: make sure "systemctl disable foobar@.service" actually removes all instances
(cherry picked from commit 559367add5)

Conflicts:
	src/shared/install.c
2014-06-17 16:53:11 -04:00
Lennart Poettering ce31446905 install: when looking for a unit file for enabling, search for templates only after traversing all search directories
Let's always make sure to look in all search directories for the full
unit names first, before looking for templates for them.

(cherry picked from commit e50bd77516)
2014-06-17 16:53:11 -04:00
Lennart Poettering 8694060896 install: simplify and clarify disabling logic for instanced units
(cherry picked from commit bcafe923a7)
2014-06-17 16:53:11 -04:00
Lennart Poettering e4914615e7 install: various modernizations
(cherry picked from commit da39f6a63e)
2014-06-17 16:53:11 -04:00
Frederic Crozat 2b44d8fbbd bootchart: set white background
In programs like eog and gimp the transparant background did not
look very good.

Similar fix from the one done in systemd-analyze (418e3750)

(cherry picked from commit a7997073ac)
2014-06-17 16:53:11 -04:00
Lennart Poettering f5fbcb6e04 conf-files: fix when for --root= logic
This is based on parts of similar patches from Michael Marineau and
Lukas Nykrin, but simply uses strappenda3().

(cherry picked from commit cebed5005b)
2014-06-17 16:53:11 -04:00
Lennart Poettering fe2be3dd40 unit-name: fix detection of unit templates/instances
We need to check for the last dot, not the first one in a unit name, for
the suffix. Correct that.

(cherry picked from commit 6ef9eeed61)
2014-06-17 16:53:11 -04:00
Harald Hoyer 4f0b9b4334 systemctl: for switch-root check, if we switch to a systemd init
If "systemctl switch-root" is called with a specific "INIT" or
/proc/cmdline contains "init=", then systemd would not serialize
itsself.

Let systemctl check, if the new init is in the standard systemd
installation path and if so, clear the INIT parameter,
to let systemd serialize itsself.

(cherry picked from commit f39d4a08e7)

For strappenda3, and it seems a good fix in general.
2014-06-17 16:53:11 -04:00
Harald Hoyer ac0c2a0e3c util: add files_same() helper function
files_same() returns
     1, if the files are the same
     0, if the files have different inode/dev numbers
 errno, for any stat error

(cherry picked from commit 9d9951a460)
2014-06-17 16:53:11 -04:00
Lennart Poettering 1762262e61 tmpfiles: set up selinux label proeprly when creating fifos
(cherry picked from commit 45c196a76b)

Conflicts:
	src/shared/util.c
2014-06-16 19:03:40 -04:00
Lennart Poettering 2ea8cba266 rpm: don't hardcode the binary paths in the macros, rely on $PATH
this gives us a little bit more freedom to move things around later on,
as we don't hardcode the systemd paths in old RPMs that shall work with
new systemds.

(cherry picked from commit 8cf7c96517)
2014-06-16 19:01:06 -04:00
Andreas Henriksson bcb667c211 install: fix invalid free() in unit_file_mask()
int unit_file_mask(...) in ./src/shared/install.c calls
get_config_path(...) which can in 4 error cases return without setting
"ret", and thus "prefix" can be uninitialized when unit_file_mask(...)
finishes (which it does directly after the error is returned from
get_config_path(...)).

(cherry picked from commit 223217749e)
2014-06-16 19:00:44 -04:00
Andreas Henriksson 4a6f3f091a udev: fix invalid free() in enable_name_policy()
static bool enable_name_policy(...) in ./src/udev/net/link-config.c
calls proc_cmdline(...) to get "line" initialized, but
proc_cmdline(...) does not guarantee that atleast when both
conditions (detect_container(NULL) > 0) and
read_full_file(...) returned < 0.

(cherry picked from commit f8a0bb5285)
2014-06-16 19:00:17 -04:00
Andreas Henriksson 89655d1297 core: fix invalid free() in killall()
static int killall(....) in ./src/core/killall.c tries to get "s"
initialized by calling get_process_comm(...) which calls
read_one_line_file(...) which if it fails will mean it is left
uninitialized.
It is then used in argument to strna(s) call where it is
dereferenced(!), in addition to nothing else initializing it before
the scope it is in finishes.

(cherry picked from commit 3e09eb5c83)
2014-06-16 18:59:32 -04:00
Lennart Poettering 406be70b2f units: order network-online.target after network.target
There might be implementations around where the network-online logic
might not talk to any network configuration service (and thus not have
to wait for it), hence let's explicitly order network-online.target
after network.target to avoid any ambiguities.

(cherry picked from commit 58e027023b)

Conflicts:
	units/systemd-networkd-wait-online.service.in
2014-06-16 18:58:05 -04:00
Lennart Poettering 00d967b989 label: when clearing selinux context, don't mangle errno
(cherry picked from commit 874f1947e3)
2014-06-16 18:56:56 -04:00
Ronny Chevalier b4ce8bd84c log: honour the kernel's quiet cmdline argument
It was forgotten in b1e90ec515

See https://bugs.freedesktop.org/show_bug.cgi?id=79582

(cherry picked from commit e683212f04)
2014-06-16 18:56:31 -04:00
Lennart Poettering 1f98d3636d man: updates to the passive target section
(cherry picked from commit 51cb9d734a)
2014-06-16 18:52:42 -04:00
Thomas Blume f22d2ebe68 systemd-detect-virt: only discover Xen domU
The current vm detection lacks the distinction between Xen dom0 and Xen domU.
Both, dom0 and domU are running inside the hypervisor.
Therefore systemd-detect-virt and the ConditionVirtualization directive detect
dom0 as a virtual machine.

dom0 is not using virtual devices but is accessing the real hardware.
Therefore dom0 should be considered the virtualisation host and not a virtual
machine.

https://bugs.freedesktop.org/show_bug.cgi?id=77271
(cherry picked from commit 37287585b6)
2014-06-16 18:52:15 -04:00
Mark Eichin e3d71d5dc2 man: Searching for an explanation of what a "slice unit" was, found this, felt compelled to send in fixes for the obvious typos
(cherry picked from commit 299a55075d)
2014-06-16 18:51:55 -04:00
David Strauss 69977785a4 man: clarify the effect of replace-irreversibly on future conflicting jobs
(cherry picked from commit 9a92e77e43)
2014-06-16 18:51:32 -04:00
Zbigniew Jędrzejewski-Szmek 8343042f7a nspawn: split long message into two lines
For names like /var/lib/container/something, the message
becomes quite long. Better to split it.

Also reword the message not to suggest that ^]^]^] only works
in the beginning.

(cherry picked from commit 45f1386c9a)

Conflicts:
	src/nspawn/nspawn.c
2014-06-16 18:50:19 -04:00
Mantas Mikulėnas 44045f883f man: fix references to sd_journal_cutoff_realtime_usec
(cherry picked from commit d275b52969)
2014-06-16 18:46:26 -04:00
Kay Sievers 47023e8267 hwdb: fix case-sensitive match
(cherry picked from commit 4c02dd7153)
2014-06-16 18:32:40 -04:00
Zbigniew Jędrzejewski-Szmek db75f7e5b9 keyboard: add Plantronics .Audio mute button
https://bugs.freedesktop.org/show_bug.cgi?id=79495
(cherry picked from commit 9e3dbf6b2b)
2014-06-16 18:31:54 -04:00
Cristian Rodríguez 54fcd1a651 tty-ask-password-agent: Do tell what directory we failed to open
(cherry picked from commit 267b3e41df)
2014-06-16 18:31:23 -04:00
Cristian Rodríguez 55cf7f15b4 udev-builtin-keyboard: do tell on which device EVIOCSKEYCODE failed.
I am getting

"Error calling EVIOCSKEYCODE (scan code 0xc022d, key code 418): Invalid
argument", the error message does not tell on which specific device the
problem is, add that info.

(cherry picked from commit a52ec8ed88)
2014-06-16 18:31:21 -04:00
Thomas Hindoe Paaboel Andersen c4a42680d7 util: ignore_file should not allow files ending with '~'
ignore_file currently allows any file ending with '~' while it
seems that the opposite was intended:
a228a22fda

(cherry picked from commit 93f1a06374)
2014-06-16 18:31:11 -04:00
Jonathan Liu 62d2980f8e units: use KillMode=mixed for systemd-nspawn@.service
This causes the container to shut down cleanly when the service is
stopped.

(cherry picked from commit d8e40d62ab)
2014-06-16 18:31:10 -04:00
Thomas Bächler 99139fe295 analyze/run: use bus_open_transport_systemd instead of bus_open_transport
Both systemd-analyze and systemd-run only access org.freedesktop.systemd1
on the bus. This patch allows using systemd-run --user and systemd-analyze
--user even if the user session's bus is not properly integrated with the
systemd user unit.

https://bugs.freedesktop.org/show_bug.cgi?id=79252 and other reports...
(cherry picked from commit 1f89214e6e)
2014-06-16 18:31:08 -04:00