Commit graph

23121 commits

Author SHA1 Message Date
Martin Pitt 1d40ddbfd3 core: drop check for /etc/mtab
util-linux 2.27.1 now entirely stops looking at /etc/mtab, so we don't need to
verify /etc/mtab during early boot any more. Later on, tmpfiles.d/etc.conf will
fix /etc/mtab anyway, so there's not even a point in warning about it.

Drop test_mtab() and bump the util-linux dependency to >= 2.17.1.

Fixes #1495
2015-11-02 10:05:20 -06:00
Daniel Mack 0fc85c8670 Merge pull request #1751 from ssahani/word-machine
machine: fix #1739
2015-11-02 12:38:24 +01:00
Susant Sahani 52278ad31d machine: fix extract_first_word 2015-11-02 16:55:59 +05:30
Daniel Mack cb6762862b Merge pull request #1722 from evverx/port-cap-bounding-set-to-extract-first-word
Port capabiliy bounding set parsing to extract_first_word
2015-11-02 11:45:06 +01:00
Daniel Mack 117b94060d Merge pull request #1750 from systemd/revert-1740-master
Revert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t,…
2015-11-02 11:31:10 +01:00
Daniel Mack 85e3351f79 Merge pull request #1725 from ssahani/word-journal
sd-journal.c: port to extract_first_word
2015-11-02 11:23:32 +01:00
Lennart Poettering dcd1262673 Revert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t" 2015-11-02 11:21:25 +01:00
Daniel Mack 6b61ae72fa Merge pull request #1739 from ssahani/word-machine
machine: : port to extract_first_word
2015-11-02 11:21:18 +01:00
Daniel Mack 86b4428a58 Merge pull request #1740 from shawnl/master
utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t
2015-11-02 10:57:38 +01:00
Daniel Mack 8fa7cf7076 Merge pull request #1738 from evverx/fix-paths-lookup-test
tests: lookup_paths_init depends on SYSTEMD_UNIT_PATH. Test it
2015-11-02 10:43:16 +01:00
Lennart Poettering ecad2e51e1 Merge pull request #1749 from zonque/cmsg
core: two trivial debug/error message improvements
2015-11-02 10:31:24 +01:00
Daniel Mack fba397e2af Merge pull request #1711 from mustrumr/network-use-after-free
network: fix use-after-free in link_free
2015-11-02 10:17:24 +01:00
Daniel Mack ec8c6b19da Merge pull request #1748 from karelzak/todo
update TODO
2015-11-02 10:16:04 +01:00
Daniel Mack 8ea823b60d core: be more verbose when NameOwnerChanged subscriptions fail 2015-11-02 10:14:35 +01:00
Daniel Mack 4b1728250d core: service: fix error message
The directive is called FileDescriptorStoreMax=, not FDStoreMax=.
2015-11-02 10:13:29 +01:00
Daniel Mack d0744e54eb Merge pull request #1745 from poettering/journal-deadlock
Make sure journald never blocks on sd_notify() to PID 1
2015-11-02 10:10:44 +01:00
Karel Zak 4c8965ad0a update TODO
- inotify utab has been removed and we use libmount now
- x-systemd.requires= fstab option has been implemented to specify
  dependencies in fstab
2015-11-02 09:59:27 +01:00
Lennart Poettering 3958325852 journal-remote: remove unused variable warning when building without GNUTLS. 2015-11-01 22:14:13 +01:00
Lennart Poettering e22aa3d328 journald: never block when sending messages on NOTIFY_SOCKET socket
Otherwise we might run into deadlocks, when journald blocks on the
notify socket on PID 1, and PID 1 blocks on IPC to dbus-daemon and
dbus-daemon blocks on logging to journald. Break this cycle by making
sure that journald never ever blocks on PID 1.

Note that this change disables support for event loop watchdog support,
as these messages are sent in blocking style by sd-event. That should
not be a big loss though, as people reported frequent problems with the
watchdog hitting journald on excessively slow IO.

Fixes: #1505.
2015-11-01 22:12:29 +01:00
Lennart Poettering 638b56cd3c sd-daemon: verify NOTIFY_SOCKET path length
Better generate a real error then simply connect to the wrong socket.
2015-11-01 21:49:19 +01:00
Shawn Landden 025b4c4105 utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t
rework C11 utf8.[ch] to use char32_t instead of uint32_t when referring
to unicode chars, to make things more expressive.
2015-10-31 21:00:57 -07:00
Susant Sahani 75a8fd6ac8 machine: : port to extract_first_word 2015-11-01 03:36:27 +05:30
Susant Sahani 7294bb5be2 sd-journal.c: port to extract_first_word 2015-11-01 03:32:45 +05:30
Evgeny Vereshchagin aa3e4400e3 man: MANAGER_SYSTEM understands SYSTEMD_UNIT_PATH too 2015-10-31 23:07:47 +03:00
Evgeny Vereshchagin 1b6a0f0b35 tests: lookup_paths_init depends on SYSTEMD_UNIT_PATH. Test it 2015-10-31 22:00:32 +03:00
Lennart Poettering a47806fafa sd-daemon: increase sd_notify() socket buffer size
Let's make sure we don't start blocking on sd_notify() earlier than
necessary, let's bump the socket buffer sizes to 8M.

We already do something similar for our logging socket buffers, hence
apply a similar bump here.
2015-10-31 19:09:20 +01:00
Lennart Poettering cacea34bd1 sysctl.d: bump number of queueable AF_UNIX/SOCK_DGRAM datagrams
The default of 16 is pretty low, let's bump this to accomodate for more
queued datagrams. This is useful for AF_UNIX/SOCK_DGRAM logging and
sd_notify() sockets as this allows queuing more datagrams before things
start to block, thus improving parallelization and logging performance.
2015-10-31 19:09:20 +01:00
Lennart Poettering c279613f86 sysv-generator: modernize
- Make sure we log each error at least once, and at most once

- Replace FOREACH_WORD loops by extract_first_word() loops

- Use FOREACH_DIRENT() for directory loops

- Use free_and_strdup() where appropriate

- Do not operate on half-loaded SysV files

- Always properly free all memory
2015-10-31 19:09:20 +01:00
Lennart Poettering a1a078eef2 core: bail our earlier when doing audit
Let's make sure we don't even try to create the audit socket
2015-10-31 19:09:20 +01:00
Lennart Poettering 97044145b4 core,nspawn: minor coding style fixes 2015-10-31 19:09:20 +01:00
Lennart Poettering 3c747da38c nspawn: fix minor memory leak
When rebooting nspawn containers about 400 times we'd otherwise hit the
fd limit and refuse further reboots.
2015-10-31 19:09:20 +01:00
Lennart Poettering 96d66d89c9 core: constify a few things 2015-10-31 19:09:20 +01:00
Lennart Poettering b41b9d2ae9 systemctl: add a way to explicitly request client-side unit installing
This adds support for a new environment variable
SYSTEMCTL_INSTALL_CLIENT_SIDE, that ensures that systemctl executes
install operations client-side instead of passing them to PID1. This is
useful in debugging situations, but even beyond that. However, we don't
want to make it official API, hence let's just make it an undocumented
environment variable.

Similar, add a second variable, SYSTEMCTL_SKIP_SYSV which allows
skipping the SysV chkconfig fall-back if set. This is useful for similar
reasons, and exposed as undocumented as environment variable for similar
reasons, too.
2015-10-31 19:09:20 +01:00
Ronny Chevalier 534e8f89d6 Merge pull request #1734 from evverx/overwrite-sysemd-unit-path
core: set_unit_path overwrites SYSTEMD_UNIT_PATH
2015-10-31 17:22:20 +01:00
Evgeny Vereshchagin cbe46ead79 core: set_unit_path overwrites SYSTEMD_UNIT_PATH 2015-10-31 14:14:37 +03:00
Evgeny Vereshchagin 9ef57298cc core: port config_parse_bounding_set to extract_first_word 2015-10-30 20:55:56 +03:00
Lennart Poettering ed574a6834 Merge pull request #1729 from endocode/dongsu/jr-mhd-memlimit-v3
journal-remote: increase memory limit per connection to avoid errors …
2015-10-30 15:48:49 +01:00
Dongsu Park 5e3efccfc9 journal-remote: increase memory limit per connection to avoid errors with HTTPS
Explicitly set MHD_OPTION_CONNECTION_MEMORY_LIMIT to a larger value,
when setting up microhttpd, to give more memory per HTTP(S) connection.

This way systemd-journal-remote can now prevent microhttpd from failing
in creating response headers with messages like "Not enough memory for
write", especially when lots of HTTPS requests arrive. That's precisely
because MHD_OPTION_CONNECTION_MEMORY_LIMIT in libmicrohttpd defaults to
32768, which is in practice insufficient in this case.
See also https://gnunet.org/bugs/view.php?id=4007 for more details.

Fixes: https://github.com/coreos/bugs/issues/927
2015-10-30 15:12:48 +01:00
Daniel Mack cb2266f931 Merge pull request #1720 from evverx/shell-completion-global-mode
shell-completion: systemctl: show completions for `user` in `global` …
2015-10-30 10:56:38 +01:00
Evgeny Vereshchagin 4b03af4a97 tests: add test for capability bounding set parsing 2015-10-30 09:22:53 +03:00
Marcel Holtmann b133ea8e5f hwdb: Update database of Bluetooth company identifiers 2015-10-30 04:22:54 +01:00
Evgeny Vereshchagin 93557fcb5d shell-completion: systemctl: show completions for user in global mode 2015-10-30 04:55:32 +03:00
Daniel Mack 8d20def9fe Merge pull request #1709 from evverx/set-location-completion
shell-completion: hostnamectl: add the command set-location
2015-10-29 19:47:02 +01:00
Daniel Mack 0fcf9b2390 Merge pull request #1717 from ronnychevalier/rc/test_capabilityboundingset2
test: add tests to ensure that the capabilities are properly set
2015-10-29 19:46:01 +01:00
Ronny Chevalier ff4ca461ed test: add tests to ensure that the capabilities are properly set 2015-10-29 17:14:18 +01:00
Ronny Chevalier db27190d54 Merge pull request #1713 from evverx/test-cap-bounding-set-merging
Another fix of the CapabilityBoundingSet parsing
2015-10-29 13:44:23 +01:00
Evgeny Vereshchagin 661b37b05b core: fix capability bounding set parsing
bug: CapabilityBoundingSet= doesn't reset all caps
2015-10-29 14:48:37 +03:00
Evgeny Vereshchagin a8107a54bd test: add test for capability bounding set parsing 2015-10-29 14:48:32 +03:00
Hristo Venev 4701725cd5 network: fix use-after-free in link_free
Freeing a link removes it both from addresses and addresses_foreign,
causing SIGSEGV if one of the sets is freed.
2015-10-29 12:18:02 +02:00
Evgeny Vereshchagin 1012972478 shell-completion: hostnamectl: add the command set-location 2015-10-29 07:47:16 +03:00