1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

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 da92ca5eb506d513033e0c7a85daf25a7e1c9d0e)
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 9bfcda9528636914aef3e0ab91191bb81654c83d)
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 5a85ca1cb622fda4a39c8a6f00dccea7f8a1e82a)
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 375eadd911a9f83f89f1e7de5e05f44cc81e3642)
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 4cf7ea556aa1e74f9b34d4467f36d46a1bb25da3)
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 cba2ef02722114da2b730d57f1e3bb43013d8921)

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 a2ae516a25dafe41e0cd296ab7b5d022fa62b95f)
2014-06-21 10:33:56 -04:00
Thomas Hindoe Paaboel Andersen
ca5fd86c37 socket: check return from exec_spawn
(cherry picked from commit cee288adf88844acd880e4c0da5ed550c85cdd1a)
2014-06-21 10:33:38 -04:00
Ronny Chevalier
266eaa6b59 build-sys: add missing backslash
(cherry picked from commit fe582db94bac3743b87d67d880497fe40b06dd2f)
2014-06-21 10:32:22 -04:00
Marcel Holtmann
969654dbb6 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 7cfa80f07e94c3e48703d145ef03a73dd6e7b983)
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 27e7c26268bd4c16edb92f2b8a8626b00c6f2dad)
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 9542239eaf481decca6c254dffb3f2b4e716545e)
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 4cd2b2cf8ca585d15ebc859701b346658262b5bb)
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 7b909d7407965c03caaba30daae7aee113627a83
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 0c9d8f1d4b5018199cb5a9b57580dc1480a7f915)
2014-06-18 13:52:05 -04:00
Zbigniew Jędrzejewski-Szmek
45f427fe36 backlight: unify error messages
(cherry picked from commit 938d2699d2e818bd996614e89ea3d668200ad2a8)
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 3cadce7d33e263ec7a6a83c00c11144930258b22)
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 7b909d7407965c03caaba30daae7aee113627a83)
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 cddc35f75ecff63b2ffd3f8e4c863d475e7b14ca)
2014-06-18 13:51:16 -04:00
Lennart Poettering
aa5882a2d1 install: simplify symlink --root= logic
(cherry picked from commit 278fa5758c8e30f03c8c50f15873d55edfc4cbaf)
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 8f294b45cbb627d31342f6a79444be59ce7e2274)
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 559367add5e22bf32d14fa1496512c68488f48b0)

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 e50bd775163cd96be1888943a8785a436be710e8)
2014-06-17 16:53:11 -04:00
Lennart Poettering
8694060896 install: simplify and clarify disabling logic for instanced units
(cherry picked from commit bcafe923a74e702abbba3655b0270febe143499f)
2014-06-17 16:53:11 -04:00
Lennart Poettering
e4914615e7 install: various modernizations
(cherry picked from commit da39f6a63e9ca59bec23cc9d1cb841703bb5ef56)
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 a7997073ac07add6cb30dcd9491c0179b2d6ad52)
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 cebed5005b5ede17fc52ab50c054fca73bc938b8)
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 6ef9eeed61a291cc42b7d911f5cf5a4deca742a3)
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 f39d4a08e746e703d562076a0f622eb91dbdcd3e)

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 9d9951a460a90ef0e1e0384742cefdcf85193f8c)
2014-06-17 16:53:11 -04:00
Lennart Poettering
1762262e61 tmpfiles: set up selinux label proeprly when creating fifos
(cherry picked from commit 45c196a76b2d883552c90807386d9bed40da822b)

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 8cf7c96517c3688d29b30651adcda9e71e7fcb07)
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 223217749e57996336d5730b0a28716cca56d45d)
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 f8a0bb5285024b6ce372c3157e761e6543ebdcd2)
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 3e09eb5c83e56bc0184bd9d9c44f76047464f77c)
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 58e027023b47b32e42cf93dd4a629b869ee1ef25)

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 874f1947e33922f08c578696af5b628a0f67fec2)
2014-06-16 18:56:56 -04:00
Ronny Chevalier
b4ce8bd84c log: honour the kernel's quiet cmdline argument
It was forgotten in b1e90ec515408aec2702522f6f68c4920b56375b

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

(cherry picked from commit e683212f049ac5d3f95fb17300cfa2fd971f78f3)
2014-06-16 18:56:31 -04:00
Lennart Poettering
1f98d3636d man: updates to the passive target section
(cherry picked from commit 51cb9d734a182c4892a6b31f58d75489a2ca432b)
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 37287585b6ba9a55065c8f94458f6db3c0abe0af)
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 299a55075d1bf478b9190191caefd5c1b934340d)
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 9a92e77e4325b995288ef7cac144ecbf969886df)
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 45f1386c9adf0e2892306e8949ca71f4a52a8d36)

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 d275b5296958446957e98ce61213f98519e11808)
2014-06-16 18:46:26 -04:00
Kay Sievers
47023e8267 hwdb: fix case-sensitive match
(cherry picked from commit 4c02dd7153f970244950b5e00f7bdfea8d2ff0be)
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 9e3dbf6b2b99d0e16989d9cedb458729db5a60c3)
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 267b3e41df5a2181f2911433539f81de2fa1511a)
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 a52ec8ed881537627869afa8f0486db7e20ce2db)
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:
a228a22fda4faa9ecb7c5a5e499980c8ae5d2a08

(cherry picked from commit 93f1a06374e335e8508d89e1bdaadf45be6ab777)
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 d8e40d62ab871a87fde421c4b246bb45bc3cbe2d)
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 1f89214e6e990a0b552f6854f87f8514ca384956)
2014-06-16 18:31:08 -04:00