Commit Graph
17741 Commits
Author SHA1 Message Date
David Herrmann ff8045f252 dbus1-generator: fix array sentinal
Add a {} sentinal entry so the config-iterator can properly iterate all
array elements. Fixes a segfault in the dbus1-generator.

(cherry picked from commit 34a317e1cc)
2015-01-15 23:50:33 -05:00
Lennart Poettering 40c20a4270 journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)
When there are a lot of split out journal files, we might run out of fds
quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible.

Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K,
the hard at 4K by default for normal user processes, this code hence
bumps this up for users to 4K.

https://bugzilla.redhat.com/show_bug.cgi?id=1179980
(cherry picked from commit de45d72603)

Conflicts:
	src/shared/util.h
2015-01-15 23:50:26 -05:00
Lennart Poettering fb25056a06 udevadm: don't hit an assert when obsolete parameters are passed
https://bugzilla.redhat.com/show_bug.cgi?id=1178051
(cherry picked from commit 2ac23519d0)
2015-01-15 23:49:11 -05:00
Michael Biebl 7003385ffc sysv-generator: initialize units before use to ensure correct ordering
The original loop called fix_order() on each service immediately after
loading it, but fix_order() would reference other units which were not
loaded yet.
This resulted in bogus and unnecessary orderings based on the static
start priorities.

Therefore call load_sysv() for every init script when traversing them in
enumerate_sysv(). This ensures that all units are loaded when
fix_order() is called.

Bug-Debian: https://bugs.debian.org/771118
(cherry picked from commit 1ed0c19f81)
2015-01-15 23:46:27 -05:00
Michael Biebl de060154f0 sysv-generator: handle Provides: for non-virtual facility names
The list of provided facility names as specified via Provides: in the
LSB header was originally implemented by adding those facilities to the
Names= property via unit_add_name().

In commit 95ed3294c6 the internal SysV
support was replaced by a generator and support for parsing the Names=
option had been removed from the unit file parsing in v186.
As a result, Provides: for non-virtual facility was dropped when
introducing the sysv-generator.

Since quite a few SysV init scripts still use that functionality (at
least in distros like Debian which have a large body of SysV init
scripts), add back support by making those facility names available via
symlinks to the unit filename to ensure correct orderings between
SysV init scripts which use those facility names.

Bug-Debian: https://bugs.debian.org/774335
(cherry picked from commit b7e7184634)
2015-01-15 23:45:55 -05:00
Lennart Poettering ce3e013578 tmpfiles: make gcc shut up
(cherry picked from commit 1e95893a89)
2015-01-15 23:45:14 -05:00
Zbigniew Jędrzejewski-Szmek 415d0e0d73 tmpfiles: finish with EXIT_FAILURE if anything failed
Return value is successful only if everything succeeded.

(cherry picked from commit 1db50423ba)
2015-01-15 23:44:53 -05:00
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