Commit Graph
12697 Commits
Author SHA1 Message Date
Lennart Poettering 4a8d7c028d man: updates to the passive target section
(cherry picked from commit 51cb9d734a)
(cherry picked from commit 1f98d3636d)
2014-06-18 12:34:18 -04:00
Thomas Blume dfef23e1b6 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)
(cherry picked from commit f22d2ebe68)

Conflicts:
	src/shared/virt.c
2014-06-18 12:34:18 -04:00
Mark Eichin a0883f2dc0 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)
(cherry picked from commit e3d71d5dc2)
2014-06-18 12:34:17 -04:00
Mantas Mikulėnas 138156c156 man: fix references to sd_journal_cutoff_realtime_usec
(cherry picked from commit d275b52969)
(cherry picked from commit 44045f883f)
2014-06-18 12:34:17 -04:00
Kay Sievers 84f15607fd hwdb: fix case-sensitive match
(cherry picked from commit 4c02dd7153)
(cherry picked from commit 47023e8267)
2014-06-18 12:34:17 -04:00
Zbigniew Jędrzejewski-Szmek 1d8327c497 keyboard: add Plantronics .Audio mute button
https://bugs.freedesktop.org/show_bug.cgi?id=79495
(cherry picked from commit 9e3dbf6b2b)
(cherry picked from commit db75f7e5b9)
2014-06-18 12:34:17 -04:00
Cristian Rodríguez 8038e07f24 tty-ask-password-agent: Do tell what directory we failed to open
(cherry picked from commit 267b3e41df)
(cherry picked from commit 54fcd1a651)
2014-06-18 12:34:17 -04:00
Cristian Rodríguez da9ec06bdc 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)
(cherry picked from commit 55cf7f15b4)

Conflicts:
	src/udev/udev-builtin-keyboard.c
2014-06-18 12:34:17 -04:00
Thomas Hindoe Paaboel Andersen 1ad45b4f03 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)
(cherry picked from commit c4a42680d7)
2014-06-18 12:34:17 -04:00
Michal Sekletar b1710001db Do not unescape unit names in [Install] section
https://bugs.freedesktop.org/show_bug.cgi?id=49316
(cherry picked from commit 000f6e5667)
(cherry picked from commit 6a5aa37d14)
2014-06-18 12:34:17 -04:00
Kay Sievers 2a9ec8c983 udev: keyboard - also hook into "change" events
Re-apply the keymaps when "udevadm trigger" is called. Hooking into
"add" only would just remove all keymap content from the udev database
instead of applying the new config.

(cherry picked from commit 49804365ea)
(cherry picked from commit 8d9518eb8f)
2014-06-18 12:34:17 -04:00
Martin Pitt 0515a5d28d keymap: Asus EeePC touchpad toggle key
Originally is KEY_TOUCHPAD_TOGGLE, but X.org can't handle the big key events,
so use the F21 convention.

https://bugs.freedesktop.org/show_bug.cgi?id=72807
(cherry picked from commit e55edb22a7)
(cherry picked from commit 970e92893e)

Conflicts:
	hwdb/60-keyboard.hwdb
2014-06-18 12:34:16 -04:00
Martin Pitt 3771f1d5bd keymap: Add Lenovo Enhanced USB Keyboard
https://bugs.freedesktop.org/show_bug.cgi?id=77234
(cherry picked from commit d258d4967e)
(cherry picked from commit f36ed0204e)

Conflicts:
	hwdb/60-keyboard.hwdb
2014-06-18 12:34:16 -04:00
Lennart Poettering 01bd69736c socket: properly handle if our service vanished during runtime
(cherry picked from commit 640ace4a8d)
(cherry picked from commit b56c47689c)
2014-06-18 12:34:16 -04:00
Lennart Poettering ed15dbd87d conf-parser: never consider it an error if we cannot load a drop-in file because it is missing
After all, we want to be able to boot with /etc empty one day...

(cherry picked from commit 9f43a07f10)
(cherry picked from commit 31dc5786e0)
2014-06-18 12:34:16 -04:00
Lennart Poettering 385c0cd3b0 man: update URL refernce in daemon(7)
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019410.html
(cherry picked from commit 0afedd300c)
(cherry picked from commit 13fc6c9bfa)
2014-06-18 12:34:16 -04:00
Lennart Poettering 977df069dc man: drop reference to file locking for PID file creation from daemon(7)
File locking is usually a bad idea, don't suggest using it.

(cherry picked from commit c4b834a4ad)
(cherry picked from commit ab28d5c3ed)
2014-06-18 12:34:16 -04:00
Lennart Poettering c194931d2e logind: also escape external data when saving to /run
Better be safe than sorry...

(cherry picked from commit 558c6490b1)
(cherry picked from commit 1be1ff309f)

Conflicts:
	src/login/logind-session.c
2014-06-18 12:34:16 -04:00
Lennart Poettering 621e4160e2 machine: escape fields we store in /run, so that they can be properly unescaped by parse_env_file()
(cherry picked from commit ca5405bb4f)
(cherry picked from commit 0be4e0b695)

Conflicts:
	src/machine/machine.c
2014-06-18 12:34:16 -04:00
Lennart Poettering 06e974ab63 nspawn: restore journal directory is empty check
This undoes part of commit e6a4a517be.

Instead of removing the error message about non-empty journal bind mount
directories, simply downgrade the message to a warning and proceed.

(cherry picked from commit cdb2b9d05a)
(cherry picked from commit 2b1f027f8e)
2014-06-18 12:34:16 -04:00
Djalal Harouni 89f16be75b nspawn: allow to bind mount journal on top of a non empty container journal dentry
Currently if nspawn was called with --link-journal=host or
--link-journal=auto and the right /var/log/journal/machine-id/ exists
then the bind mount the subdirectory into the container might fail due
to the ~/mycontainer/var/log/journal/machine-id/ of the container not
being empty.

There is no reason to check if the container journal subdir is empty
since there will be a bind mount on top of it. The user asked for a bind
mount so give it.

Note: a next call with --link-journal=guest may fail due to the
/var/log/journal/machine-id/ on the host not being empty.

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

Reported-by: Tobias Hunger <tobias.hunger@gmail.com>
(cherry picked from commit e6a4a517be)
(cherry picked from commit 8113d58e81)
2014-06-18 12:34:15 -04:00
Kay Sievers a6a0c18495 hwdb: update
(cherry picked from commit 7ba52a1283)
(cherry picked from commit 5e608afd72)
2014-06-18 12:34:15 -04:00
Marcel Holtmann 2f2fb552e0 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 24e29480bd)
(cherry picked from commit 1edfeba28e)
2014-06-18 12:34:15 -04:00
Will Woods ee83fe9779 core: let selinux_setup() load policy more than once
When you switch-root into a new root that has SELinux policy, you're
supposed to to run selinux_init_load_policy() to set up SELinux and load
policy. Normally this gets handled by selinux_setup().

But if SELinux was already initialized, selinux_setup() skips loading
policy and returns 0. So if you load policy normally, and then you
switch-root to a new root that has new policy, selinux_setup() never
loads the new policy. What gives?

As far as I can tell, this check is an artifact of how selinux_setup()
worked when it was first written (see commit c4dcdb9 / systemd v12):

  * when systemd starts, run selinux_setup()
  * if selinux_setup() loads policy OK, restart systemd

So the "if policy already loaded, skip load and return 0" check was
there to prevent an infinite re-exec loop.

Modern systemd only calls selinux_setup() on initial load and after
switch-root, and selinux_setup() no longer restarts systemd, so we don't
need that check to guard against the infinite loop anymore.

So: this patch removes the "return 0", thus allowing selinux_setup() to
actually perform SELinux setup after switch-root.

We still want to check to see if SELinux is initialized, because if
selinux_init_load_policy() fails *but* SELinux is initialized that means
we still have (old) policy active. So we don't need to halt if
enforce=1.

(cherry picked from commit 68d3acaccb)
(cherry picked from commit f5ad306cb9)
2014-06-18 12:34:15 -04:00
Will Woods 5073418cdf core: reindent {selinux, ima, smack}-setup.c
7-space indentation is just too weird to leave alone.
Make it 8 spaces, as per CODING_STYLE. No other changes.

(cherry picked from commit 4ab72d6fb4)

Conflicts:
	src/core/ima-setup.c

[zj: just selinux-setup.c, as needed for futher commits.]

(cherry picked from commit 31b1d7a4f7)
2014-06-18 12:34:14 -04:00
Lennart Poettering 63aaa1f0d1 nspawn: properly format container_uuid in UUID format
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018971.html
(cherry picked from commit 9f24adc288)
(cherry picked from commit e003612775)
2014-06-18 12:34:14 -04:00
Mantas Mikulėnas 134ffc7144 man: update journald rate limit defaults
This brings the man page back into sync with the actual code.

(cherry picked from commit 8f18f550e7)
(cherry picked from commit 430015550f)
2014-06-18 12:34:14 -04:00
Lennart Poettering 2ee1723d1f build-sys: at configure check for verifying that ln supports --relative
(cherry picked from commit 4468835285)
(cherry picked from commit 3d3e1a52a3)

Conflicts:
	configure.ac
2014-06-18 12:34:14 -04:00
Alison Chaiken 266b214a3c man: readahead: fix cmdline switch inconsistency between readahead.c and docs
Source code has "files-max" and XML has --max-files.

(cherry picked from commit 332bc31992)
(cherry picked from commit 78db70d9c7)

Conflicts:
	man/systemd-readahead-replay.service.xml
	src/readahead/readahead.c
2014-06-18 12:34:14 -04:00
Lennart Poettering 94dde9f705 man: clarify that the ExecReload= command should be synchronous
http://lists.freedesktop.org/archives/systemd-devel/2014-May/019054.html
(cherry picked from commit 33169701b0)
(cherry picked from commit e3f7124073)
2014-06-18 12:34:14 -04:00
Lennart Poettering 54fe753272 core: make sure to serialize jobs for all units
Previously we wouldn't serialize jobs for units that themselves have
nothing to serialize.

http://lists.freedesktop.org/archives/systemd-devel/2014-May/019051.html
(cherry picked from commit 9bdb98c594)
(cherry picked from commit 75ee3c9da1)

Conflicts:
	src/core/unit.c
2014-06-18 12:34:14 -04:00
Zbigniew Jędrzejewski-Szmek f7da070b21 unit.c: Move code around to easy cherrypicking 2014-06-18 12:34:14 -04:00
Lennart Poettering 78134b740f logind: bring polkit policy for hibernate in line with suspend/poweroff/reboot
THere's no reason why hibernate should be better protected then
suspendor poweroff, so sync the policies.

(cherry picked from commit 301f9684e6)
(cherry picked from commit 219b398853)
2014-06-18 12:34:14 -04:00
Zbigniew Jędrzejewski-Szmek f24d573544 core: close socket fds asynchronously
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018928.html
(cherry picked from commit 574634bcac)
(cherry picked from commit ea74f003b0)
2014-06-18 12:34:13 -04:00
Lennart Poettering 075d60ceb2 async: add asynchronous close() call
(cherry picked from commit 8a474b0c04)
(cherry picked from commit 43f1b28bc4)
2014-06-18 12:34:13 -04:00
Lennart Poettering a9c89505d8 util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:

        fd = safe_close(fd);

Which will close an fd if it is open, and reset the fd variable
correctly.

By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards.

(cherry-picked from commit 03e334a1c7)

(cherry picked from commit 4529ad1def)

Conflicts:
	src/core/automount.c
	src/core/busname.c
	src/core/dbus.c
	src/core/execute.c
	src/core/manager.c
	src/core/path.c
	src/core/socket.c
	src/journal/journalctl.c
	src/journal/journald-console.c
	src/journal/journald-kmsg.c
	src/journal/journald-server.c
	src/journal/journald-stream.c
	src/libsystemd-dhcp/dhcp-network.c
	src/libsystemd-dhcp/sd-dhcp-client.c
	src/libsystemd/sd-bus/bus-container.c
	src/libsystemd/sd-bus/bus-kernel.c
	src/libsystemd/sd-bus/bus-message.c
	src/libsystemd/sd-bus/sd-bus.c
	src/libsystemd/sd-bus/sd-memfd.c
	src/libsystemd/sd-event/sd-event.c
	src/libsystemd/sd-resolve/sd-resolve.c
	src/libsystemd/sd-rtnl/sd-rtnl.c
	src/login/logind-inhibit.c
	src/login/logind-session.c
	src/login/pam-module.c
	src/machine/machinectl.c
	src/nspawn/nspawn.c
	src/shared/logs-show.c
	src/shared/util.c
	src/socket-proxy/socket-proxyd.c
	src/udev/net/link-config.c
2014-06-18 12:34:13 -04:00
Zbigniew Jędrzejewski-Szmek 635fe81b0a Make systemctl --root look for files in the proper places
Running systemctl enable/disable/set-default/... with the --root
option under strace reveals that it accessed various files and
directories in the main fs, and not underneath the specified root.
This can lead to correct results only when the layout and
configuration in the container are identical, which often is not the
case. Fix this by adding the specified root to all file access
operations.

This patch does not handle some corner cases: symlinks which point
outside of the specified root might be interpreted differently than
they would be by the kernel if the specified root was the real root.
But systemctl does not create such symlinks by itself, and I think
this is enough of a corner case not to be worth the additional
complexity of reimplementing link chasing in systemd.

Also, simplify the code in a few places and remove an hypothetical
memory leak on error.

(cherry picked from commit 12ed81d9c8)

Conflicts:
	TODO

(cherry picked from commit fd516dfa06)

Conflicts:
	src/shared/install.c
2014-06-17 10:16:34 -04:00
Michael Marineau e15e123cb7 shared: include root when canonicalizing conf paths
The conf_files_list family accepts an alternate root path to prefix all
directories in the list but path_strv_canonicalize_uniq doesn't use it.
This results in the suspicious behavior of resolving directory symlinks
based on the contents of / instead of the alternate root.

This adds a prefix argument to path_strv_canonicalize which will now
prepend the prefix, if given, to every path in the list. To avoid
answering what a relative path means when called with a root prefix
path_strv_canonicalize is now path_strv_canonicalize_absolute and only
considers absolute paths. Fortunately all users of already call
path_strv_canonicalize with a list of absolute paths.

(cherry picked from commit 112cfb1814)
2014-06-17 10:16:34 -04:00
Zbigniew Jędrzejewski-Szmek 668f5eddaa shared/install: do not prefix created symlink with root path
Before: /var/tmp/inst1//etc/systemd/system/default.target -> /var/tmp/inst1//usr/lib/systemd/system/graphical.target
After: /var/tmp/inst1/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target
(cherry picked from commit 62b0023377)
(cherry picked from commit a49631d0c3)
2014-06-17 10:10:01 -04:00
Thomas Hindoe Paaboel Andersen 9d0cd14504 udev: avoid use of uninitialized err
After 1ea972174b err is no longer
set unless we hit a special case. Initialize it to 0 and remove
a check that will never fail.

(cherry picked from commit bf9bead187)

Conflicts:
	src/udev/udevd.c

(cherry picked from commit 6c160b0f7a)
2014-06-17 10:09:37 -04:00
Kay Sievers d0174817bf udev: do not skip the execution of RUN when renaming a network device fails
(cherry picked from commit 1ea972174b)
(cherry picked from commit 59c91436bb)
2014-06-17 10:09:37 -04:00
Tom Gundersen 040f67302c core: sysvcompat - $network should be equivalent to network-online, rather than network target
Most likely the  facility needed is actual connectivity, rather than whether or not the
network managment daemon is running.

We also need to explicitly pull in the network-online.target, as it is not active by
default.

This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default
as part of network-online.target, and only delay boot when some service actively pulls it in.

See: <https://bugzilla.gnome.org/show_bug.cgi?id=728965>

Cc: Pavel Šimerda <psimerda@redhat.com>
Cc: Michal Sekletar <msekleta@redhat.com>
(cherry picked from commit 0404c609f3)
(cherry picked from commit 81d4159e6e)
2014-06-17 10:09:36 -04:00
Zbigniew Jędrzejewski-Szmek 661cb407cc man: sd_journal_send does nothing when journald is not available
https://bugzilla.redhat.com/show_bug.cgi?id=1096067
(cherry picked from commit bdf9fc1a94)
(cherry picked from commit 1b616bb223)
2014-06-17 10:09:36 -04:00
Łukasz Stelmach cb7df46774 core: check the right variable for failed open()
(cherry picked from commit cd7affaeea)
(cherry picked from commit d7c1de4f36)
2014-06-17 10:09:36 -04:00
Kay Sievers 84338737f0 hwdb: update
(cherry picked from commit 61fb23db45)
(cherry picked from commit 65d593c633)
2014-06-17 10:09:36 -04:00
Lennart Poettering 3661cdb8e4 machine-id: only look into KVM uuid when we are not running in a
container

(cherry picked from commit 0b36bbc42d)

Conflicts:
	src/core/machine-id-setup.c

(cherry picked from commit 0ade4b119d)
2014-06-17 10:09:35 -04:00
Brandon Philips fca7e7a4d9 job: add waiting jobs to run queue in unit_coldplug
When we have job installed and added to run queue for service which is
still in dead state and systemd initiates reload then after reload we
never add deserialized job to the run queue again. This is caused by
check in service_coldplug() where we check if deserialized state is
something else than dead state, which is not the case thus we never call
service_set_state() and finally unit_notify() where we would have added
job to the run queue.

Thanks to Michal Sekletar <msekleta@redhat.com> for the original patch.

(cherry picked from commit 20a83d7bf4)

Conflicts:
	src/core/job.c

(cherry picked from commit 39cdf9313c)

Conflicts:
	src/core/job.c

This includes the fixup in ae6feb2a01.
2014-06-17 10:09:35 -04:00
Robert Milasan 38ca51efdd udev: increase the size of RESULT buffer
Under some conditions, in udev_rules_apply_to_event the fact that
result is 1024 bytes, creates problems if the output of the running
command/app is bigger then 1024 bytes.

(cherry picked from commit 209b031e4f)
(cherry picked from commit aa8c95a158)
2014-06-17 09:55:18 -04:00
David Härdeman ecdee21de8 Fix keysize handling in cryptsetup (bits vs. bytes)
The command line key-size is in bits but the libcryptsetup API expects bytes.

Note that the modulo 8 check is in the original cryptsetup binary as well, so
it's no new limitation.

(v2: changed the point at which the /= 8 is performed, rebased, removed tabs)

(cherry picked from commit 6131a78b4d)

Conflicts:
	src/cryptsetup/cryptsetup.c

(cherry picked from commit 19ef179118)
2014-06-17 09:55:13 -04:00
Lennart Poettering 40d9f7140b util: make sure all our name_to_handle_at() code makes use of file_handle_union
(cherry picked from commit 21749924e1)
(cherry picked from commit 6b494ffbcb)

Conflicts:
	src/libudev/libudev-monitor.c
2014-06-17 09:54:44 -04:00