platform/upstream/systemd.git
9 years agocore: parse socket port to extract_first_word
Susant Sahani [Tue, 3 Nov 2015 17:19:05 +0000 (22:49 +0530)]
core: parse socket port to extract_first_word

9 years agoMerge pull request #1754 from martinpitt/master
Daniel Mack [Tue, 3 Nov 2015 06:24:02 +0000 (07:24 +0100)]
Merge pull request #1754 from martinpitt/master

core: drop check for /etc/mtab

9 years agoMerge pull request #1759 from davidstrauss/master
Daniel Mack [Tue, 3 Nov 2015 06:16:35 +0000 (07:16 +0100)]
Merge pull request #1759 from davidstrauss/master

man: Drop "internally," which is misleading

9 years agoMerge pull request #1758 from poettering/varietygalore
Daniel Mack [Tue, 3 Nov 2015 06:15:44 +0000 (07:15 +0100)]
Merge pull request #1758 from poettering/varietygalore

A grab bag of stuff

9 years agoman: Drop "internally," which is misleading
David Strauss [Tue, 3 Nov 2015 01:19:26 +0000 (17:19 -0800)]
man: Drop "internally," which is misleading

The existing text misleads readers into thinking how the notify socket protocol is "internals" and that they can only use the functions. However, the socket is part of the Interface Stability Promise. So, we should drop "internally" from the description so the man page both indicates both how the functions work and how one would talk to the socket directly.

9 years agolog-generator: add option to generate easily compressible data
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 03:28:07 +0000 (23:28 -0400)]
log-generator: add option to generate easily compressible data

This is useful to check that compression actually works, and how
compression influences file size in the best-case-scenario for
compression. (The answer is that not as much as one would hope:
there's still a big overhead of the indexing and since every field
is compressed separately, even fields that compress very well
contribute to the file size. This overhead becomes negligible only
for very big fields.)

9 years agoparse-util: introduce parse_ifindex() and make use of it everywhere
Lennart Poettering [Mon, 2 Nov 2015 22:57:21 +0000 (23:57 +0100)]
parse-util: introduce parse_ifindex() and make use of it everywhere

We have enough places where we parse an ifindex, hence introduce a
proper parsing function for it, that verifies all parameters.

9 years agomachine: when we fail to extract a network interface from the machine state, don...
Lennart Poettering [Mon, 2 Nov 2015 22:47:38 +0000 (23:47 +0100)]
machine: when we fail to extract a network interface from the machine state, don't try again

If we failed to extract a word, then that's how it is, we shouldn't try
to extract it again and again, it's unlikely to work, and we just
deadlock.

This is a fix-up for 52278ad31d92dffa9029c8a171b9e9348f5dcc8f.

9 years agojournalctl: when we fail to open a journal file, print why
Lennart Poettering [Mon, 2 Nov 2015 22:37:05 +0000 (23:37 +0100)]
journalctl: when we fail to open a journal file, print why

When we enumerate journal files and encounter an invalid one, remember
which this, and show it to the user.

Note the possibly slightly surprising logic here: we store only one path
per error code. This means we show all error kinds but not every actual
error we encounter. This has the benefit of not requiring us to keep a
potentially unbounded list of errors with their sources around, but can
still provide a pretty complete overview on the errors we encountered.

Fixes #1669.

9 years agosd-journal: various clean-ups and modernizations
Lennart Poettering [Mon, 2 Nov 2015 22:14:30 +0000 (23:14 +0100)]
sd-journal: various clean-ups and modernizations

- Always print a debug log message about files and directories we cannot
  open right when it happens instead of the caller, thus reducing the
  number of places where we need to generate the debug message.

- Always push the errors we encounter immediately into the error set,
  when we run into them, instead of in the caller. Thus, we never forget
  to push them in.

- Use stack instead of heap memory where we can.

- Make remove_file() void, since it cannot fail anyway and always
  returned 0.

- Make local machine check of journal directories explicit in a
  function, to make things more readable.

- Port to all directory listing loops FOREACH_DIRENT_ALL()

- sd-daemon is library code, hence never log at higher log levels than
  LOG_DEBUG.

9 years agojournalctl: continue operation, even if we run into an invalid file
Lennart Poettering [Mon, 2 Nov 2015 22:13:01 +0000 (23:13 +0100)]
journalctl: continue operation, even if we run into an invalid file

9 years agojournal: return better error for empty files
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 04:09:44 +0000 (00:09 -0400)]
journal: return better error for empty files

When reading stuff, we should only return EIO when an actual read error
occured, not when we don't like the data for whatever reason.

We already return ENODATA for all other kinds of file truncation, hence
do the same for the most obvious kind, so that callers know what ENODATA
means.

9 years agocore: expose number of file descriptors in fd store on the bus
Lennart Poettering [Mon, 2 Nov 2015 22:09:06 +0000 (23:09 +0100)]
core: expose number of file descriptors in fd store on the bus

For each service expose how many file descriptors there are currently in
the fd store.

(Also, fix the exporting of the fdstore limit, given that the field is
just an "unsigned" but we exported it as "uint32_t". Not that there way
any effective difference, but let's make this clean...)

9 years agoproc-cmdline: return proper errors from shall_restore_state()
Lennart Poettering [Mon, 2 Nov 2015 22:07:58 +0000 (23:07 +0100)]
proc-cmdline: return proper errors from shall_restore_state()

Let's not eat up errors in shall_restore_state(), but in the consumers
instead, just for the sake of keeping the library calls generic.

9 years agocore: bump net.unix.max_dgram_qlen really early during boot
Lennart Poettering [Mon, 2 Nov 2015 08:34:05 +0000 (09:34 +0100)]
core: bump net.unix.max_dgram_qlen really early during boot

Only that way it actually has an effect on all our sockets, including
$NOTIFY_SOCKET.

9 years agoMerge pull request #1757 from phomes/minor-fixes
Ronny Chevalier [Mon, 2 Nov 2015 22:27:49 +0000 (23:27 +0100)]
Merge pull request #1757 from phomes/minor-fixes

Minor fixes

9 years agosysv-generator: remove duplicate const
Thomas Hindoe Paaboel Andersen [Mon, 2 Nov 2015 21:52:05 +0000 (22:52 +0100)]
sysv-generator: remove duplicate const

I assume this was a typo in c279613f861636c816f2f7df051b02c2f55a5134

9 years agoman: various typos
Thomas Hindoe Paaboel Andersen [Mon, 2 Nov 2015 21:50:57 +0000 (22:50 +0100)]
man: various typos

9 years agostring-util: rework memory_erase() so that it cannot be optimized away
Lennart Poettering [Sun, 1 Nov 2015 19:28:55 +0000 (20:28 +0100)]
string-util: rework memory_erase() so that it cannot be optimized away

memory_erase() so far just called memset(), which the compiler might
optimize away under certain conditions if it feels there's benefit in
it. C11 knows a new memset_s() call that is like memset(), but may not
be optimized away. Ideally, we'd just use that call, but glibc currently
does not support it. Hence, implement our own simplistic version of it.

We use a GCC pragma to turn off optimization for this call, and also use
the "volatile" keyword on the pointers to ensure that gcc will use the
pointers as-is. According to a variety of internet sources, either one
does the trick. However, there are also reports that at least the
volatile thing isn't fully correct, hence let's add some snake oil and
employ both techniques.

https://news.ycombinator.com/item?id=4711346

9 years agoMerge pull request #1690 from evverx/run-runtime-directory
Lennart Poettering [Mon, 2 Nov 2015 19:16:18 +0000 (20:16 +0100)]
Merge pull request #1690 from evverx/run-runtime-directory

systemd-run can launch units with RuntimeDirectory

9 years agoMerge pull request #1736 from ronnychevalier/rc/test_execute_more_tests2
Lennart Poettering [Mon, 2 Nov 2015 19:06:48 +0000 (20:06 +0100)]
Merge pull request #1736 from ronnychevalier/rc/test_execute_more_tests2

test-execute: add more tests

9 years agoMerge pull request #1753 from fbuihuu/teach-delegate-for-runtime
Lennart Poettering [Mon, 2 Nov 2015 18:52:00 +0000 (19:52 +0100)]
Merge pull request #1753 from fbuihuu/teach-delegate-for-runtime

Teach bus_append_unit_property_assignment() about 'Delegate' property

9 years agoMerge pull request #1755 from ssahani/word-systemctl
Lennart Poettering [Mon, 2 Nov 2015 18:50:51 +0000 (19:50 +0100)]
Merge pull request #1755 from ssahani/word-systemctl

systemctl: port to extract_first_word

9 years agosystemctl: port to extract_first_word
Susant Sahani [Mon, 2 Nov 2015 16:17:40 +0000 (21:47 +0530)]
systemctl: port to extract_first_word

9 years agocore: drop check for /etc/mtab
Martin Pitt [Mon, 2 Nov 2015 16:05:20 +0000 (10:05 -0600)]
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

9 years agoMerge pull request #1751 from ssahani/word-machine
Daniel Mack [Mon, 2 Nov 2015 11:38:24 +0000 (12:38 +0100)]
Merge pull request #1751 from ssahani/word-machine

machine: fix #1739

9 years agoTeach bus_append_unit_property_assignment() about 'Delegate' property
Franck Bui [Mon, 2 Nov 2015 10:12:41 +0000 (11:12 +0100)]
Teach bus_append_unit_property_assignment() about 'Delegate' property

9 years agomachine: fix extract_first_word
Susant Sahani [Mon, 2 Nov 2015 11:25:59 +0000 (16:55 +0530)]
machine: fix extract_first_word

9 years agoMerge pull request #1722 from evverx/port-cap-bounding-set-to-extract-first-word
Daniel Mack [Mon, 2 Nov 2015 10:45:06 +0000 (11:45 +0100)]
Merge pull request #1722 from evverx/port-cap-bounding-set-to-extract-first-word

Port capabiliy bounding set parsing to extract_first_word

9 years agoMerge pull request #1750 from systemd/revert-1740-master
Daniel Mack [Mon, 2 Nov 2015 10:31:10 +0000 (11:31 +0100)]
Merge pull request #1750 from systemd/revert-1740-master

Revert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t,…

9 years agoMerge pull request #1725 from ssahani/word-journal
Daniel Mack [Mon, 2 Nov 2015 10:23:32 +0000 (11:23 +0100)]
Merge pull request #1725 from ssahani/word-journal

sd-journal.c: port to extract_first_word

9 years agoRevert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t"
Lennart Poettering [Mon, 2 Nov 2015 10:21:25 +0000 (11:21 +0100)]
Revert "utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t"

9 years agoMerge pull request #1739 from ssahani/word-machine
Daniel Mack [Mon, 2 Nov 2015 10:21:18 +0000 (11:21 +0100)]
Merge pull request #1739 from ssahani/word-machine

machine: : port to extract_first_word

9 years agoMerge pull request #1740 from shawnl/master
Daniel Mack [Mon, 2 Nov 2015 09:57:38 +0000 (10:57 +0100)]
Merge pull request #1740 from shawnl/master

utf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t

9 years agoMerge pull request #1738 from evverx/fix-paths-lookup-test
Daniel Mack [Mon, 2 Nov 2015 09:43:16 +0000 (10:43 +0100)]
Merge pull request #1738 from evverx/fix-paths-lookup-test

tests: lookup_paths_init depends on SYSTEMD_UNIT_PATH. Test it

9 years agoMerge pull request #1749 from zonque/cmsg
Lennart Poettering [Mon, 2 Nov 2015 09:31:24 +0000 (10:31 +0100)]
Merge pull request #1749 from zonque/cmsg

core: two trivial debug/error message improvements

9 years agoMerge pull request #1711 from mustrumr/network-use-after-free
Daniel Mack [Mon, 2 Nov 2015 09:17:24 +0000 (10:17 +0100)]
Merge pull request #1711 from mustrumr/network-use-after-free

network: fix use-after-free in link_free

9 years agoMerge pull request #1748 from karelzak/todo
Daniel Mack [Mon, 2 Nov 2015 09:16:04 +0000 (10:16 +0100)]
Merge pull request #1748 from karelzak/todo

update TODO

9 years agocore: be more verbose when NameOwnerChanged subscriptions fail
Daniel Mack [Thu, 15 Oct 2015 15:39:14 +0000 (17:39 +0200)]
core: be more verbose when NameOwnerChanged subscriptions fail

9 years agocore: service: fix error message
Daniel Mack [Tue, 13 Oct 2015 16:04:13 +0000 (18:04 +0200)]
core: service: fix error message

The directive is called FileDescriptorStoreMax=, not FDStoreMax=.

9 years agoMerge pull request #1745 from poettering/journal-deadlock
Daniel Mack [Mon, 2 Nov 2015 09:10:44 +0000 (10:10 +0100)]
Merge pull request #1745 from poettering/journal-deadlock

Make sure journald never blocks on sd_notify() to PID 1

9 years agoupdate TODO
Karel Zak [Mon, 2 Nov 2015 08:59:27 +0000 (09:59 +0100)]
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

9 years agojournal-remote: remove unused variable warning when building without GNUTLS.
Lennart Poettering [Sun, 1 Nov 2015 20:59:17 +0000 (21:59 +0100)]
journal-remote: remove unused variable warning when building without GNUTLS.

9 years agojournald: never block when sending messages on NOTIFY_SOCKET socket
Lennart Poettering [Sun, 1 Nov 2015 20:50:24 +0000 (21:50 +0100)]
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.

9 years agosd-daemon: verify NOTIFY_SOCKET path length
Lennart Poettering [Sun, 1 Nov 2015 20:49:19 +0000 (21:49 +0100)]
sd-daemon: verify NOTIFY_SOCKET path length

Better generate a real error then simply connect to the wrong socket.

9 years agoutf8.[ch]: use char32_t and char16_t instead of int, int32_t, int16_t
Shawn Landden [Sun, 1 Nov 2015 03:39:15 +0000 (20:39 -0700)]
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.

9 years agomachine: : port to extract_first_word
Susant Sahani [Sat, 31 Oct 2015 22:06:07 +0000 (03:36 +0530)]
machine: : port to extract_first_word

9 years agosd-journal.c: port to extract_first_word
Susant Sahani [Sat, 31 Oct 2015 22:02:45 +0000 (03:32 +0530)]
sd-journal.c: port to extract_first_word

9 years agoman: MANAGER_SYSTEM understands SYSTEMD_UNIT_PATH too
Evgeny Vereshchagin [Sat, 31 Oct 2015 20:07:47 +0000 (23:07 +0300)]
man: MANAGER_SYSTEM understands SYSTEMD_UNIT_PATH too

9 years agotests: lookup_paths_init depends on SYSTEMD_UNIT_PATH. Test it
Evgeny Vereshchagin [Sat, 31 Oct 2015 19:00:32 +0000 (22:00 +0300)]
tests: lookup_paths_init depends on SYSTEMD_UNIT_PATH. Test it

9 years agosd-daemon: increase sd_notify() socket buffer size
Lennart Poettering [Fri, 30 Oct 2015 10:27:29 +0000 (11:27 +0100)]
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.

9 years agosysctl.d: bump number of queueable AF_UNIX/SOCK_DGRAM datagrams
Lennart Poettering [Fri, 30 Oct 2015 10:25:00 +0000 (11:25 +0100)]
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.

9 years agosysv-generator: modernize
Lennart Poettering [Wed, 28 Oct 2015 23:19:31 +0000 (00:19 +0100)]
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

9 years agocore: bail our earlier when doing audit
Lennart Poettering [Wed, 28 Oct 2015 17:23:26 +0000 (18:23 +0100)]
core: bail our earlier when doing audit

Let's make sure we don't even try to create the audit socket

9 years agocore,nspawn: minor coding style fixes
Lennart Poettering [Wed, 28 Oct 2015 17:23:07 +0000 (18:23 +0100)]
core,nspawn: minor coding style fixes

9 years agonspawn: fix minor memory leak
Lennart Poettering [Wed, 28 Oct 2015 17:22:23 +0000 (18:22 +0100)]
nspawn: fix minor memory leak

When rebooting nspawn containers about 400 times we'd otherwise hit the
fd limit and refuse further reboots.

9 years agocore: constify a few things
Lennart Poettering [Wed, 28 Oct 2015 11:43:52 +0000 (12:43 +0100)]
core: constify a few things

9 years agosystemctl: add a way to explicitly request client-side unit installing
Lennart Poettering [Thu, 8 Oct 2015 14:15:38 +0000 (16:15 +0200)]
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.

9 years agoMerge pull request #1734 from evverx/overwrite-sysemd-unit-path
Ronny Chevalier [Sat, 31 Oct 2015 16:22:20 +0000 (17:22 +0100)]
Merge pull request #1734 from evverx/overwrite-sysemd-unit-path

core: set_unit_path overwrites SYSTEMD_UNIT_PATH

9 years agotest-path: move all related test files to a specific directory
Ronny Chevalier [Fri, 30 Oct 2015 17:12:31 +0000 (18:12 +0100)]
test-path: move all related test files to a specific directory

To avoid polluting test/

9 years agotest-execute: move all files related to a specific directory
Ronny Chevalier [Fri, 30 Oct 2015 17:03:18 +0000 (18:03 +0100)]
test-execute: move all files related to a specific directory

To avoid polluting test/

9 years agobuild-sys: add missing test files to EXTRA_DIST
Ronny Chevalier [Sat, 31 Oct 2015 13:46:45 +0000 (14:46 +0100)]
build-sys: add missing test files to EXTRA_DIST

9 years agotest-execute: add tests for IOSchedulingClass
Ronny Chevalier [Fri, 30 Oct 2015 16:46:32 +0000 (17:46 +0100)]
test-execute: add tests for IOSchedulingClass

9 years agotest-execute: add tests for OOMScoreAdjust
Ronny Chevalier [Fri, 30 Oct 2015 16:09:22 +0000 (17:09 +0100)]
test-execute: add tests for OOMScoreAdjust

9 years agotest-execute: add test for EnvironmentFile
Ronny Chevalier [Fri, 30 Oct 2015 15:55:44 +0000 (16:55 +0100)]
test-execute: add test for EnvironmentFile

9 years agotest-execute: add test for PrivateNetwork
Ronny Chevalier [Fri, 30 Oct 2015 12:51:51 +0000 (13:51 +0100)]
test-execute: add test for PrivateNetwork

9 years agocore: set_unit_path overwrites SYSTEMD_UNIT_PATH
Evgeny Vereshchagin [Sat, 31 Oct 2015 11:14:37 +0000 (14:14 +0300)]
core: set_unit_path overwrites SYSTEMD_UNIT_PATH

9 years agocore: port config_parse_bounding_set to extract_first_word
Evgeny Vereshchagin [Fri, 30 Oct 2015 06:25:12 +0000 (09:25 +0300)]
core: port config_parse_bounding_set to extract_first_word

9 years agoMerge pull request #1729 from endocode/dongsu/jr-mhd-memlimit-v3
Lennart Poettering [Fri, 30 Oct 2015 14:48:49 +0000 (15:48 +0100)]
Merge pull request #1729 from endocode/dongsu/jr-mhd-memlimit-v3

journal-remote: increase memory limit per connection to avoid errors …

9 years agojournal-remote: increase memory limit per connection to avoid errors with HTTPS
Dongsu Park [Wed, 21 Oct 2015 12:51:10 +0000 (14:51 +0200)]
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

9 years agoMerge pull request #1720 from evverx/shell-completion-global-mode
Daniel Mack [Fri, 30 Oct 2015 09:56:38 +0000 (10:56 +0100)]
Merge pull request #1720 from evverx/shell-completion-global-mode

shell-completion: systemctl: show completions for `user` in `global` …

9 years agotests: add test for capability bounding set parsing
Evgeny Vereshchagin [Fri, 30 Oct 2015 06:22:53 +0000 (09:22 +0300)]
tests: add test for capability bounding set parsing

9 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Fri, 30 Oct 2015 03:22:54 +0000 (04:22 +0100)]
hwdb: Update database of Bluetooth company identifiers

9 years agoshell-completion: systemctl: show completions for `user` in `global` mode
Evgeny Vereshchagin [Thu, 29 Oct 2015 07:29:29 +0000 (10:29 +0300)]
shell-completion: systemctl: show completions for `user` in `global` mode

9 years agoMerge pull request #1709 from evverx/set-location-completion
Daniel Mack [Thu, 29 Oct 2015 18:47:02 +0000 (19:47 +0100)]
Merge pull request #1709 from evverx/set-location-completion

shell-completion: hostnamectl: add the command set-location

9 years agoMerge pull request #1717 from ronnychevalier/rc/test_capabilityboundingset2
Daniel Mack [Thu, 29 Oct 2015 18:46:01 +0000 (19:46 +0100)]
Merge pull request #1717 from ronnychevalier/rc/test_capabilityboundingset2

test: add tests to ensure that the capabilities are properly set

9 years agotest: add tests to ensure that the capabilities are properly set
Ronny Chevalier [Thu, 29 Oct 2015 13:22:23 +0000 (14:22 +0100)]
test: add tests to ensure that the capabilities are properly set

9 years agoMerge pull request #1713 from evverx/test-cap-bounding-set-merging
Ronny Chevalier [Thu, 29 Oct 2015 12:44:23 +0000 (13:44 +0100)]
Merge pull request #1713 from evverx/test-cap-bounding-set-merging

Another fix of the CapabilityBoundingSet parsing

9 years agocore: fix capability bounding set parsing
Evgeny Vereshchagin [Thu, 29 Oct 2015 11:13:04 +0000 (14:13 +0300)]
core: fix capability bounding set parsing

bug: CapabilityBoundingSet= doesn't reset all caps

9 years agotest: add test for capability bounding set parsing
Evgeny Vereshchagin [Thu, 29 Oct 2015 11:12:22 +0000 (14:12 +0300)]
test: add test for capability bounding set parsing

9 years agonetwork: fix use-after-free in link_free
Hristo Venev [Thu, 29 Oct 2015 10:14:44 +0000 (12:14 +0200)]
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.

9 years agoshell-completion: hostnamectl: add the command set-location
Evgeny Vereshchagin [Thu, 29 Oct 2015 04:47:16 +0000 (07:47 +0300)]
shell-completion: hostnamectl: add the command set-location

9 years agoMerge pull request #1700 from ssahani/word
Lennart Poettering [Wed, 28 Oct 2015 18:32:35 +0000 (19:32 +0100)]
Merge pull request #1700 from ssahani/word

Port to extract_first_word

9 years agoMerge pull request #1707 from dvdhrm/notify-prio
Lennart Poettering [Wed, 28 Oct 2015 18:31:37 +0000 (19:31 +0100)]
Merge pull request #1707 from dvdhrm/notify-prio

core: fix priority ordering in notify-handling

9 years agocore: fix priority ordering in notify-handling
David Herrmann [Wed, 28 Oct 2015 18:11:36 +0000 (19:11 +0100)]
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.)

9 years agonspwan: port to extract_first_word
Susant Sahani [Wed, 28 Oct 2015 17:29:01 +0000 (22:59 +0530)]
nspwan: port to extract_first_word

9 years agoinstall: port to extract_first_word
Susant Sahani [Wed, 28 Oct 2015 17:28:24 +0000 (22:58 +0530)]
install: port to extract_first_word

9 years agojournal-remote: port to extract_first_word
Susant Sahani [Wed, 28 Oct 2015 17:27:59 +0000 (22:57 +0530)]
journal-remote: port to extract_first_word

9 years agoMerge pull request #1705 from filbranden/testutil1
Lennart Poettering [Wed, 28 Oct 2015 17:19:03 +0000 (18:19 +0100)]
Merge pull request #1705 from filbranden/testutil1

Move tests for extract-word and parse-util into separate test cases

9 years agotest-parse-util: Move parse-util tests into their own test case
Filipe Brandenburger [Wed, 28 Oct 2015 15:14:50 +0000 (08:14 -0700)]
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.

9 years agotest-extract-word: Move extract-word tests into their own test case
Filipe Brandenburger [Wed, 28 Oct 2015 14:57:11 +0000 (07:57 -0700)]
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.

9 years agobuild-sys: Keep .gitignore sorted
Filipe Brandenburger [Wed, 28 Oct 2015 14:42:53 +0000 (07:42 -0700)]
build-sys: Keep .gitignore sorted

Let's try to keep it that way! :-)

9 years agoMerge pull request #1703 from ronnychevalier/rc/test_execute_check_nobody2
Lennart Poettering [Wed, 28 Oct 2015 12:07:48 +0000 (13:07 +0100)]
Merge pull request #1703 from ronnychevalier/rc/test_execute_check_nobody2

test-execute: check if nobody exists before running some tests

9 years agoMerge pull request #1699 from filbranden/cpuaffinity9
Lennart Poettering [Wed, 28 Oct 2015 12:06:56 +0000 (13:06 +0100)]
Merge pull request #1699 from filbranden/cpuaffinity9

cpu-set-util: Support ranges in parse_cpu_set_and_warn (v4)

9 years agotest-execute: check if nobody exists before running some tests
Ronny Chevalier [Wed, 28 Oct 2015 10:30:40 +0000 (11:30 +0100)]
test-execute: check if nobody exists before running some tests

9 years agoMerge pull request #1701 from hosiet/l10n-cn
Daniel Mack [Wed, 28 Oct 2015 09:23:36 +0000 (10:23 +0100)]
Merge pull request #1701 from hosiet/l10n-cn

l10n: add Simplified Chinese translation.

9 years agol10n: add zh_CN translation.
Boyuan Yang [Wed, 28 Oct 2015 07:23:58 +0000 (15:23 +0800)]
l10n: add zh_CN translation.

9 years agoman: Update man page documentation for CPUAffinity
Filipe Brandenburger [Tue, 13 Oct 2015 07:12:39 +0000 (00:12 -0700)]
man: Update man page documentation for CPUAffinity

Document support for commas as a separator and possibility of specifying
ranges of CPU indices.

Tested by regenerating the manpages locally and reading them on man.

9 years agocpu-set-util: Support ranges in parse_cpu_set_and_warn
Filipe Brandenburger [Fri, 25 Sep 2015 12:23:23 +0000 (05:23 -0700)]
cpu-set-util: Support ranges in parse_cpu_set_and_warn

Tested CPUAffinity ranges on both a service unit and in system.conf and
confirmed they work as expected (by inspecting /proc/PID/status, for the
main pid of the service and for pid 1).  Also mixed ranges with both
spaces, commas, trailing commas and spaces.

Added new tests to increase coverage of ranges and prevent regressions.

9 years agoparse-util: Introduce new parse_range function
Filipe Brandenburger [Tue, 13 Oct 2015 06:55:31 +0000 (23:55 -0700)]
parse-util: Introduce new parse_range function

This function will be useful for CPUAffinity settings that involve
ranges of CPUs.

Make it generic and include test coverage to prevent regressions.