Commit Graph
17734 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 26bbab9cef journal-upload: enable curl debug output conditionally
https://bugs.freedesktop.org/show_bug.cgi?id=86464
(cherry picked from commit 5dabb1e04e)
2015-01-15 23:44:32 -05:00
Chris Atkinson 3f104bcb21 man: clarify path escaping and reference systemd-escape
This patch adds more detail to the description of how path escaping
operates and provides a pointer to the systemd-escape program. Either
would serve to answer the question raised in the bug report, so
hopefully this will allow it to be closed.

https://bugs.freedesktop.org/show_bug.cgi?id=87688
(cherry picked from commit 995084c7b4)
2015-01-15 23:44:24 -05:00
Zbigniew Jędrzejewski-Szmek 27f0983b31 cgroup: memory limits on / are not supported
(cherry picked from commit 7539904965)
2015-01-15 23:44:24 -05:00
Zbigniew Jędrzejewski-Szmek acb798989f cgroup: fix error message
systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument

(cherry picked from commit 6da139137e)
2015-01-15 23:44:24 -05:00
Zbigniew Jędrzejewski-Szmek 133640ceed journal: call connect() with dropped privileges
When systemd starts a service, it first opened /run/systemd/journal/stdout
socket, and only later switched to the right user.group (if they are
specified). Later on, journald looked at the credentials, and saw
root.root, because credentials are stored at the time the socket is
opened. As a result, all messages passed over _TRANSPORT=stdout were
logged with _UID=0, _GID=0.

Drop real uid and gid temporarily to fix the issue.

(cherry picked from commit 524daa8c3e)

Conflicts:
	src/core/execute.c
2015-01-15 23:44:24 -05:00
Zbigniew Jędrzejewski-Szmek 6f1d375567 Steal {UID,GID,MODE}_INVALID definitions
Based on commit fed1e721fd.
2015-01-15 23:44:24 -05:00
Michael Biebl c027fa133f core: fix typo in log message
(cherry picked from commit 8b173b5e8c)
2015-01-15 23:44:23 -05:00
Lennart Poettering 0fe2a717d1 cgroup: downgrade log messages when we cannot write to cgroup trees that are mounted read-only
(cherry picked from commit 714e2e1d56)
2015-01-15 23:40:42 -05:00
Robert Milasan 023bd711ed accelerometer: drop unused -x option
(cherry picked from commit 7fcf5779b4)
2015-01-15 23:12:23 -05:00
Susant Sahani 9720de1524 man: Fix spelling
(cherry picked from commit 922d948b9f)
2015-01-15 23:12:12 -05:00
Marcel Holtmann aa2c76494b hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 5ef378c1c5)
2015-01-15 23:12:01 -05:00
Stéphane Graber da976dd009 Fix check_loopback()
Add missing htonl() so that check_loopback() actually tests for 127.0.0.1
instead of 1.0.0.127 on little-endian machines.

(cherry picked from commit 58a489c2b3)
2015-01-15 23:09:56 -05:00
Zbigniew Jędrzejewski-Szmek d19bec3b2a journald: always allocate space for object fields
If OBJECT_PID= came as the last field, we would not reallocate the iovec to bigger size,
and fail the assertion later on in dispatch_message_real().

(cherry picked from commit 92ee6447b1)
2015-01-15 23:09:25 -05:00
Zbigniew Jędrzejewski-Szmek d0459adb29 journald: fix off by one in native transport
https://bugzilla.redhat.com/show_bug.cgi?id=1177184
(cherry picked from commit 12a717f834)
2015-01-15 23:08:52 -05:00
Manuel Mendez f74f4a1d67 man: typo in sd_watchdog_enabled notes
https://bugs.freedesktop.org/show_bug.cgi?id=87642
(cherry picked from commit 7275929790)
2015-01-15 23:08:34 -05:00
Zbigniew Jędrzejewski-Szmek c7456ca701 man: add a note why %U,%h,%s are mostly useless
The reasons were already given in the description of %U, but the
are easy to overlook, and it's better to be explicit to avoid
confusion.

(cherry picked from commit b7a4d8de92)
2015-01-15 23:08:00 -05:00
Mantas Mikulėnas 85511c5919 doc: os-release: mention all shell characters that must be escaped
Since the manpage already talks about shell-compatibility, it should be
more accurate about what needs to be escaped and how.

(cherry picked from commit 321a3f5133)
2015-01-15 23:07:36 -05:00
Zbigniew Jędrzejewski-Szmek 446ace573e Treat a trailing backslash as an error
Commit a2a5291b3f changed the parser to reject unfinished quoted
strings. Unfortunately it introduced an error where a trailing
backslash would case an infinite loop. Of course this must fixed, but
the question is what to to instead. Allowing trailing backslashes and
treating them as normal characters would be one option, but this seems
suboptimal. First, there would be inconsistency between handling of
quoting and of backslashes. Second, a trailing backslash is most
likely an error, at it seems better to point it out to the user than
to try to continue.

Updated rules:
ExecStart=/bin/echo \\ → OK, prints a backslash
ExecStart=/bin/echo \ → error
ExecStart=/bin/echo "x → error
ExecStart=/bin/echo "x"y → error

(cherry picked from commit ba774317ac)

Conflicts:
	src/test/test-strv.c
2015-01-15 23:02:35 -05:00
Zbigniew Jędrzejewski-Szmek 6577daaadf test-strv: use STRV_MAKE
(cherry picked from commit 30bcc05295)
2015-01-15 22:58:45 -05:00
tomsod-m ya ru 33b2c1c211 load-fragment: properly unescape \;
https://bugs.freedesktop.org/show_bug.cgi?id=87393
(cherry picked from commit 3851c51ad1)
2015-01-15 22:46:51 -05:00
Umut Tezduyar Lindskog 0f4152ac46 path: follow symbolic link for parent path (2)
c0e57ba9e2 fixed the fallback path.
We should do the same for name_to_handle_at().

(cherry picked from commit b890bf6a81)
2015-01-15 22:46:32 -05:00
Ken Werner 1337ef290a nspawn: fix invocation of the raw clone() system call on s390 and cris
Since the order of the first and second arguments of the raw clone() system
call is reversed on s390 and cris it needs to be invoked differently.

(cherry picked from commit 60e1651a31)

Conflicts:
	src/shared/missing.h
2015-01-15 22:46:23 -05:00
Marc Schmitzer 8cd4dc2c76 hwdb: add Lenovo 3000 N200 special key
https://bugs.freedesktop.org/show_bug.cgi?id=87377
(cherry picked from commit ef686ae230)
2015-01-15 22:43:53 -05:00
Umut Tezduyar Lindskog 79cc383701 path: follow symbolic link for parent path
[zj: When we lstat the target path, symlinks above the last component
     will be followed by both stat and lstat. So when we look at the
     parent, we should follow symlinks.]

(cherry picked from commit c0e57ba9e2)
2015-01-15 22:43:37 -05:00
Tom Gundersen 4aad055e8f shared: path-util - memory leak
(cherry picked from commit 3542eac7f9)
2015-01-15 22:43:11 -05:00
Jan Synacek 5ce9693002 systemctl: fix argument handling when invoked as "shutdown"
(cherry picked from commit 75836b9d20)
2015-01-15 22:42:42 -05:00
Gabriel de Perthuis 4fa6b7a1ed blkid: Warn when rejecting a superblock with a bad csum
Bump libblkid requirement from 2.20 to 2.24.
util-linux 2.25 is actually required since fdbbad981c

(cherry picked from commit d47f6ca5f9)
2015-01-15 22:40:22 -05:00
Lennart Poettering a8a2894cce man: fedora 21 has been release, suggest 21 as fedora version in example yum command line
(cherry picked from commit 667993e88e)
2015-01-15 22:36:43 -05:00
David Herrmann 5536efa9e1 journal: fix dangling 'else' ambiguity
Rework the sd-journal iterators to avoid dangling 'else' ambiguity. For a
detailed explanation, see:

    commit bff686e2a9
    Author: David Herrmann <dh.herrmann@gmail.com>
    Date:   Fri Dec 12 09:43:54 2014 +0100

        hwdb: fix dangling 'else' ambuguity

(cherry picked from commit 8d1c8bd746)
2015-01-15 22:33:52 -05:00
Marcel Holtmann 93ca5b52a7 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 3853d4cf89)
2015-01-15 22:32:47 -05:00
Thomas Hindoe Paaboel Andersen 18548a6d82 use correct format types
(cherry picked from commit c4ef05484d)
2015-01-15 22:32:40 -05:00
Lennart Poettering d8cc1b6845 build-sys: fix user unit m4 logic
(cherry picked from commit 1ed09c4491)
2015-01-15 22:32:04 -05:00
Zbigniew Jędrzejewski-Szmek e51e8e367c localectl,man: make it obvious that set-*-keymaps sets both keymaps
https://bugs.freedesktop.org/show_bug.cgi?id=85411
(cherry picked from commit 2ebcf93670)
2015-01-15 22:31:00 -05:00
Zbigniew Jędrzejewski-Szmek bce18d89b0 zsh-completion: remove duplicate function
https://bugs.archlinux.org/task/43069
(cherry picked from commit 820aced6f6)
2015-01-15 22:30:47 -05:00
Lennart Poettering 9897c6b346 man: improve docs for systemd-modules-load.service
(cherry picked from commit 547b25d285)
2015-01-15 22:29:44 -05:00
Lennart Poettering bd8d286de1 virt: when detecting containers and /run/systemd/container cannot be read, check /proc/1/environ
This way, we should be in a slightly better situation if a container is
booted up with only a shell as PID 1. In that case
/run/systemd/container will not be populated, and a check for it hence
be ineffective.

Checking /proc/1/environ doesn't fully fix the problem though, as the
file is only accessible with privileges. This means if PID 1 is not
systemd, and if privileges have been dropped the container detection
will continue to fail.

(cherry picked from commit 536bfdab4c)
2015-01-15 22:29:26 -05:00
Zbigniew Jędrzejewski-Szmek dad71e646a systemctl: fix invalid free when enabling sysv services fails
The error was introduced in v215-343-g60731f32f1 'systemctl: do not
bother to mutate state on error', by causing strv_free to attempt to
free a static string. Simplify the whole thing by always keeping the
array in valid state.

(cherry picked from commit a644abed54)
2015-01-15 22:29:02 -05:00
Ronny Chevalier cd64be066e catalog: fix typos in the French translation
(cherry picked from commit f4e5c25cd7)
2015-01-15 22:28:17 -05:00
Lennart Poettering 024b575281 hwdb: update PCI, USB, OUI databases
(cherry picked from commit 8105cefa95)
2015-01-15 22:27:59 -05:00
Michal Schmidt 27ac38a358 journal: optimize iteration: skip files that cannot improve current candidate entry
Suppose that while iterating we have already looked into a journal file
and got a candidate for the next entry. And we are considering to look
into another journal file because it may contain an entry that is nearer
to the current location than the candidate.

We should skip the whole journal file if we can tell by looking at its
header that none of its entries can precede the candidate.

Before:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m20.518s
user    0m19.989s
sys     0m0.328s

After:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m9.445s
user    0m9.228s
sys     0m0.213s

(cherry picked from commit f8b5a3b75f)
2015-01-15 22:27:40 -05:00
Michal Schmidt 0040552704 journal: optimize iteration: skip whole files behind current location
Interleaving of entries from many journal files is expensive. But there
is room for optimization.

We can skip looking into journal files whose entries all lie before the
current iterating location. We can tell if that's the case from looking
at the journal file header. This saves a huge amount of work if one has
many of mostly not interleaved journal files.

On my workstation with 90 journal files in /var/log/journal/ID/
totalling 3.4 GB I get these results:

Before:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    5m54.258s
user    2m4.263s
sys     3m48.965s

After:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null

real    0m20.518s
user    0m19.989s
sys     0m0.328s

The high "sys" time in the original was caused by putting more stress on
the mmap-cache than it could handle. With the patch the working set
now consists of fewer mmap windows and mmap-cache is not thrashing.

(cherry picked from commit b7c88ab8cc)
2015-01-15 22:27:40 -05:00
WaLyong Cho 99752dd359 unit: update unit dropin paths and time when dropin file is written.
If a unit is set property by "systemctl set-property", a new dropin
file is generated. But the unit's dropin_paths and dropin_mtime are
not updated. So the unit is shown as need daemon reload.
Update unit dropin_paths and dropin_mtime also when dropin file is
written.

(cherry picked from commit adb76a701d)
2015-01-15 22:26:46 -05:00
Dan Winship b9c59587df libsystemd-network: fix writing of routes in dhcp lease file
inet_ntoa() uses a static buffer, so you can't call it twice in the
same fprintf() call.

(cherry picked from commit fbf7dcb588)
2015-01-15 22:25:35 -05:00
Wesley Dawson 5a43885aba journalctl: respect --after-cursor semantics with --follow in all cases
In the case where no entries have been added to the journal after the specified
cursor, set need_seek before the main loop to prevent display of the entry at
said cursor.

(cherry picked from commit 8ee8e53648)
2015-01-15 22:24:40 -05:00
Ross Lagerwall 2e1057e124 cgroup: Handle error when destroying cgroup
If a cgroup fails to be destroyed (most likely because there are still
processes running as part of a service after the main pid exits), don't
free and remove the cgroup unit from the manager.  This fixes a
regression introduced by the cgroup rework in v205 where systemd would
forget about processes still running after the unit becomes inactive.
(This can happen when the main pid exits and KillMode=process or none).

(cherry picked from commit dab5bf8599)

Conflicts:
	src/core/cgroup.c
2015-01-15 22:24:10 -05:00
Michael Marineau f91e7c6532 fstab-generator: Allow mount.usr without mount.usrflags, honor rw/ro
There is no need to require mount.usrflags. The original implementation
assumed that a btrfs subvolume would always be needed but that is not
applicable to systems that do not use btrfs for /usr.

Similar to using rootflags= for the default of mount.usrflags=, append
the classic 'ro' and 'rw' flags to the mount options.

(cherry picked from commit eb5800026d)
2015-01-15 22:22:56 -05:00
Lennart Poettering bbb43c5666 units: make sure container-getty@.service stops restarting when the pts device it is bound to is gone
We only want to restart the getty as long as the pts device is still
around. As soon as it is gone, the service should be removed to.

http://lists.freedesktop.org/archives/systemd-devel/2014-December/026048.html
(cherry picked from commit 68ac53e62f)
2015-01-15 22:22:34 -05:00
Olivier Brunel 709700887f journal: Fix navigating backwards missing entries
With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
needle was found as the last item in the array, it wasn't actually processed as
match, resulting in entries being missed.

https://bugs.freedesktop.org/show_bug.cgi?id=86855
(cherry picked from commit 2173cbf847)
2015-01-15 22:21:57 -05:00
Tom Gundersen e76544e97b sd-rtnl: fix bogus warning about dropping 20 bytes from multi-part messages
Nothing was being dropped, we just failed to account for the NLMSG_DONE.

(cherry picked from commit 0e707326fc)
2015-01-15 22:21:37 -05:00
Felipe Sateler fe1c5578e6 man: fix reference to obsolete command "systemctl dump"
https://bugs.freedesktop.org/show_bug.cgi?id=87020
(cherry picked from commit 030512b244)
2015-01-15 22:20:48 -05:00