Commit Graph
17765 Commits
Author SHA1 Message Date
Fedora systemd team 51b172bbcd manager: print fatal errors on the console too
When booting in quiet mode, fatal messages would not be shown at all to the user.

https://bugzilla.redhat.com/show_bug.cgi?id=1155468

(cherry-picked from cb6531bee6)
2015-01-16 00:30:09 -05:00
David Herrmann 17269303a0 udev: fix NULL-ptr deref
Make sure we properly validate the return value of
udev_device_get_sysattr_value(). It might be NULL for several reasons.

(cherry picked from commit 975a900782)
2015-01-16 00:30:09 -05:00
Moez Bouhlel 177264ca14 fix zsh completion typo
json-see => json-sse

(cherry picked from commit d31f44e281)
2015-01-16 00:30:09 -05:00
Lennart Poettering 36db434a4f sysv-generator: always use fstatat() if we can
(cherry picked from commit 805e5dda0a)
2015-01-16 00:30:09 -05:00
Lennart Poettering 852efd7179 sysv-generator: fix memory leak on failure
This fixes a memory leak introduced by
1ed0c19f81

(cherry picked from commit b3fae863ef)
2015-01-16 00:15:01 -05:00
Zbigniew Jędrzejewski-Szmek 63e1555696 man: remove "nofail" from systemd.swap(5)
As suggested by Marcos Felipe Rasia de Mello <marcosfrm@gmail.com>.

(cherry picked from commit b50191c23f)
2015-01-16 00:14:43 -05:00
Jan Engelhardt b68e2467d1 doc: add cross-references between systemd.{link, netdev, network}
(cherry picked from commit bd763d350c)
2015-01-16 00:13:22 -05:00
Ronny Chevalier 59ed85fe8f zsh-completion: add missing completions for systemd-tmpfiles
(cherry picked from commit ee14023fd5)
2015-01-16 00:12:37 -05:00
Ronny Chevalier a0d35a94d1 zsh-completion: add missing completions for systemd-analyze
(cherry picked from commit 26bd71f06c)
2015-01-16 00:12:02 -05:00
Ronny Chevalier c498bb9620 zsh-completion: add missing -M completion for timedatectl
(cherry picked from commit c285cb5c55)
2015-01-16 00:11:57 -05:00
Ronny Chevalier 9d9fc8c723 zsh-completion: add missing completions for coredumpctl
(cherry picked from commit 720e0be0f0)
2015-01-16 00:11:53 -05:00
Zbigniew Jędrzejewski-Szmek 02afdb09e6 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 00:11:24 -05:00
Zbigniew Jędrzejewski-Szmek 6ae0597035 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 00:09:03 -05:00
Zbigniew Jędrzejewski-Szmek 4c35b425f8 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 00:05:51 -05:00
Zbigniew Jędrzejewski-Szmek f948c51a7a 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 00:04:19 -05:00
Zbigniew Jędrzejewski-Szmek 359f6d5409 .gitignore: add new tests and sort tests alphabetically
(cherry picked from commit 266fd0eabc)

Conflicts:
	.gitignore
2015-01-16 00:01:06 -05:00
Zbigniew Jędrzejewski-Szmek 7b02ea6ef1 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-15 23:59:50 -05:00
Lennart Poettering 03197f9437 man: document that 'loginctl activate' only takes a single argument
(cherry picked from commit 3909ba34ec)
2015-01-15 23:53:01 -05:00
Zbigniew Jędrzejewski-Szmek fcd7d778d9 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-15 23:52:52 -05:00
Ronny Chevalier b7282af120 systemctl: add missing output modes to help message
(cherry picked from commit 86d81e502b)
2015-01-15 23:52:43 -05:00
Ronny Chevalier 56f8225568 shell-completion: add missing output modes
https://bugs.freedesktop.org/show_bug.cgi?id=88216
(cherry picked from commit e4e5a85f34)
2015-01-15 23:52:34 -05:00
Lennart Poettering 739b061d89 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-15 23:52:10 -05:00
Dave Reisner 53f058478f doc: fix stale references to systemd-verify
This was subsumed into systemd-analyze back in 142c4ecaa9.

(cherry picked from commit ee9c4ff4c8)
2015-01-15 23:51:39 -05:00
Tom Gundersen d3ebb19e84 path-util: plug leak
(cherry picked from commit a0539d7753)
2015-01-15 23:50:49 -05:00
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