platform/upstream/systemd.git
8 years agoimport: use (void) more
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:23 +0000 (21:08 -0400)]
import: use (void) more

CID #1299018-9.

8 years agoudevadm: assert return value
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:21 +0000 (21:08 -0400)]
udevadm: assert return value

This mirrors what we do in now().
CID #1351755.

8 years agoudevd: use (void) to silence coverity
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:18 +0000 (21:08 -0400)]
udevd: use (void) to silence coverity

CID #1351429.

8 years agoresolved: handle oom properly
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:15 +0000 (21:08 -0400)]
resolved: handle oom properly

CID #1349699-1349700.

8 years agonetwork: check return value
Zbigniew Jędrzejewski-Szmek [Sat, 9 Apr 2016 01:08:02 +0000 (21:08 -0400)]
network: check return value

CID #1349698.

8 years agoMerge pull request #2985 from keszybz/lldp-assert
Martin Pitt [Fri, 8 Apr 2016 06:31:33 +0000 (08:31 +0200)]
Merge pull request #2985 from keszybz/lldp-assert

Replace if with assert_cc in lldp code and a build-sys tweak

8 years agoMerge pull request #2943 from vinaykul/systemd_duid_review_fixes
Zbigniew Jędrzejewski-Szmek [Fri, 8 Apr 2016 00:19:19 +0000 (20:19 -0400)]
Merge pull request #2943 from vinaykul/systemd_duid_review_fixes

DHCP DUID parsing fix, logging fix, man-page fix

8 years agoMerge pull request #2987 from CyberShadow/pull-20160407-234344
Zbigniew Jędrzejewski-Szmek [Fri, 8 Apr 2016 00:04:27 +0000 (20:04 -0400)]
Merge pull request #2987 from CyberShadow/pull-20160407-234344

core: downgrade warning about duplicate device names again

8 years agocore: downgrade warning about duplicate device names again
Vladimir Panteleev [Thu, 7 Apr 2016 23:48:29 +0000 (23:48 +0000)]
core: downgrade warning about duplicate device names again

Pull request #2412 seemed to have unintentionally reverted
5259bcf6a638d8d489db1ddefd55327aa15f3e51, thus reintroducing
https://bugs.freedesktop.org/show_bug.cgi?id=90386.

This commit reverts that part of the commit, changing the
log level to debug again.

8 years agolldp: replace if with assert_cc
Zbigniew Jędrzejewski-Szmek [Thu, 7 Apr 2016 18:29:07 +0000 (14:29 -0400)]
lldp: replace if with assert_cc

LLDP_TX_HOLD or one of the other variables might be changed in the future
resulting in a silent error here if the if was just removed.

Replacement for #2983.

8 years agobuild-sys: force generation of triggers.systemd file
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2016 14:42:58 +0000 (10:42 -0400)]
build-sys: force generation of triggers.systemd file

We don't want to actually install it anywhere, because it
is only usable copied or %included directly into a spec file,
and must be available before %prep is run. But still, it's
useful to generate it automatically so it's easier to copy
and it doesn't go stale.

8 years agoMerge pull request #2981 from keszybz/test-nss
Martin Pitt [Thu, 7 Apr 2016 15:01:12 +0000 (17:01 +0200)]
Merge pull request #2981 from keszybz/test-nss

build-sys: move test-nss to manual_tests

8 years agobuild-sys: move test-nss to manual_tests
Zbigniew Jędrzejewski-Szmek [Thu, 7 Apr 2016 13:02:12 +0000 (09:02 -0400)]
build-sys: move test-nss to manual_tests

8 years agoMerge pull request #2976 from martinpitt/udev-test-tags
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 23:45:24 +0000 (19:45 -0400)]
Merge pull request #2976 from martinpitt/udev-test-tags

Add tags tests to udev-test.pl

8 years agosd-device: Allocate enough room for tags string
Martin Pitt [Wed, 6 Apr 2016 21:50:39 +0000 (23:50 +0200)]
sd-device: Allocate enough room for tags string

Fix commit 1d88a2: We need to allocate another byte for building the "tags"
string, as we append an extra ':' and still need the NUL terminator.

8 years agotest: udev: Check tags
Martin Pitt [Wed, 6 Apr 2016 21:18:06 +0000 (23:18 +0200)]
test: udev: Check tags

Add two more tests:

 - Add a single tag, match on it, don't match on another.
 - Add 10.000 tags to a device, ensure that udev survives this.
   (Reproduces crash fixed by commit 1d88a271a)

8 years agotest: udev: check exit code of test-udev
Martin Pitt [Wed, 6 Apr 2016 21:17:46 +0000 (23:17 +0200)]
test: udev: check exit code of test-udev

We expect test-udev to succeed. Verify that its exit code is zero, particularly
to spot crashes (e. g. a segfault would be error code 139).

8 years agoMerge pull request #2972 from lnykryn/curl
Lennart Poettering [Wed, 6 Apr 2016 16:36:22 +0000 (18:36 +0200)]
Merge pull request #2972 from lnykryn/curl

configure.ac: bump curl dependency to 7.32.0

8 years agoconfigure.ac: bump curl dependency to 7.32.0
Lukas Nykryn [Wed, 6 Apr 2016 13:03:31 +0000 (15:03 +0200)]
configure.ac: bump curl dependency to 7.32.0

We are using CURLOPT_XFERINFOFUNCTION which was added in 7.32.0.

8 years agoMerge pull request #2970 from msekletar/machine-id-prefix-roota
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 11:58:05 +0000 (07:58 -0400)]
Merge pull request #2970 from msekletar/machine-id-prefix-roota

machine-id-setup: simplify by using prefix_roota

8 years agoMerge pull request #2971 from torstehu/fix-typo
Martin Pitt [Wed, 6 Apr 2016 10:57:54 +0000 (12:57 +0200)]
Merge pull request #2971 from torstehu/fix-typo

man: fix spelling mistakes

8 years agoman: fix spelling mistakes
Torstein Husebø [Wed, 6 Apr 2016 10:37:01 +0000 (12:37 +0200)]
man: fix spelling mistakes

8 years agoMerge pull request #2969 from evverx/udev-test-dont-rely-on-underlying-fs-2
Martin Pitt [Wed, 6 Apr 2016 09:51:38 +0000 (11:51 +0200)]
Merge pull request #2969 from evverx/udev-test-dont-rely-on-underlying-fs-2

tests: don't rely on the underlying fs in test-udev (v2)

8 years agoMerge pull request #2968 from keszybz/journal-upload-watchdog-update-master
Lennart Poettering [Wed, 6 Apr 2016 08:50:46 +0000 (10:50 +0200)]
Merge pull request #2968 from keszybz/journal-upload-watchdog-update-master

Journal upload watchdog update master

8 years agoMerge pull request #2944 from keszybz/man-coredump-sysctl
Lennart Poettering [Wed, 6 Apr 2016 08:49:52 +0000 (10:49 +0200)]
Merge pull request #2944 from keszybz/man-coredump-sysctl

Man coredump sysctl

8 years agoMerge pull request #2947 from keszybz/test-nss
Lennart Poettering [Wed, 6 Apr 2016 08:48:55 +0000 (10:48 +0200)]
Merge pull request #2947 from keszybz/test-nss

Add a test for nss modules and some related fixes

8 years agoMerge pull request #2962 from keszybz/value-option
Lennart Poettering [Wed, 6 Apr 2016 08:47:37 +0000 (10:47 +0200)]
Merge pull request #2962 from keszybz/value-option

Add `--value` option to systemctl and loginctl to only print values

8 years agoMerge pull request #2961 from evverx/fix-activate-sigchld
Lennart Poettering [Wed, 6 Apr 2016 08:46:47 +0000 (10:46 +0200)]
Merge pull request #2961 from evverx/fix-activate-sigchld

activate: improve SIGCHLD handler

8 years agomachine-id-setup: simplify by using prefix_roota
Michal Sekletar [Wed, 6 Apr 2016 07:20:34 +0000 (09:20 +0200)]
machine-id-setup: simplify by using prefix_roota

8 years agotests: don't rely on the underlying fs in test-udev (v2)
Evgeny Vereshchagin [Wed, 6 Apr 2016 03:04:27 +0000 (03:04 +0000)]
tests: don't rely on the underlying fs in test-udev (v2)

* This reverts commit 646048b40a7b62c4e9bc59024ef6133613cda01b.
Let's test really big numbers again

* Don't be so brutal: use rmdir instead of rm -rf
As suggested https://github.com/systemd/systemd/pull/2966#issuecomment-205751680

8 years agonss-myhostname: remove dead test of variable that was not set
Zbigniew Jędrzejewski-Szmek [Tue, 15 Mar 2016 04:50:25 +0000 (00:50 -0400)]
nss-myhostname: remove dead test of variable that was not set

8 years agotest-nss: test the resolution of various names
Zbigniew Jędrzejewski-Szmek [Fri, 4 Mar 2016 15:50:45 +0000 (10:50 -0500)]
test-nss: test the resolution of various names

nss-dns is also "tested". It should be almost always available,
and provides a reference for comparison.

8 years agostring-table: split long definitions
Zbigniew Jędrzejewski-Szmek [Fri, 4 Mar 2016 16:28:04 +0000 (11:28 -0500)]
string-table: split long definitions

8 years agomachinectl: indentation fix
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 03:03:46 +0000 (23:03 -0400)]
machinectl: indentation fix

8 years agomachinectl: add --value option
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 02:44:42 +0000 (22:44 -0400)]
machinectl: add --value option

8 years agoMerge pull request #2964 from martinpitt/cgroup-doc-links
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 01:09:20 +0000 (21:09 -0400)]
Merge pull request #2964 from martinpitt/cgroup-doc-links

man: update links to kernel.org cgroup documentation

8 years agoman: also mention systemd-coredump@.service and systemd-coredump.socket
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 01:00:10 +0000 (21:00 -0400)]
man: also mention systemd-coredump@.service and systemd-coredump.socket

Added in 3c171f0b1e.

8 years agoMerge pull request #2966 from evverx/udev-test-dont-rely-on-underlying-fs
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 00:36:01 +0000 (20:36 -0400)]
Merge pull request #2966 from evverx/udev-test-dont-rely-on-underlying-fs

tests: don't rely on underlying fs in udev-test, use tmpfs instead

8 years agojournal-upload: make watchdog state non-static
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2016 00:27:48 +0000 (20:27 -0400)]
journal-upload: make watchdog state non-static

Also parse watchdog config when creating the Uploader object.

8 years agojournal-upload: Update watchdog while in curl_easy_perform
Klearchos Chaloulos [Tue, 5 Apr 2016 10:47:04 +0000 (13:47 +0300)]
journal-upload: Update watchdog while in curl_easy_perform

It is observed that a combination of high log throughput, low I/O speed on journal remote side and many nodes uploading simultaneously caused the journal-upload process to dump core because of watchdog starvation. This is caused because journal-upload stays in curl_easy_perform(), because it cannot upload fast enough to reach the end of the journal. Currently journal-upload will return from curl_easy_perform() only when the end of the journal is reached. Therefore a check is added in journal_input_callback(), which will update the watchdog if the elapsed time since the start of the uploading process is greater than WATCHDOG_USEC/2.

8 years agoactivate: improve SIGCHLD handler
Evgeny Vereshchagin [Tue, 5 Apr 2016 00:27:15 +0000 (00:27 +0000)]
activate: improve SIGCHLD handler

* Don't lose children exit codes

* Don't receive notification when child processes stop
Eliminates annoying "Child died"-messages:
$ ./systemd-socket-activate -l 2000 --inetd -a cat
^Z
[1]+  Stopped                 ./systemd-socket-activate -l 2000 --inetd -a cat

$ bg %1
[1]+ ./systemd-socket-activate -l 2000 --inetd -a cat &
Child 15657 died with code 20

$ ps u 15657
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
ubuntu   15657  0.0  0.0   4540   680 pts/2    S    00:34   0:00 cat

* Don't fail to reap some zombie children
Fixes
$ ./systemd-socket-activate -l 2000 --inetd -a cat &
$ for i in {1..1000}; do echo a | nc localhost 2000 & done
$ ps f
...
18235 pts/2    Ss     0:01 -bash
15849 pts/2    S      0:00  \_ ./systemd-socket-activate -l 2000 --inetd
-a cat
16081 pts/2    Z      0:00  |   \_ [cat] <defunct>
16381 pts/2    Z      0:00  |   \_ [cat] <defunct>
and many more zombies
...

8 years agoman: fix cgroup attributes for device throttling
Martin Pitt [Tue, 5 Apr 2016 13:28:47 +0000 (15:28 +0200)]
man: fix cgroup attributes for device throttling

8 years agoMerge pull request #2965 from martinpitt/systemctl-polkit
Lennart Poettering [Tue, 5 Apr 2016 10:41:36 +0000 (12:41 +0200)]
Merge pull request #2965 from martinpitt/systemctl-polkit

systemctl: don't start polkit agent when running as root

8 years agotests: don't rely on underlying fs in udev-test, use tmpfs instead
Evgeny Vereshchagin [Tue, 5 Apr 2016 06:13:41 +0000 (06:13 +0000)]
tests: don't rely on underlying fs in udev-test, use tmpfs instead

Fixes: #457

8 years agopolkit: don't start polkit agent when running as root
Martin Pitt [Tue, 5 Apr 2016 08:30:45 +0000 (10:30 +0200)]
polkit: don't start polkit agent when running as root

On the server side we already bypass the polkit checks if the caller is root
(see the sd_bus_query_sender_privilege() call in bus_verify_polkit_async()). So
there is no reason to invoke polkit when running
systemctl/machinectl/loginctl/timedatectl as root.

Fixes #2748

8 years agoMerge pull request #2955 from martinpitt/master
Lennart Poettering [Tue, 5 Apr 2016 09:27:16 +0000 (11:27 +0200)]
Merge pull request #2955 from martinpitt/master

sd-device: fix crash if a device has many tags

8 years agoman: update links to kernel.org cgroup documentation
Martin Pitt [Tue, 5 Apr 2016 08:48:06 +0000 (10:48 +0200)]
man: update links to  cgroup documentation

This recently moved from /cgroups/ to /cgroup-v1/.

Fixes #2958

8 years agosd-device: fix crash if a device has many tags or devlinks
Martin Pitt [Mon, 4 Apr 2016 09:09:00 +0000 (11:09 +0200)]
sd-device: fix crash if a device has many tags or devlinks

strjoina() is unsafe to be used in an unbounded loop as alloca() has no error
reporting. Thus devices with a large number of tags or devlinks trigger a
segfault in device_properties_prepare() due to overflowing the stack.

Rewrite the building of the "tags" and "devlinks" strings using
GREEDY_REALLOC() and strpcpy() to work with arbitrarily long strings. This also
avoids re-copying the entire string in each loop iteration.

Before this commit we always appended one final ":" to "tags". Change this to
start with an iniital ":" and for each tag append instead of prepend a ":".
This unifies what happens for the first and all subsequent tags so that we can
use a for loop.

Fixes #2954

8 years agoDrop description of 'Type' field from docs.
Vinay Kulkarni [Tue, 5 Apr 2016 04:05:45 +0000 (21:05 -0700)]
Drop description of 'Type' field from docs.

8 years agoAddress code-review items for pull-request #2890
Vinay Kulkarni [Mon, 4 Apr 2016 22:13:06 +0000 (15:13 -0700)]
Address code-review items for pull-request #2890
1. Replace strtol with unhexchar, verified with valid and invalid DUID strings.
2. Fix logging to use log_syntax instead of log_error.
3. On error reading DUID, ignore read and preserve previous state.
4. Fix man-pages to use markup, remove options not yet implemented.
5. Remove spurious header line in new files.

8 years agologinctl: add --value option
Zbigniew Jędrzejewski-Szmek [Thu, 17 Mar 2016 16:48:02 +0000 (12:48 -0400)]
loginctl: add --value option

8 years agosystemctl: add --value option
Zbigniew Jędrzejewski-Szmek [Sun, 2 Aug 2015 18:22:10 +0000 (14:22 -0400)]
systemctl: add --value option

With this option, systemctl will only print the rhs in show:
$ systemctl show -p Wants,After systemd-journald --value
systemd-journald.socket ...
systemd-journald-dev-log.socket ...

This is useful in scripts, because the need to call awk or similar
is removed.

8 years agoMerge pull request #2959 from keszybz/stop-resolving-localdomain
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2016 02:06:37 +0000 (22:06 -0400)]
Merge pull request #2959 from keszybz/stop-resolving-localdomain

*.localdomain != localhost

8 years ago*.localdomain != localhost
David R. Hedges [Fri, 19 Feb 2016 03:31:38 +0000 (21:31 -0600)]
*.localdomain != localhost

".localdomain" is not a reserved suffix (or prefix). I'm not aware of any
product expecting *.localdomain to resolve to localhost, however I am aware of
at least one product that defaults to ".localdomain" as its DNS suffix provided
via DHCP (pfSense). This leads to unexpected results when attempting to access
a host that's offline (or a host that's online, when nsswitch.conf is
[mis-]configured to have myhostname ahead of DNS).

Operate on:
localhost (and localhost.)
*.localhost (and *.localhost.)
localhost.localdomain (and localhost.localdomain.)
*.localhost.localdomain (and *.localhost.localdomain.)

We should not cover:
*.localdomain (nor *.localdomain.)
localdomain (nor localdomain.)

8 years agoMerge pull request #2849 from keszybz/offline-updates
Lennart Poettering [Mon, 4 Apr 2016 11:28:35 +0000 (13:28 +0200)]
Merge pull request #2849 from keszybz/offline-updates

Offline updates man page

8 years agoMerge pull request #2949 from keszybz/news
Lennart Poettering [Mon, 4 Apr 2016 11:20:21 +0000 (13:20 +0200)]
Merge pull request #2949 from keszybz/news

NEWS: add some more items

8 years agorun: add colon before printing started units
Lennart Poettering [Mon, 4 Apr 2016 11:11:49 +0000 (13:11 +0200)]
run: add colon before printing started units

run: add colon before printing started units

8 years agoimport: Preserve xattrs in tar files
Mike Gilbert [Mon, 4 Apr 2016 11:08:26 +0000 (07:08 -0400)]
import: Preserve xattrs in tar files

Resolves #2908

8 years agobasic: fallback to fstatat if entry->d_type is DT_UNKNOWN
Evgeny Vereshchagin [Mon, 4 Apr 2016 11:07:56 +0000 (14:07 +0300)]
basic: fallback to fstatat if entry->d_type is DT_UNKNOWN

* tests-functions: improve FSTYPE-support

make clean setup FSTYPE=reiserfs is working fine now :)

* basic: fallback to fstatat if entry->d_type is DT_UNKNOWN

Fixes localectl on reiserfs:

-bash-4.3# mkdir -p /usr/lib/locale
-bash-4.3# stat -f /usr/lib/locale/
  File: "/usr/lib/locale/"
    ID: bdb0322715b5366e Namelen: 255     Type: reiserfs
Block size: 4096
Blocks: Total: 99835      Free: 60262      Available: 60262
Inodes: Total: 0          Free: 0
-bash-4.3# mkdir /usr/lib/locale/HeyHo
-bash-4.3# localectl list-locales --no-pager

-bash-4.3# mount -t tmpfs tmpfs /usr/lib/locale
-bash-4.3# mkdir /usr/lib/locale/HeyHo
-bash-4.3# localectl list-locales --no-pager
HeyHo

8 years agorun: add colon before printing started units
Iago López Galeiras [Mon, 4 Apr 2016 09:28:14 +0000 (11:28 +0200)]
run: add colon before printing started units

In 110ceee58e5bc796c03a7db2109f85a999d5bc2e we removed the period after
printing the started units. This makes copying the unit name easier but
results in improper English.

This adds a colon before printing the units, which makes the output
look better.

8 years agoNEWS: add some more items
Zbigniew Jędrzejewski-Szmek [Sun, 3 Apr 2016 17:16:06 +0000 (13:16 -0400)]
NEWS: add some more items

DUID support is mentioned without details since those are still
being worked out.

8 years agoMerge pull request #2931 from systemd/revert-2843-clock_boottime
Zbigniew Jędrzejewski-Szmek [Sun, 3 Apr 2016 00:55:24 +0000 (20:55 -0400)]
Merge pull request #2931 from systemd/revert-2843-clock_boottime

Revert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"

8 years agoMove nss typedefs into nss-util.h
Zbigniew Jędrzejewski-Szmek [Thu, 3 Mar 2016 20:35:34 +0000 (15:35 -0500)]
Move nss typedefs into nss-util.h

In preparation for subsequent changes.

8 years agonss-myhostname: trivial style fixes
Zbigniew Jędrzejewski-Szmek [Thu, 3 Mar 2016 20:07:02 +0000 (15:07 -0500)]
nss-myhostname: trivial style fixes

8 years agoman/offline-updates: more links and support for multiple upgrade services
Zbigniew Jędrzejewski-Szmek [Wed, 16 Mar 2016 01:59:11 +0000 (21:59 -0400)]
man/offline-updates: more links and support for multiple upgrade services

Most of the changes are already implemented in dnf-system-upgrade.service
and packagekit-offline-update.service, so this update mostly changes the
documentation to match status quo.

8 years agocompress: fix gcc warnings about void* used in arithmetic
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 22:51:16 +0000 (18:51 -0400)]
compress: fix gcc warnings about void* used in arithmetic

src/journal/compress.c: In function ‘compress_blob_lz4’:
src/journal/compress.c:115:49: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
         r = LZ4_compress_limitedOutput(src, dst + 8, src_size, (int) dst_alloc_size - 8);
                                                 ^
src/journal/compress.c: In function ‘decompress_blob_xz’:
src/journal/compress.c:179:35: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
                 s.next_out = *dst + used;
                                   ^
src/journal/compress.c: In function ‘decompress_blob_lz4’:
src/journal/compress.c:218:37: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
         r = LZ4_decompress_safe(src + 8, out, src_size - 8, size);
                                     ^
src/journal/compress.c: In function ‘decompress_startswith_xz’:
src/journal/compress.c:294:38: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
                 s.next_out = *buffer + *buffer_size - s.avail_out;
                                      ^
src/journal/compress.c:294:53: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
                 s.next_out = *buffer + *buffer_size - s.avail_out;
                                                     ^
src/journal/compress.c: In function ‘decompress_startswith_lz4’:
src/journal/compress.c:327:45: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
         r = LZ4_decompress_safe_partial(src + 8, *buffer, src_size - 8,
                                             ^

LZ4 and XZ functions use char* and unsigned char*, respectively,
so keep void* in our internal APIs and add casts.

8 years agobasic/copy: remove unnecessary cast
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 22:20:12 +0000 (18:20 -0400)]
basic/copy: remove unnecessary cast

Both types are unsigned, so the cast to the longer type is automatic.

8 years agotest-compress-benchmark: fix argument parsing on 32bit
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 21:46:49 +0000 (17:46 -0400)]
test-compress-benchmark: fix argument parsing on 32bit

The patch is not minimal, but a function to parse size_t is probably
going to come in handy in other places, so I think it's nicer to define
a proper parsing function than to open-code the cast.

8 years agoAdd networkd-gperf.c to gitignore
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 15:52:44 +0000 (11:52 -0400)]
Add networkd-gperf.c to gitignore

For #2915.

8 years agosd-lldp.h: remove double newline
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 15:50:30 +0000 (11:50 -0400)]
sd-lldp.h: remove double newline

For #2898.

8 years agoman: describe how to reload sysctl configuration
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 15:05:11 +0000 (11:05 -0400)]
man: describe how to reload sysctl configuration

Also fixes option name (s/--path/--prefix/).

8 years agoman: add more cross-references to coredump.conf(5) and systemd-coredump(8)
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 14:40:09 +0000 (10:40 -0400)]
man: add more cross-references to coredump.conf(5) and systemd-coredump(8)

Fixes #2901.

8 years agocoredumpctl: grammaro fix
Zbigniew Jędrzejewski-Szmek [Sat, 2 Apr 2016 14:02:41 +0000 (10:02 -0400)]
coredumpctl: grammaro fix

Mentioned in #2901.

8 years agorpm triggers: add note about minimum supported version
Zbigniew Jędrzejewski-Szmek [Fri, 1 Apr 2016 13:19:11 +0000 (09:19 -0400)]
rpm triggers: add note about minimum supported version

8 years agoman: move KillSignal in the right section in directives list
Zbigniew Jędrzejewski-Szmek [Fri, 1 Apr 2016 13:07:17 +0000 (09:07 -0400)]
man: move KillSignal in the right section in directives list

8 years agocryptsetup: do not 'fail' if trying to detach a nonexistent device
Mantas Mikulėnas [Fri, 1 Apr 2016 18:51:20 +0000 (21:51 +0300)]
cryptsetup: do not 'fail' if trying to detach a nonexistent device

It could be that our .service is being stopped precisely because the
device already disappeared (e.g. due to a manual `cryptsetup close`, or
due to UDisks2 cleaning up).

8 years agoMerge pull request #2937 from thom311/master
Lennart Poettering [Fri, 1 Apr 2016 16:27:23 +0000 (18:27 +0200)]
Merge pull request #2937 from thom311/master

dhcp-identifier: handle too large duid_len argument in dhcp_validate_duid_len()

8 years agoMerge pull request #2939 from bjne/read_only_bindmount
Lennart Poettering [Fri, 1 Apr 2016 16:25:34 +0000 (18:25 +0200)]
Merge pull request #2939 from bjne/read_only_bindmount

dont create bind-mount target when it exists

8 years agoprevent systemd-nspawn from trying to create target
Bjørnar Ness [Fri, 1 Apr 2016 15:31:55 +0000 (17:31 +0200)]
prevent systemd-nspawn from trying to create target
for bind-mounts when they already exist. This allows
bind-mounting over read-only files.

8 years agodhcp-identifier: handle too long duid_len in dhcp_validate_duid_len()
Thomas Haller [Fri, 1 Apr 2016 12:42:22 +0000 (14:42 +0200)]
dhcp-identifier: handle too long duid_len in dhcp_validate_duid_len()

Callers of dhcp_validate_duid_len() know that they must not pass
a zero duid_len. Thus asserting against that is appropriate.
On the other hand, they are not aware of the maximum allowed length
of a duid, as that is the reason why they call dhcp_validate_duid_len()
in the first place. So dhcp_validate_duid_len() should just signal a
regular error.

Thereby, change assert_return() to an assert() as this is an internal
function.

8 years agoMerge pull request #2936 from martinpitt/master
Lennart Poettering [Fri, 1 Apr 2016 12:40:24 +0000 (14:40 +0200)]
Merge pull request #2936 from martinpitt/master

sd-dbus: Fix uint32 property reading

8 years agosystemctl: use correct printf macros for uint32
Martin Pitt [Fri, 1 Apr 2016 12:17:58 +0000 (14:17 +0200)]
systemctl: use correct printf macros for uint32

%u is a simple uint which might not be 32 bit on every platform. Use PRIu32
instead.

8 years agobus-util: Fix reading uint32 properties
Martin Pitt [Fri, 1 Apr 2016 12:16:14 +0000 (14:16 +0200)]
bus-util: Fix reading uint32 properties

Fix copy&paste bug in map_basic() to use the correct data type for
SD_BUS_TYPE_UINT32. Before we were copying the wrong 32 bits into the
destination pointer, resulting in complete garbage on big-endian systems.

Fixes #2927

8 years agoRevert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"
Lennart Poettering [Fri, 1 Apr 2016 07:48:36 +0000 (09:48 +0200)]
Revert "time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported"

8 years agoMerge pull request #2915 from vinaykul/master
Zbigniew Jędrzejewski-Szmek [Thu, 31 Mar 2016 04:51:25 +0000 (00:51 -0400)]
Merge pull request #2915 from vinaykul/master

8 years agoDHCP DUID, IAID configuration options
Vinay Kulkarni [Wed, 30 Mar 2016 23:33:55 +0000 (16:33 -0700)]
DHCP DUID, IAID configuration options

8 years agoMerge pull request #2919 from ColdPie1/udev_get_parent_docs
Daniel Mack [Wed, 30 Mar 2016 16:58:12 +0000 (18:58 +0200)]
Merge pull request #2919 from ColdPie1/udev_get_parent_docs

man: Fix documented parameters for udev_device_get_ functions

8 years agoman: Fix documented parameters for udev_device_get_ functions
Andrew Eikum [Wed, 30 Mar 2016 15:10:36 +0000 (10:10 -0500)]
man: Fix documented parameters for udev_device_get_ functions

8 years agoMerge pull request #2915 from lnykryn/template
Zbigniew Jędrzejewski-Szmek [Wed, 30 Mar 2016 12:40:49 +0000 (08:40 -0400)]
Merge pull request #2915 from lnykryn/template

core: improve error message when starting template without instance

8 years agocore: improve error message when starting template without instance
Lukas Nykryn [Wed, 30 Mar 2016 11:49:50 +0000 (13:49 +0200)]
core: improve error message when starting template without instance

8 years agoMerge pull request #2898 from bengal/lldp-api
Zbigniew Jędrzejewski-Szmek [Wed, 30 Mar 2016 01:00:58 +0000 (21:00 -0400)]
Merge pull request #2898 from bengal/lldp-api

lldp: move public macros to sd-lldp.h and namespace them

8 years agoMerge pull request #2903 from keszybz/cgroup2-v3
Zbigniew Jędrzejewski-Szmek [Wed, 30 Mar 2016 00:25:00 +0000 (20:25 -0400)]
Merge pull request #2903 from keszybz/cgroup2-v3

core: cgroup2 support

8 years agoMerge pull request #2911 from evverx/shutdown-watchdog-infinity
Daniel Mack [Tue, 29 Mar 2016 14:06:30 +0000 (16:06 +0200)]
Merge pull request #2911 from evverx/shutdown-watchdog-infinity

core: ShutdownWatchdogSec=infinity disables the watchdog logic too

8 years agocore: ShutdownWatchdogSec=infinity disables the watchdog logic too
Evgeny Vereshchagin [Tue, 29 Mar 2016 11:04:04 +0000 (11:04 +0000)]
core: ShutdownWatchdogSec=infinity disables the watchdog logic too

This is a follow-up for 947292eef

8 years agoMerge pull request #2907 from evverx/runtime-watchdog-infinity
Daniel Mack [Tue, 29 Mar 2016 08:35:52 +0000 (10:35 +0200)]
Merge pull request #2907 from evverx/runtime-watchdog-infinity

core: RuntimeWatchdogSec=infinity disables the watchdog logic

8 years agoMerge pull request #2905 from keszybz/gcrypt-compilation
Daniel Mack [Tue, 29 Mar 2016 08:35:07 +0000 (10:35 +0200)]
Merge pull request #2905 from keszybz/gcrypt-compilation

build-sys: fix build with libgrcypt disabled

8 years agocore: RuntimeWatchdogSec=infinity disables the watchdog logic
Evgeny Vereshchagin [Mon, 28 Mar 2016 17:17:32 +0000 (17:17 +0000)]
core: RuntimeWatchdogSec=infinity disables the watchdog logic

8 years agoMerge pull request #2906 from Lu-Biao/shared
Zbigniew Jędrzejewski-Szmek [Mon, 28 Mar 2016 14:26:42 +0000 (10:26 -0400)]
Merge pull request #2906 from Lu-Biao/shared

shared: fix a misspelling of "journalctl"

8 years agoshared: fix a misspelling of "journalctl"
Biao Lu [Mon, 28 Mar 2016 17:46:04 +0000 (01:46 +0800)]
shared: fix a misspelling of "journalctl"

8 years agobuild-sys: fix build with libgrcypt disabled
Zbigniew Jędrzejewski-Szmek [Sun, 27 Mar 2016 21:33:54 +0000 (17:33 -0400)]
build-sys: fix build with libgrcypt disabled

- Move gcrypt.h include inside grcrypt-util.h.
- Allow gcrypt-util.[ch] to be compiled even without gcrypt.
This allows the logic in files using gcrypt to be simplified.

- Fix compilation of systemd-resolve without gcrypt.
systemd-resolved already supported that.

Fixes #2711.