Commit Graph
17750 Commits
Author SHA1 Message Date
Ronny Chevalier 65fd39f8a2 zsh-completion: add missing completions for systemd-analyze
(cherry picked from commit 26bd71f06c)
2015-01-16 09:40:08 -05:00
Ronny Chevalier fab6d4c7aa zsh-completion: add missing -M completion for timedatectl
(cherry picked from commit c285cb5c55)
2015-01-16 09:40:08 -05:00
Ronny Chevalier 60c149882c zsh-completion: add missing completions for coredumpctl
(cherry picked from commit 720e0be0f0)
2015-01-16 09:40:07 -05:00
Zbigniew Jędrzejewski-Szmek 63bc82c30c core/mount: remove "fail" again
deb6120920 'man: there's actually no "fail" fstab option, but only
"nofail" removed it from our documentation, which I missed.
fstab(5) only mentions "auto", "noauto", and "nofail". Stick to
those three.

(cherry picked from commit 76c37ab6d2)
2015-01-16 09:40:07 -05:00
Zbigniew Jędrzejewski-Szmek ca54232293 fstab-util: fix priority parsing and add test
(cherry picked from commit a75f4e2a02)

Conflicts:
	src/shared/fstab-util.c
	src/test/test-fstab-util.c
2015-01-16 09:40:07 -05:00
Zbigniew Jędrzejewski-Szmek ce4ad5de37 core/load-fragment: avoid allocating 0 bytes when given an invalid command
With a command line like "@/something" we would allocate an array with
0 elements. Avoid that, and add a test too.

(cherry picked from commit e01ff42899)

Conflicts:
	src/core/load-fragment.c
	src/test/test-unit-file.c
2015-01-16 09:40:07 -05:00
Zbigniew Jędrzejewski-Szmek e3880a3d57 core/mount: filter out noauto,auto,nofail,fail options
We passed the full option string from fstab to /bin/mount. It would in
turn pass the full option string to its helper, if it needed to invoke
one. Some helpers would ignore things like "nofail", but others would
be confused. We could try to get all helpers to ignore those
"meta-options", but it seems better to simply filter them out.

In our model, /bin/mount simply has no business in knowing whether the
mount was configured as fail or nofail, auto or noauto, in the
fstab. If systemd tells invokes a command to mount something, and it
fails, it should always return an error. It seems cleaner to filter
out the option, since then there's no doubt how the command should
behave.

https://bugzilla.redhat.com/show_bug.cgi?id=1177823
(cherry picked from commit 17a1c597c5)

Conflicts:
	src/core/mount.c
2015-01-16 09:40:07 -05:00
Zbigniew Jędrzejewski-Szmek 167deb40ad .gitignore: add new tests and sort tests alphabetically
(cherry picked from commit 266fd0eabc)

Conflicts:
	.gitignore
2015-01-16 00:57:00 -05:00
Zbigniew Jędrzejewski-Szmek 96bd16efac Add new function to filter fstab options
This fixes parsing of options in shared/generator.c. Existing code
had some issues:

- it would treate whitespace and semicolons as seperators. fstab(5)
  is pretty clear that only commas matter. And the syntax does
  not allow for spaces to be inserted in the field in fstab.
  Whitespace might be escaped, but then it should not seperate
  options. Treat whitespace and semicolons as any other character.
- it assumed that x-systemd.device-timeout would always be followed
  by "=". But this is not guaranteed, hasmntopt will return this
  option even if there's no value. Uninitialized memory could be read.
- some error paths would log, and inconsistently, some would just
  return an error code.

Filtering is split out to a separate function and tests are added.

Similar code paths in other places are adjusted to use the new function.

(cherry picked from commit d15d0333be)

Conflicts:
	src/core/mount.c
2015-01-16 00:57:00 -05:00
Lennart Poettering 4b7a19e5b2 man: document that 'loginctl activate' only takes a single argument
(cherry picked from commit 3909ba34ec)
2015-01-16 00:57:00 -05:00
Zbigniew Jędrzejewski-Szmek 4497e5b3a6 journal: do not check for number of files
Now that we bump rlimit, we do not really know how many files
we can open. Remove the check.

https://bugzilla.redhat.com/show_bug.cgi?id=1179980
(cherry picked from commit b914ea8d37)
2015-01-16 00:56:59 -05:00
Ronny Chevalier 2874ef89b6 systemctl: add missing output modes to help message
(cherry picked from commit 86d81e502b)
2015-01-16 00:56:59 -05:00
Ronny Chevalier 25ec79575b shell-completion: add missing output modes
https://bugs.freedesktop.org/show_bug.cgi?id=88216
(cherry picked from commit e4e5a85f34)
2015-01-16 00:56:59 -05:00
Lennart Poettering e588817e5d man: remove references to systemadm from systemctl man page
The tool is badly maintained and we shouldn't refence such old cruft.

(cherry picked from commit a03fe1a5d5)
2015-01-16 00:56:59 -05:00
Dave Reisner 3628c38b5c doc: fix stale references to systemd-verify
This was subsumed into systemd-analyze back in 142c4ecaa9.

(cherry picked from commit ee9c4ff4c8)
2015-01-16 00:56:59 -05:00
Tom Gundersen 68d0fa1341 path-util: plug leak
(cherry picked from commit a0539d7753)
2015-01-16 00:56:59 -05:00
David Herrmann 6da53516fe 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-16 00:56:59 -05:00
Lennart Poettering d366a31481 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-16 00:56:59 -05:00
Lennart Poettering 06a5b99f71 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-16 00:56:59 -05:00
Michael Biebl 24f984a147 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-16 00:56:59 -05:00
Michael Biebl 5bf11a0f2e 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-16 00:56:59 -05:00
Lennart Poettering d76b52b66d tmpfiles: make gcc shut up
(cherry picked from commit 1e95893a89)
2015-01-16 00:56:59 -05:00
Zbigniew Jędrzejewski-Szmek 9db605a4db tmpfiles: finish with EXIT_FAILURE if anything failed
Return value is successful only if everything succeeded.

(cherry picked from commit 1db50423ba)
2015-01-16 00:56:58 -05:00
Zbigniew Jędrzejewski-Szmek b6a844bde5 journal-upload: enable curl debug output conditionally
https://bugs.freedesktop.org/show_bug.cgi?id=86464
(cherry picked from commit 5dabb1e04e)
2015-01-16 00:56:58 -05:00
Chris Atkinson 14d8078ce6 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-16 00:56:58 -05:00
Zbigniew Jędrzejewski-Szmek 16bf8f4096 cgroup: memory limits on / are not supported
(cherry picked from commit 7539904965)
2015-01-16 00:56:58 -05:00
Zbigniew Jędrzejewski-Szmek f11dbe2f40 cgroup: fix error message
systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument

(cherry picked from commit 6da139137e)
2015-01-16 00:56:58 -05:00
Zbigniew Jędrzejewski-Szmek 97033df7a7 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-16 00:56:58 -05:00
Zbigniew Jędrzejewski-Szmek c1fc0cd8b4 Steal {UID,GID,MODE}_INVALID definitions
Based on commit fed1e721fd.
2015-01-16 00:56:58 -05:00
Michael Biebl 373b065b33 core: fix typo in log message
(cherry picked from commit 8b173b5e8c)
2015-01-16 00:56:58 -05:00
Lennart Poettering f2f2d69a27 cgroup: downgrade log messages when we cannot write to cgroup trees that are mounted read-only
(cherry picked from commit 714e2e1d56)
2015-01-16 00:56:58 -05:00
Robert Milasan 1d51355245 accelerometer: drop unused -x option
(cherry picked from commit 7fcf5779b4)
2015-01-16 00:56:58 -05:00
Susant Sahani b121fb135c man: Fix spelling
(cherry picked from commit 922d948b9f)
2015-01-16 00:56:58 -05:00
Marcel Holtmann b52f7fb181 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 5ef378c1c5)
2015-01-16 00:56:58 -05:00
Stéphane Graber 7a77659e57 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-16 00:56:57 -05:00
Zbigniew Jędrzejewski-Szmek 1b525705c0 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-16 00:56:57 -05:00
Zbigniew Jędrzejewski-Szmek de399a2fd3 journald: fix off by one in native transport
https://bugzilla.redhat.com/show_bug.cgi?id=1177184
(cherry picked from commit 12a717f834)
2015-01-16 00:56:57 -05:00
Manuel Mendez 9ba7cef373 man: typo in sd_watchdog_enabled notes
https://bugs.freedesktop.org/show_bug.cgi?id=87642
(cherry picked from commit 7275929790)
2015-01-16 00:56:57 -05:00
Zbigniew Jędrzejewski-Szmek 7911a6dda8 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-16 00:56:57 -05:00
Mantas Mikulėnas 5fee0309d7 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-16 00:56:57 -05:00
Zbigniew Jędrzejewski-Szmek 75bf5737f8 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-16 00:56:57 -05:00
Zbigniew Jędrzejewski-Szmek e96d192a49 test-strv: use STRV_MAKE
(cherry picked from commit 30bcc05295)
2015-01-16 00:56:57 -05:00
tomsod-m ya ru b90371e2ae load-fragment: properly unescape \;
https://bugs.freedesktop.org/show_bug.cgi?id=87393
(cherry picked from commit 3851c51ad1)
2015-01-16 00:56:57 -05:00
Umut Tezduyar Lindskog f0c232bb1c 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-16 00:56:57 -05:00
Ken Werner 98963dfd60 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-16 00:56:57 -05:00
Marc Schmitzer 1c06a92987 hwdb: add Lenovo 3000 N200 special key
https://bugs.freedesktop.org/show_bug.cgi?id=87377
(cherry picked from commit ef686ae230)
2015-01-16 00:56:57 -05:00
Umut Tezduyar Lindskog 9f9052e9c8 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-16 00:56:56 -05:00
Tom Gundersen 731051b469 shared: path-util - memory leak
(cherry picked from commit 3542eac7f9)
2015-01-16 00:56:56 -05:00
Jan Synacek 46ae5b6431 systemctl: fix argument handling when invoked as "shutdown"
(cherry picked from commit 75836b9d20)
2015-01-16 00:56:56 -05:00
Gabriel de Perthuis f60acf162d 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-16 00:56:56 -05:00