platform/upstream/systemd.git
9 years agobuild: remove AC_FUNC_MALLOC
Jan Engelhardt [Wed, 23 Sep 2015 14:25:37 +0000 (16:25 +0200)]
build: remove AC_FUNC_MALLOC

What is the rationale to have AC_FUNC_MALLOC? It does not actually
abort the configure run if an "unsuitable" malloc was found, and
instead just replaces malloc by rpl_malloc, for which systemd however
has no definition, either.

Remove the call.

9 years agomising: add __NR_memfd_create syscall number for s390
Hendrik Brueckner [Wed, 23 Sep 2015 11:42:56 +0000 (13:42 +0200)]
mising: add __NR_memfd_create syscall number for s390

9 years agoMerge pull request #1341 from filbranden/werror2
David Herrmann [Wed, 23 Sep 2015 09:14:32 +0000 (11:14 +0200)]
Merge pull request #1341 from filbranden/werror2

Check behavior of -Werror=shadow before deciding to use it

9 years agoupdate NEWS
Daniel Mack [Wed, 23 Sep 2015 09:05:38 +0000 (11:05 +0200)]
update NEWS

9 years agoMerge pull request #1339 from alkino/master
Daniel Mack [Wed, 23 Sep 2015 09:04:34 +0000 (11:04 +0200)]
Merge pull request #1339 from alkino/master

Hook more properties for transient units

9 years agoHook more properties for transient units
Nicolas Cornu [Wed, 23 Sep 2015 07:45:50 +0000 (09:45 +0200)]
Hook more properties for transient units

systemd-run can now launch units with WorkingDirectory, RootDirectory set.

9 years agoMerge pull request #1346 from dvdhrm/user-shutdown
Lennart Poettering [Tue, 22 Sep 2015 22:48:02 +0000 (00:48 +0200)]
Merge pull request #1346 from dvdhrm/user-shutdown

core: fix shutdown of --user

9 years agoMerge pull request #1348 from larsu/master
Lennart Poettering [Tue, 22 Sep 2015 22:39:27 +0000 (00:39 +0200)]
Merge pull request #1348 from larsu/master

busctl: also monitor messages to SERVICE arguments

9 years agobusctl: also monitor messages to SERVICE arguments
Lars Uebernickel [Tue, 22 Sep 2015 22:06:18 +0000 (00:06 +0200)]
busctl: also monitor messages to SERVICE arguments

Add a 'destination' match rule for every SERVICE argument in addition to
the 'sender' rule. This is consistent with busctl(1), which documents
monitor as dumping "messages to or from this peer".

9 years agocore: fix shutdown of --user
David Herrmann [Tue, 22 Sep 2015 20:56:01 +0000 (22:56 +0200)]
core: fix shutdown of --user

Shutting down a user session currently fails with:

Sep 22 22:35:38 david-t2 systemd[640]: Reached target Shutdown.
Sep 22 22:35:38 david-t2 systemd[640]: Starting Exit the Session...
Sep 22 22:35:38 david-t2 systemd[640]: Received SIGRTMIN+24 from PID 659 (kill).
Sep 22 22:35:38 david-t2 systemd[640]: Shutting down.
Sep 22 22:35:38 david-t2 systemd[640]: Not executed by init (PID 1).
Sep 22 22:35:38 david-t2 systemd[640]: Critical error while doing system shutdown: Operation not permitted

This is a regression from:

    commit 287419c119ef961db487a281162ab037eba70c61
    Author: Alban Crequy <alban.crequy@gmail.com>
    Date:   Fri Sep 18 13:37:34 2015 +0200

        containers: systemd exits with non-zero code

Make sure we never ever execute systemd-shutdown from within a
user-manager. Restore the previous behavior by partially reverting given
commit.

9 years agoMerge pull request #1342 from filbranden/gitignore1
David Herrmann [Tue, 22 Sep 2015 17:12:52 +0000 (19:12 +0200)]
Merge pull request #1342 from filbranden/gitignore1

build-sys: add new test binaries to .gitignore

9 years agobuild-sys: add new test binaries to .gitignore
Filipe Brandenburger [Tue, 22 Sep 2015 17:04:37 +0000 (10:04 -0700)]
build-sys: add new test binaries to .gitignore

9 years agobuild-sys: Check behavior of -Werror=shadow before deciding to use it
Filipe Brandenburger [Sat, 5 Sep 2015 23:52:51 +0000 (16:52 -0700)]
build-sys: Check behavior of -Werror=shadow before deciding to use it

gcc versions 4.6 and earlier used to complain when a local variable
shadows a global function, 4.7 and above only complain if a local
variable shadows a global variable.

Fix this by checking whether gcc 4.7+ behavior is in place before
deciding to use -Werror=shadow in $(CFLAGS), by using a custom test
program source that shadows a global function with a local variable and
confirming that -Werror=shadow does not make the compile to break.

Tested:
- On gcc 4.7 and 4.8, confirmed nothing changed (other than the order of
  the -Werror=shadow argument, going to the end of CFLAGS.)
- On gcc 4.6, confirmed by looking at the config.log output that the
  check for -Werror=shadow failed and it was not included in CFLAGS.
- Ran `make V=1` to confirm -Werror=shadow was still in use, introduced
  a bogus shadowing issue and confirmed it was caught when building with
  a recent gcc.

9 years agobuild-sys: properly quote m4 macro arguments in CC_CHECK_FLAGS_APPEND
Filipe Brandenburger [Tue, 22 Sep 2015 16:41:32 +0000 (09:41 -0700)]
build-sys: properly quote m4 macro arguments in CC_CHECK_FLAGS_APPEND

The variables should be quoted inside [...] to avoid double macro
expansion.  This is currently not an issue, since the values (-W...) are
not really macros, but we might as well just fix that issue now.

Tested by re-running autogen.sh and comparing the value of OUR_CFLAGS in
the generated Makefile.  Ran a full build from a clean tree to confirm
no other issues were introduced.

9 years agoMerge pull request #1338 from kaysievers/pam
Lennart Poettering [Tue, 22 Sep 2015 16:19:36 +0000 (18:19 +0200)]
Merge pull request #1338 from kaysievers/pam

pam: systemd-user - call selinux module

9 years agoudev: ata_id - ATA_ID_SATA_CAPABILITY == 76
Kay Sievers [Tue, 22 Sep 2015 16:00:52 +0000 (18:00 +0200)]
udev: ata_id - ATA_ID_SATA_CAPABILITY == 76

9 years agopam: systemd-user - call selinux module
Kay Sievers [Thu, 17 Sep 2015 15:15:28 +0000 (17:15 +0200)]
pam: systemd-user - call selinux module

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

9 years agoupdate TODO
Lennart Poettering [Wed, 16 Sep 2015 23:19:06 +0000 (01:19 +0200)]
update TODO

9 years agoMerge pull request #1334 from poettering/sd-bus-default-flush-close
David Herrmann [Tue, 22 Sep 2015 15:33:58 +0000 (17:33 +0200)]
Merge pull request #1334 from poettering/sd-bus-default-flush-close

sd-bus: introduce new sd_bus_default_flush_close() call

9 years agoMerge pull request #1324 from pugs/master
Kay Sievers [Tue, 22 Sep 2015 15:08:39 +0000 (17:08 +0200)]
Merge pull request #1324 from pugs/master

Fixup WWN bytes for big-endian systems

9 years agoMerge pull request #1335 from poettering/some-fixes
Daniel Mack [Tue, 22 Sep 2015 15:04:38 +0000 (17:04 +0200)]
Merge pull request #1335 from poettering/some-fixes

A variety of mostly unrelated fixes

9 years agoMerge pull request #1336 from pszewczyk/functionfs_sockets_v3
Lennart Poettering [Tue, 22 Sep 2015 14:55:08 +0000 (16:55 +0200)]
Merge pull request #1336 from pszewczyk/functionfs_sockets_v3

core: add support for usb functionfs v3

9 years agoimportd: make sure we don't accidentally close fd 0
Lennart Poettering [Tue, 22 Sep 2015 14:40:36 +0000 (16:40 +0200)]
importd: make sure we don't accidentally close fd 0

Fixes #1330

9 years agoman: drop reference to yum from man pages
Lennart Poettering [Tue, 22 Sep 2015 14:36:49 +0000 (16:36 +0200)]
man: drop reference to yum from man pages

Apparently, yum is obsolete, and dnf is the new yum. Mention only dnf
hence, and don't mention yum anymore.

9 years agoman: Add documentation for functionfs socket activation
Pawel Szewczyk [Fri, 4 Sep 2015 10:23:54 +0000 (12:23 +0200)]
man: Add documentation for functionfs socket activation

9 years agocore: Add FFSDescriptors and FFSStrings service parameters
Pawel Szewczyk [Fri, 4 Sep 2015 10:23:51 +0000 (12:23 +0200)]
core: Add FFSDescriptors and FFSStrings service parameters

By using these parameters functionfs service can specify ffs descriptors
and strings which should be written to ep0.

9 years agocore: Add socket type for usb functionfs endpoints
Pawel Szewczyk [Mon, 21 Sep 2015 13:43:47 +0000 (15:43 +0200)]
core: Add socket type for usb functionfs endpoints

For handling functionfs endpoints additional socket type is added.

9 years agonotify: sort header files, follow CODING_STYLE
Lennart Poettering [Fri, 18 Sep 2015 23:56:12 +0000 (01:56 +0200)]
notify: sort header files, follow CODING_STYLE

9 years agoutil: drop UID_IS_INVALID() in favour of uid_is_valid()
Lennart Poettering [Fri, 18 Sep 2015 23:55:29 +0000 (01:55 +0200)]
util: drop UID_IS_INVALID() in favour of uid_is_valid()

No need to keep both functions, settle on uid_is_valid() for everything.

9 years agoutil.h: order includes, as suggested by CODING_STYLE
Lennart Poettering [Fri, 18 Sep 2015 22:53:58 +0000 (00:53 +0200)]
util.h: order includes, as suggested by CODING_STYLE

Of course, because Linux is broken we cannot actually really order it,
and must keep linux/fs.h after sys/mount.h... Yay for Linux!

9 years agoutil: clean-ups to enum parsers
Lennart Poettering [Fri, 18 Sep 2015 22:50:34 +0000 (00:50 +0200)]
util: clean-ups to enum parsers

Never log when we fail due to OOM when translating enums, let the caller
do that. Translating basic types like enums should be something where
the caller logs, not the translatior functions.

Return -1 when NULL is passed to all enum parser functions.

The non-fallback versions of the enum translator calls already handle
NULL as failure, instead of hitting an assert, and we should do this
here, too.

9 years agocgtop: make sure help text doesn't cause main contents to move
Lennart Poettering [Fri, 18 Sep 2015 22:48:49 +0000 (00:48 +0200)]
cgtop: make sure help text doesn't cause main contents to move

Let's always keep space for the full help text. (We used to do that, but
recently another line of help was added which broke this.)

9 years agoutil: minor cleanups for loop_read() and friends
Lennart Poettering [Fri, 18 Sep 2015 22:47:08 +0000 (00:47 +0200)]
util: minor cleanups for loop_read() and friends

When 0 bytes are to be written, make sure to go into read() at least
once, in order to validate the parameters, such as the passed fd.

Return error on huge values, add a couple of asserts and casts where
appropriate.

9 years agocgtop: underline table header
Lennart Poettering [Fri, 18 Sep 2015 22:45:05 +0000 (00:45 +0200)]
cgtop: underline table header

Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect.

9 years agosd-id128: make size constraints a bit more obvious
Lennart Poettering [Wed, 16 Sep 2015 23:22:10 +0000 (01:22 +0200)]
sd-id128: make size constraints a bit more obvious

9 years agoutil: add safe_closedir() similar to safe_fclose()
Lennart Poettering [Wed, 16 Sep 2015 23:21:19 +0000 (01:21 +0200)]
util: add safe_closedir() similar to safe_fclose()

9 years agocopy: make copy_bytes() return whether we hit EOF or not
Lennart Poettering [Wed, 16 Sep 2015 23:20:56 +0000 (01:20 +0200)]
copy: make copy_bytes() return whether we hit EOF or not

9 years agocopy: be more careful when trying to reflink
Lennart Poettering [Wed, 16 Sep 2015 23:19:54 +0000 (01:19 +0200)]
copy: be more careful when trying to reflink

9 years agosd-bus: introduce new sd_bus_default_flush_close() call
Lennart Poettering [Tue, 22 Sep 2015 12:13:10 +0000 (14:13 +0200)]
sd-bus: introduce new sd_bus_default_flush_close() call

If code enqueues a message on one of the default busses, but doesn't
sync on it, and immediately drops the reference to the bus again, it
will stay queued and consume memory. Intrdouce a new call
sd_bus_default_flush_close() that can be invoked at the end of programs
(or threads) and flushes out all unsent messages on any of the default
busses.

9 years agologin: support more than just power-gpio-key
doubleodoug [Thu, 10 Sep 2015 02:00:26 +0000 (22:00 -0400)]
login: support more than just power-gpio-key

Adding additional keys prevents this gpio-keys powerswitch from working,
e.g. this wouldn't poweroff:

button@23 {
    label = "power-switch";
    linux,code = <116>;
    gpios = <&gpio 23 1>;
};
button@25 {
    label = "KEY_A";
    linux,code = <30>;
    gpios = <&gpio 25 1>;
};

Changing ATTRS{keys}=="116" to ATTRS{keys}=="*116*" makes the
power-switch and the A key both work properly.

(David: rephrase and merge-commits)

9 years agoMerge pull request #1333 from dvdhrm/sd-network-cleanup
Lennart Poettering [Tue, 22 Sep 2015 13:31:55 +0000 (15:31 +0200)]
Merge pull request #1333 from dvdhrm/sd-network-cleanup

sd-network: random API cleanups

9 years agosd-lldp: hide internal details
David Herrmann [Tue, 22 Sep 2015 13:19:42 +0000 (15:19 +0200)]
sd-lldp: hide internal details

Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic
constant '10'. This is completely bogus, so fix it to follow our coding
standards:

  - Prefix exported symbols by SD_LLDP_*

  - Define a separate event-enum for event types

  - Translate internal state to external event-types

9 years agosd-lldp: hide internal information
David Herrmann [Tue, 22 Sep 2015 13:12:55 +0000 (15:12 +0200)]
sd-lldp: hide internal information

Don't export constant that are only used internally.

9 years agosd-pppoe: fix namespacing
David Herrmann [Tue, 22 Sep 2015 13:09:58 +0000 (15:09 +0200)]
sd-pppoe: fix namespacing

Prefix all exported constants by SD_PPPOE_* to avoid namespacing
conflicts.

9 years agosd-ipv4ll: fix namespacing
David Herrmann [Tue, 22 Sep 2015 13:08:28 +0000 (15:08 +0200)]
sd-ipv4ll: fix namespacing

Prefix all exported constants with SD_IPV4LL_* to avoid namespacing
conflicts.

9 years agosd-ipv4acd: fix namespacing
David Herrmann [Tue, 22 Sep 2015 13:05:35 +0000 (15:05 +0200)]
sd-ipv4acd: fix namespacing

Prefix all exported constants with SD_IPV4ACD to prevent namespacing
conflicts.

9 years agosd-icmp6-nd: fix namespacing
David Herrmann [Tue, 22 Sep 2015 12:59:51 +0000 (14:59 +0200)]
sd-icmp6-nd: fix namespacing

Prefix all exported constants by SD_ICMP6_ND_* to avoid any namespacing
conflicts.

9 years agosd-dhcp6: fix namespacing
David Herrmann [Tue, 22 Sep 2015 12:52:23 +0000 (14:52 +0200)]
sd-dhcp6: fix namespacing

Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any
namespacing conflicts.

9 years agosd-dhcp: fix namespacing
David Herrmann [Tue, 22 Sep 2015 12:46:21 +0000 (14:46 +0200)]
sd-dhcp: fix namespacing

Prefix all constants with SD_DHCP_CLIENT_* to avoid namespacing
conflicts.

9 years agoMerge pull request #986 from karelzak/monitor
Lennart Poettering [Tue, 22 Sep 2015 12:31:58 +0000 (14:31 +0200)]
Merge pull request #986 from karelzak/monitor

mount: use libmount to monitor mountinfo & utab

9 years agoMerge pull request #1331 from dvdhrm/misc-cleanup
Lennart Poettering [Tue, 22 Sep 2015 12:30:09 +0000 (14:30 +0200)]
Merge pull request #1331 from dvdhrm/misc-cleanup

util, nspawn, machined: random cleanups

9 years agonspawn, machined: fix comments and error messages
Krzesimir Nowak [Tue, 22 Sep 2015 12:16:17 +0000 (14:16 +0200)]
nspawn, machined: fix comments and error messages

A bunch of "Client -> Child" fixes and one barrier-enumerator fix.

(David: rebased on master)

9 years agonspawn: close unneeded sockets in outer child
Krzesimir Nowak [Wed, 27 May 2015 11:52:31 +0000 (13:52 +0200)]
nspawn: close unneeded sockets in outer child

(David: Note, this is just a cleanup and doesn't fix any bugs)

9 years agoutil: introduce {send,receive}_one_fd()
David Herrmann [Tue, 22 Sep 2015 12:09:54 +0000 (14:09 +0200)]
util: introduce {send,receive}_one_fd()

Introduce two new helpers that send/receive a single fd via a unix
transport. Also make nspawn use them instead of hard-coding it.

Based on a patch by Krzesimir Nowak.

9 years agoNEWS: add some information about v227
Daniel Mack [Tue, 22 Sep 2015 11:30:12 +0000 (13:30 +0200)]
NEWS: add some information about v227

9 years agocore: Add list of additional file descriptors to socket port
Pawel Szewczyk [Mon, 21 Sep 2015 14:30:41 +0000 (16:30 +0200)]
core: Add list of additional file descriptors to socket port

Some additional files related to single socket may appear in the
filesystem and they should be opened and passed to related service.

This commit adds optional list of file descriptors, which are
dynamically discovered and opened.

9 years agoMerge pull request #1323 from dvdhrm/mount-propagate
Lennart Poettering [Tue, 22 Sep 2015 00:34:45 +0000 (02:34 +0200)]
Merge pull request #1323 from dvdhrm/mount-propagate

mount: propagate error codes correctly

9 years agoMerge pull request #1325 from splantefeve/fr-translation
Lennart Poettering [Mon, 21 Sep 2015 23:05:27 +0000 (01:05 +0200)]
Merge pull request #1325 from splantefeve/fr-translation

po: update french translation

9 years agopo: update french translation
Sylvain Plantefève [Mon, 21 Sep 2015 22:23:49 +0000 (00:23 +0200)]
po: update french translation

9 years agoFixup WWN bytes for big-endian systems
Tom Lyon [Mon, 21 Sep 2015 21:36:32 +0000 (14:36 -0700)]
Fixup WWN bytes for big-endian systems

9 years agohwdb: fix typo in G9x DPI
David Herrmann [Mon, 21 Sep 2015 19:56:10 +0000 (21:56 +0200)]
hwdb: fix typo in G9x DPI

Fix typo in DPI: 32000 -> 3200

9 years agohwdb: drop weird whitespace
David Herrmann [Mon, 21 Sep 2015 18:11:17 +0000 (20:11 +0200)]
hwdb: drop weird whitespace

Remove whitespace from empty line in hwdb.

9 years agoMerge pull request #1317 from ronnychevalier/rc/ipv4ll_seed
Daniel Mack [Mon, 21 Sep 2015 18:05:18 +0000 (20:05 +0200)]
Merge pull request #1317 from ronnychevalier/rc/ipv4ll_seed

sd-ipv4ll: do not assert_return when seed == 0

9 years agomount: propagate error codes correctly
David Herrmann [Mon, 21 Sep 2015 17:59:07 +0000 (19:59 +0200)]
mount: propagate error codes correctly

Make sure to propagate error codes from mount-loops correctly. Right now,
we return the return-code of the first mount that did _something_. This is
not what we want. Make sure we return an error if _any_ mount fails (and
then make sure to return the first error to not hide proper errors due to
consequential errors like -ENOTDIR).

Reported by cee1 <fykcee1@gmail.com>.

9 years agoMerge pull request #1322 from evverx/update-systemd-cgtop-bash-completion
Daniel Mack [Mon, 21 Sep 2015 17:43:49 +0000 (19:43 +0200)]
Merge pull request #1322 from evverx/update-systemd-cgtop-bash-completion

Update systemd-cgtop bash completion

9 years agoshell-completion: cgtop bash completion: add -r,--raw,-k,-P,--order
Evgeny Vereshchagin [Mon, 21 Sep 2015 17:33:00 +0000 (17:33 +0000)]
shell-completion: cgtop bash completion: add -r,--raw,-k,-P,--order

9 years agoshell-completion: cgtop bash completion: -n,--iterations,-d,--delay require arg
Evgeny Vereshchagin [Mon, 21 Sep 2015 17:09:40 +0000 (17:09 +0000)]
shell-completion: cgtop bash completion: -n,--iterations,-d,--delay require arg

9 years agoMerge pull request #1249 from lnykryn/sysv-symlinks
Lennart Poettering [Mon, 21 Sep 2015 17:00:28 +0000 (19:00 +0200)]
Merge pull request #1249 from lnykryn/sysv-symlinks

sysv-generator: follow symlinks in /etc/rc.d/init.d

9 years agoMerge pull request #1321 from evverx/cgtop-recurisive-option
Lennart Poettering [Mon, 21 Sep 2015 16:59:38 +0000 (18:59 +0200)]
Merge pull request #1321 from evverx/cgtop-recurisive-option

shell-completion: update systemd-cgtop bash completion: --recursive

9 years agoshell-completion: update systemd-cgtop bash completion: --recursive
Evgeny Vereshchagin [Mon, 21 Sep 2015 16:54:58 +0000 (16:54 +0000)]
shell-completion: update systemd-cgtop bash completion: --recursive

9 years agoMerge pull request #1320 from ronnychevalier/rc/core_fix_group_ownership
Lennart Poettering [Mon, 21 Sep 2015 16:21:53 +0000 (18:21 +0200)]
Merge pull request #1320 from ronnychevalier/rc/core_fix_group_ownership

core: fix group ownership when Group is set

9 years agocore: fix group ownership when Group is set
Ronny Chevalier [Mon, 21 Sep 2015 13:45:51 +0000 (15:45 +0200)]
core: fix group ownership when Group is set

When Group is set in the unit, the runtime directories are owned by
this group and not the default group of the user (same for cgroup paths
and standard outputs)

Fix #1231

9 years agotest-execute: add tests for RuntimeDirectory
Ronny Chevalier [Mon, 21 Sep 2015 13:36:07 +0000 (15:36 +0200)]
test-execute: add tests for RuntimeDirectory

9 years agoMerge pull request #1315 from systemd-mailing-devs/1442692671-10134-1-git-send-email...
Lennart Poettering [Mon, 21 Sep 2015 16:10:49 +0000 (18:10 +0200)]
Merge pull request #1315 from systemd-mailing-devs/1442692671-10134-1-git-send-email-dev@benjarobin.fr

systemd-notify: Always pass a valid pid to sd_pid_notify

9 years agoMerge pull request #1318 from alban/alban/container-exit-code4
Alban Crequy [Mon, 21 Sep 2015 15:51:21 +0000 (17:51 +0200)]
Merge pull request #1318 from alban/alban/container-exit-code4

containers: systemd exits with non-zero code

9 years agocontainers: systemd exits with non-zero code
Alban Crequy [Fri, 18 Sep 2015 11:37:34 +0000 (13:37 +0200)]
containers: systemd exits with non-zero code

When a systemd service running in a container exits with a non-zero
code, it can be useful to terminate the container immediately and get
the exit code back to the host, when systemd-nspawn returns. This was
not possible to do. This patch adds the following to make it possible:

- Add a read-only "ExitCode" property on PID 1's "Manager" bus object.
  By default, it is 0 so the behaviour stays the same as previously.
- Add a method "SetExitCode" on the same object. The method fails when
  called on baremetal: it is only allowed in containers or in user
  session.
- Add support in systemctl to call "systemctl exit 42". It reuses the
  existing code for user session.
- Add exit.target and systemd-exit.service to the system instance.
- Change main() to actually call systemd-shutdown to exit() with the
  correct value.
- Add verb 'exit' in systemd-shutdown with parameter --exit-code
- Update systemctl manpage.

I used the following to test it:

| $ sudo rkt --debug --insecure-skip-verify run \
|            --mds-register=false --local docker://busybox \
|            --exec=/bin/chroot -- /proc/1/root \
|            systemctl --force exit 42
| ...
| Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42.
| $ echo $?
| 42

Fixes https://github.com/systemd/systemd/issues/1290

9 years agotest-ipv4ll: use unsigned instead of an array for a seed
Ronny Chevalier [Mon, 21 Sep 2015 14:49:59 +0000 (16:49 +0200)]
test-ipv4ll: use unsigned instead of an array for a seed

ipv4ll use an unsigned instead of an uint8_t array. Hence, use an
unsigned seed instead of declaring an array and then dereferencing it
later.

9 years agosd-ipv4ll: do not assert_return when seed == 0
Ronny Chevalier [Mon, 21 Sep 2015 14:51:31 +0000 (16:51 +0200)]
sd-ipv4ll: do not assert_return when seed == 0

Now that seed is an unsigned and not an array, we do not need to assert
on it.

9 years agoMerge pull request #1288 from teg/ipv4acd-3
Tom Gundersen [Mon, 21 Sep 2015 13:13:18 +0000 (15:13 +0200)]
Merge pull request #1288 from teg/ipv4acd-3

sd-ipv4acd: split out as separate library from sd-ipv4ll

9 years agoMerge pull request #1311 from jsynacek/kill-errors-v2
Lennart Poettering [Mon, 21 Sep 2015 13:04:23 +0000 (15:04 +0200)]
Merge pull request #1311 from jsynacek/kill-errors-v2

core: extend KillUnit() to return error when no unit was killed

9 years agoMerge pull request #1314 from evverx/cgtop-machine
Lennart Poettering [Mon, 21 Sep 2015 12:55:48 +0000 (14:55 +0200)]
Merge pull request #1314 from evverx/cgtop-machine

cgtop: add -M/--machine

9 years agocgtop: add -M/--machine
Evgeny Vereshchagin [Mon, 21 Sep 2015 12:04:45 +0000 (12:04 +0000)]
cgtop: add -M/--machine

9 years agocore: extend KillUnit() to return error when no unit was killed
Jan Synacek [Fri, 18 Sep 2015 09:56:53 +0000 (11:56 +0200)]
core: extend KillUnit() to return error when no unit was killed

9 years agoMerge pull request #1292 from gebi/resolve-specifier-in-runtime-directory
Lennart Poettering [Sun, 20 Sep 2015 17:15:04 +0000 (19:15 +0200)]
Merge pull request #1292 from gebi/resolve-specifier-in-runtime-directory

load-fragment: resolve specifiers in RuntimeDirectory

9 years agoMerge pull request #1305 from mrkara/master
Lennart Poettering [Sun, 20 Sep 2015 17:14:37 +0000 (19:14 +0200)]
Merge pull request #1305 from mrkara/master

[l10n] Added Turkish translation

9 years agoMerge pull request #1309 from nazgul77/master
Lennart Poettering [Sun, 20 Sep 2015 17:14:09 +0000 (19:14 +0200)]
Merge pull request #1309 from nazgul77/master

[l10n] Update German translation

9 years agoUpdate German translation
nazgul77 [Sun, 20 Sep 2015 12:54:34 +0000 (14:54 +0200)]
Update German translation

9 years agosystemd-notify: Always pass a valid pid to sd_pid_notify
Benjamin Robin [Sat, 19 Sep 2015 19:57:51 +0000 (21:57 +0200)]
systemd-notify: Always pass a valid pid to sd_pid_notify

If the option --pid was used, take the pid from this option, unless take
the parend pid. Using 0 as pid (ucred of systemd-notify) will result 99% of the
time in a failure with this error: "Cannot find unit for notify message of PID"

Shouldn't we use always the ppid, since the MAINPID is something else ?

Signed-off-by: Benjamin Robin <dev@benjarobin.fr>
9 years ago[l10n] Added Turkish translation
Muhammet Kara [Sat, 19 Sep 2015 05:35:32 +0000 (08:35 +0300)]
[l10n] Added Turkish translation

9 years agoMerge pull request #1303 from evverx/show-controller
Lennart Poettering [Fri, 18 Sep 2015 23:49:25 +0000 (01:49 +0200)]
Merge pull request #1303 from evverx/show-controller

cgls: show controller without args too

9 years agocgls: show controller without args too
Evgeny Vereshchagin [Fri, 18 Sep 2015 17:58:28 +0000 (17:58 +0000)]
cgls: show controller without args too

9 years agosd-ipv4{acd,ll}: add simple test programs
Tom Gundersen [Fri, 21 Aug 2015 21:04:14 +0000 (23:04 +0200)]
sd-ipv4{acd,ll}: add simple test programs

These programs should be run manually, typically two instances on a
veth pair to check conflict detection.

Both test programs take the ifname as input, the ACD also takes the
IP address to check, whereas LL (optionally) takes the seed, which
determines the sequence of IP addresses to try.

9 years agosd-ipv4acd: introduce new library split out from sd-ipv4ll
Tom Gundersen [Fri, 21 Aug 2015 10:50:31 +0000 (12:50 +0200)]
sd-ipv4acd: introduce new library split out from sd-ipv4ll

This splits the Address Conflict Detection out of the Link Local
library so that we can reuse it for DHCP and static addresses in
the future.

Implements RFC5227.

9 years agosd-ipv4ll: simplify conflict handling
Tom Gundersen [Thu, 20 Aug 2015 23:02:59 +0000 (01:02 +0200)]
sd-ipv4ll: simplify conflict handling

Use stop() and start() to drop some pulicate code.

9 years agosd-ipv4ll: rework callbacks
Tom Gundersen [Thu, 20 Aug 2015 09:40:10 +0000 (11:40 +0200)]
sd-ipv4ll: rework callbacks

Firstly, no longer distinguish between STOP and INIT states.

Secondly, do not trigger STOP events when calls to sd_ipv4ll_*() fail. The
caller is the one who would receive the event and will already know that the
call to sd_ipv4ll_*() has failed, so it is redundant.

STOP events will now only be triggered by calling sd_ipv4ll_stop() explicitly
or by some internal error in the library triggered by receiving a packet or
an expiring timeout (i.e., any error that would otherwise not be reported
back to the consumer of the library).

Lastly, follow CODING_STYLE and always return NULL on unref. Protect from
objects being destroyed in callbacks accordingly.

9 years agosd-ipv4ll: don't allow changing MAC address whilst running
Tom Gundersen [Thu, 20 Aug 2015 09:26:57 +0000 (11:26 +0200)]
sd-ipv4ll: don't allow changing MAC address whilst running

This requires the caller to stop and restart the statemachine if they want to
change the MAC address.

9 years agosd-ipv4ll: code cleanups
Tom Gundersen [Wed, 19 Aug 2015 22:09:08 +0000 (00:09 +0200)]
sd-ipv4ll: code cleanups

Simplify timeout handling.

9 years agosd-ipv4ll: remove duplicate packet verification
Tom Gundersen [Wed, 19 Aug 2015 17:42:38 +0000 (19:42 +0200)]
sd-ipv4ll: remove duplicate packet verification

Most packets are filtered out by the BPF, so only check for the parts that may
actually differ.

9 years agosd-ipv4ll: minor cleanups
Tom Gundersen [Wed, 19 Aug 2015 15:02:33 +0000 (17:02 +0200)]
sd-ipv4ll: minor cleanups

9 years agosd-ipv4ll: split out on_conflict() from on_packet()
Tom Gundersen [Tue, 18 Aug 2015 21:58:58 +0000 (23:58 +0200)]
sd-ipv4ll: split out on_conflict() from on_packet()