1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

23107 Commits

Author SHA1 Message Date
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
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
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
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
Lennart Poettering
2c80779e33 Merge pull request #1700 from ssahani/word
Port to extract_first_word
2015-10-28 19:32:35 +01:00
Lennart Poettering
7f610dee51 Merge pull request #1707 from dvdhrm/notify-prio
core: fix priority ordering in notify-handling
2015-10-28 19:31:37 +01:00
David Herrmann
b215b0ede1 core: fix priority ordering in notify-handling
Currently, we dispatch NOTIFY messages in a tight loop. Regardless how
much data is incoming, we always dispatch everything that is queued.
This, however, completely breaks priority event-handling of sd-event.
When dispatching one NOTIFY event, another completely different event
might fire, or might be queued by the NOTIFY handling. However, this
event will not get dispatched until all other further NOTIFY messages are
handled. Those might even arrive _after_ the other event fired, and as
such completely break priority ordering of sd-event (which several code
paths rely on).

Break this by never dispatching multiple messages. Just return after each
message that was read and let sd-event handle everything else.

(The patch looks scarier that it is. It basically just drops the for(;;)
 loop and re-indents the loop-content.)
2015-10-28 19:11:36 +01:00
Susant Sahani
6cbe4ed1e1 nspwan: port to extract_first_word 2015-10-28 22:59:01 +05:30
Susant Sahani
03da651313 install: port to extract_first_word 2015-10-28 22:58:24 +05:30
Susant Sahani
b1f48e3c94 journal-remote: port to extract_first_word 2015-10-28 22:57:59 +05:30
Lennart Poettering
c9643d5e8e Merge pull request #1705 from filbranden/testutil1
Move tests for extract-word and parse-util into separate test cases
2015-10-28 18:19:03 +01:00
Filipe Brandenburger
bb269eed0e test-parse-util: Move parse-util tests into their own test case
Tests for the functions defined in src/basic/parse-util.c. Reorder them
to match the order in which the functions are defined in the source
file. Adjusted the list of include files to remove the ones no longer
needed in test-util.c.

Tested that `make check` still passes as expected. Also checked the
number of lines removed from test-util.c matches the expected, as an
additional verification that no tests were dropped or duplicated in the
move.
2015-10-28 08:17:10 -07:00
Filipe Brandenburger
23a3c91617 test-extract-word: Move extract-word tests into their own test case
Tests for the functions defined in src/basic/extract-word.c.

Tested that `make check` still passes as expected.
2015-10-28 08:16:00 -07:00
Filipe Brandenburger
d8c3019b02 build-sys: Keep .gitignore sorted
Let's try to keep it that way! :-)
2015-10-28 08:15:49 -07:00
Lennart Poettering
8918103d1e Merge pull request #1703 from ronnychevalier/rc/test_execute_check_nobody2
test-execute: check if nobody exists before running some tests
2015-10-28 13:07:48 +01:00
Lennart Poettering
e3d285e6c0 Merge pull request #1699 from filbranden/cpuaffinity9
cpu-set-util: Support ranges in parse_cpu_set_and_warn (v4)
2015-10-28 13:06:56 +01:00
Ronny Chevalier
cc7fa4fb4a test-execute: check if nobody exists before running some tests 2015-10-28 11:51:37 +01:00
Daniel Mack
df5b3e1840 Merge pull request #1701 from hosiet/l10n-cn
l10n: add Simplified Chinese translation.
2015-10-28 10:23:36 +01:00