platform/upstream/systemd.git
9 years agocore: remove set_default_unit()
Lennart Poettering [Tue, 22 Sep 2015 23:14:34 +0000 (01:14 +0200)]
core: remove set_default_unit()

The new free_and_strdup() call does pretty much the same thing these
days, no need to keep a private limited purpose version around.

9 years agocore: modernize prepare_reexecute()
Lennart Poettering [Tue, 22 Sep 2015 23:11:30 +0000 (01:11 +0200)]
core: modernize prepare_reexecute()

9 years agocore: exit early if we hit OOM
Lennart Poettering [Tue, 22 Sep 2015 23:11:08 +0000 (01:11 +0200)]
core: exit early if we hit OOM

9 years agocore: use %m rather than strerror() where we can
Lennart Poettering [Tue, 22 Sep 2015 23:10:47 +0000 (01:10 +0200)]
core: use %m rather than strerror() where we can

9 years agomain: minor clean-ups
Lennart Poettering [Tue, 22 Sep 2015 23:06:56 +0000 (01:06 +0200)]
main: minor clean-ups

Add (void) casting for a couple of functions where we knowingly ignore
the returning error code.

Use EXIT_FAILURE where appropriate.

Try to initialize structures at declaration time, or at once.

9 years agotree-wide: take benefit of the fact that fdset_free() returns NULL
Lennart Poettering [Tue, 22 Sep 2015 23:05:55 +0000 (01:05 +0200)]
tree-wide: take benefit of the fact that fdset_free() returns NULL

9 years agocore: order #includes in main.c
Lennart Poettering [Tue, 22 Sep 2015 23:04:46 +0000 (01:04 +0200)]
core: order #includes in main.c

9 years agostrv: add strv_free_free() to strv.c and make use of it
Lennart Poettering [Tue, 22 Sep 2015 23:01:26 +0000 (01:01 +0200)]
strv: add strv_free_free() to strv.c and make use of it

Let's teach it a new trick, and make it return NULL.

9 years agotree-wide: port more code to use send_one_fd() and receive_one_fd()
Lennart Poettering [Tue, 22 Sep 2015 23:00:04 +0000 (01:00 +0200)]
tree-wide: port more code to use send_one_fd() and receive_one_fd()

Also, make it slightly more powerful, by accepting a flags argument, and
make it safe for handling if more than one cmsg attribute happens to be
attached.

9 years agocore: sort includes of manager.[ch] according to CODING_STYLE
Lennart Poettering [Tue, 22 Sep 2015 21:24:07 +0000 (23:24 +0200)]
core: sort includes of manager.[ch] according to CODING_STYLE

9 years agoMerge pull request #1403 from dvdhrm/prioq-comment
Michal Schmidt [Tue, 29 Sep 2015 12:33:47 +0000 (14:33 +0200)]
Merge pull request #1403 from dvdhrm/prioq-comment

prioq: add introduction comment

9 years agoprioq: add introduction comment
David Herrmann [Tue, 29 Sep 2015 10:48:14 +0000 (12:48 +0200)]
prioq: add introduction comment

Add comment to prioq.c explaining what it does. And more importantly,
mention that we implement a Heap. It's more than annoying having to
figure out what the code actually does, without ever mentioning the word
'heap'.

9 years agoMerge pull request #1396 from phomes/va-start
David Herrmann [Mon, 28 Sep 2015 08:57:07 +0000 (10:57 +0200)]
Merge pull request #1396 from phomes/va-start

sd-bus: va_start should use the last named parameter

9 years agosd-bus: va_start should use the last named parameter
Thomas Hindoe Paaboel Andersen [Sun, 27 Sep 2015 21:03:40 +0000 (23:03 +0200)]
sd-bus: va_start should use the last named parameter

9 years agoMerge pull request #1392 from dvdhrm/bus-format2
Lennart Poettering [Sun, 27 Sep 2015 13:04:12 +0000 (15:04 +0200)]
Merge pull request #1392 from dvdhrm/bus-format2

sd-bus: add sd_bus_path_{encode,decode}_many() (v2)

9 years agoMerge pull request #1373 from pfl/dhcp6_opportunistic_configuration
Martin Pitt [Sun, 27 Sep 2015 07:42:06 +0000 (09:42 +0200)]
Merge pull request #1373 from pfl/dhcp6_opportunistic_configuration

networkd: Be opportunistic when declaring link configured

9 years agosd-bus: add sd_bus_path_{encode,decode}_many()
David Herrmann [Fri, 25 Sep 2015 17:05:23 +0000 (19:05 +0200)]
sd-bus: add sd_bus_path_{encode,decode}_many()

This introduces two new helpers alongside sd_bus_path_{encode,decode}(),
which work similarly to their counterparts, but accept a format-string as
input. This allows encoding and decoding multiple labels of a format
string at the same time.

9 years agoMerge pull request #1391 from evverx/nspawn-completion
Daniel Mack [Sat, 26 Sep 2015 07:50:00 +0000 (09:50 +0200)]
Merge pull request #1391 from evverx/nspawn-completion

shell-completion: nspawn: add missing values for --link-journal

9 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Sat, 26 Sep 2015 01:30:35 +0000 (03:30 +0200)]
hwdb: Update database of Bluetooth company identifiers

9 years agoshell-completion: nspawn: add missing values for --link-journal
Evgeny Vereshchagin [Sat, 26 Sep 2015 00:59:56 +0000 (03:59 +0300)]
shell-completion: nspawn: add missing values for --link-journal

9 years agoupdate NEWS
Daniel Mack [Fri, 25 Sep 2015 15:37:27 +0000 (17:37 +0200)]
update NEWS

9 years agoMerge pull request #1388 from darkcircle/ko-translation
Daniel Mack [Fri, 25 Sep 2015 15:36:48 +0000 (17:36 +0200)]
Merge pull request #1388 from darkcircle/ko-translation

add a new Korean translation

9 years agoadd a new Korean translation
Seong-ho Cho [Fri, 25 Sep 2015 14:56:14 +0000 (23:56 +0900)]
add a new Korean translation

9 years agoMerge pull request #1382 from filbranden/cpuaffinity2
Daniel Mack [Fri, 25 Sep 2015 11:27:11 +0000 (13:27 +0200)]
Merge pull request #1382 from filbranden/cpuaffinity2

Use parse_cpu_set in CPUAffinity support (for units)

9 years agoMerge pull request #1380 from evverx/journalctl-bash-completion
Daniel Mack [Fri, 25 Sep 2015 10:39:40 +0000 (12:39 +0200)]
Merge pull request #1380 from evverx/journalctl-bash-completion

Update journalctl bash completion

9 years agoload-fragment: Use parse_cpu_set in CPUAffinity support
Filipe Brandenburger [Fri, 25 Sep 2015 02:25:20 +0000 (19:25 -0700)]
load-fragment: Use parse_cpu_set in CPUAffinity support

Tested with a dummy service running 'sleep', modifying its CPUAffinity,
restarting the service and checking the ^Cpus_allowed entries in the
/proc/PID/status file.

9 years agoutil: Add test for parse_cpu_set
Filipe Brandenburger [Fri, 25 Sep 2015 01:48:21 +0000 (18:48 -0700)]
util: Add test for parse_cpu_set

9 years agoshell-completion: journalctl: add missing options
Evgeny Vereshchagin [Fri, 25 Sep 2015 01:24:29 +0000 (04:24 +0300)]
shell-completion: journalctl: add missing options

9 years agoutil: refactor cpu_set parsing into its own function
Filipe Brandenburger [Fri, 25 Sep 2015 00:58:49 +0000 (17:58 -0700)]
util: refactor cpu_set parsing into its own function

Use the new code in config_parse_cpu_affinity2.

Tested by modifying CPUAffinity=... setting in /etc/systemd/system.conf
and reloading the daemon, then checking ^Cpus_allowed in /proc/1/status
to confirm the correct CPU mask is in place.

9 years agoshell-completion: journalctl: add missing fields
Evgeny Vereshchagin [Fri, 25 Sep 2015 00:52:07 +0000 (03:52 +0300)]
shell-completion: journalctl: add missing fields

9 years agoMerge pull request #1377 from evverx/man-systemd-slice
Lennart Poettering [Thu, 24 Sep 2015 15:17:39 +0000 (17:17 +0200)]
Merge pull request #1377 from evverx/man-systemd-slice

man: systemd.slice: add link to cgroups api docs

9 years agoMerge pull request #1376 from dvdhrm/hostnamed-argc
Lennart Poettering [Thu, 24 Sep 2015 15:14:57 +0000 (17:14 +0200)]
Merge pull request #1376 from dvdhrm/hostnamed-argc

hostnamed: drop redundant code

9 years agohostnamed: drop redundant code
David Herrmann [Thu, 24 Sep 2015 14:50:28 +0000 (16:50 +0200)]
hostnamed: drop redundant code

Doing argc checks once is enough enough enough enough.

9 years agoman: systemd.slice: add link to cgroups api docs
Evgeny Vereshchagin [Thu, 24 Sep 2015 14:37:17 +0000 (14:37 +0000)]
man: systemd.slice: add link to cgroups api docs

systemd.scope and systemd.resource-control contain that link.
systemd.slice should contain it too.

9 years agoMerge pull request #1374 from olof/autoconf_gcrypt_dep
Lennart Poettering [Thu, 24 Sep 2015 14:31:49 +0000 (16:31 +0200)]
Merge pull request #1374 from olof/autoconf_gcrypt_dep

build-sys: only use AM_PATH_LIBGCRYPT macro if it exists

9 years agoMerge pull request #1370 from systemd-mailing-devs/1443091642-5853-1-git-send-email...
Daniel Mack [Thu, 24 Sep 2015 13:04:13 +0000 (15:04 +0200)]
Merge pull request #1370 from systemd-mailing-devs/1443091642-5853-1-git-send-email-brueckner@linux.vnet.ibm.com

s390: add personality support

9 years agobuild-sys: only use AM_PATH_LIBGCRYPT macro if it exists
Olof Johansson [Thu, 17 Sep 2015 08:42:55 +0000 (10:42 +0200)]
build-sys: only use AM_PATH_LIBGCRYPT macro if it exists

If gcrypt's m4 macro files aren't installed, with this change, gcrypt
will be disabled --- unless gcrypt support was explicitly requested by
passing --enable-gcrypt to configure, in which case it will fail.
Without this change, autoconf would fail either way with not being able
to resolve AM_PATH_LIBGCRYPT.

9 years agonetworkd: Be opportunistic when declaring link configured
Patrik Flykt [Thu, 24 Sep 2015 12:04:17 +0000 (15:04 +0300)]
networkd: Be opportunistic when declaring link configured

The DHCP variable in the [Network] section of the network configuration
file moves the link to the configured state according to the following:

DHCP=yes   Link is configured when either DHCPv4 or DHCPv6 succeed
DHCP=ipv4  Link is configured only when DHCPv4 succeeds
DHCP=ipv6  Link is configured only when DHCPv6 succeeds
DHCP=no    Neither DHCPv4 or DHCPv6 is attempted

Reported by Martin Pitt.

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

9 years agos390: add personality support
Hendrik Brueckner [Thu, 24 Sep 2015 10:47:22 +0000 (12:47 +0200)]
s390: add personality support

Introduce personality support for Linux on z Systems to run
particular services with a 64-bit or 31-bit personality.

9 years agoMerge pull request #1366 from pocek/sd-event-fixes
Lennart Poettering [Thu, 24 Sep 2015 09:27:08 +0000 (11:27 +0200)]
Merge pull request #1366 from pocek/sd-event-fixes

sd-event: fix prepare priority queue comparison function

9 years agoMerge pull request #1332 from thom311/master
Tom Gundersen [Wed, 23 Sep 2015 22:59:15 +0000 (00:59 +0200)]
Merge pull request #1332 from thom311/master

sd-dhcp6: ensure canceling lease timers and refactor setting lease

9 years agoMerge pull request #1356 from pfl/dhcp6_suspend
Tom Gundersen [Wed, 23 Sep 2015 22:55:49 +0000 (00:55 +0200)]
Merge pull request #1356 from pfl/dhcp6_suspend

DHCPv6 suspend fixes

9 years agosd-event: fix prepare priority queue comparison function
Krzysztof Kotlenga [Wed, 23 Sep 2015 22:34:51 +0000 (00:34 +0200)]
sd-event: fix prepare priority queue comparison function

Otherwise a disabled event source can get swapped with an enabled one
and cause a severe sd-event malfunction.

http://lists.freedesktop.org/archives/systemd-devel/2015-September/034356.html

9 years agoMerge pull request #1363 from msekletar/ldconfig
Lennart Poettering [Wed, 23 Sep 2015 19:10:15 +0000 (21:10 +0200)]
Merge pull request #1363 from msekletar/ldconfig

units: run ldconfig also when cache is unpopulated

9 years agoMerge pull request #1365 from floppym/kcmp
Lennart Poettering [Wed, 23 Sep 2015 19:09:38 +0000 (21:09 +0200)]
Merge pull request #1365 from floppym/kcmp

Add fallback for kcmp() in case __NR_kcmp is undefined

9 years agoAdd fallback for kcmp() in case __NR_kcmp is undefined
Mike Gilbert [Mon, 14 Sep 2015 22:55:09 +0000 (18:55 -0400)]
Add fallback for kcmp() in case __NR_kcmp is undefined

IA64 is missing this syscall as of linux-4.2.
This works around it until the necessary kernel patch gets merged.

9 years agounits: run ldconfig also when cache is unpopulated
Michal Sekletar [Wed, 23 Sep 2015 17:23:21 +0000 (19:23 +0200)]
units: run ldconfig also when cache is unpopulated

9 years agoMerge pull request #1349 from dvdhrm/sync-pam
Lennart Poettering [Wed, 23 Sep 2015 16:42:41 +0000 (18:42 +0200)]
Merge pull request #1349 from dvdhrm/sync-pam

core: make setup_pam() synchronous

9 years agoMerge pull request #1358 from jengelh/master
Daniel Mack [Wed, 23 Sep 2015 15:21:13 +0000 (17:21 +0200)]
Merge pull request #1358 from jengelh/master

build: remove AC_FUNC_MALLOC

9 years agoMerge pull request #1357 from again4you/devel/fix_smack_sd_pam_#2
Lennart Poettering [Wed, 23 Sep 2015 14:44:21 +0000 (16:44 +0200)]
Merge pull request #1357 from again4you/devel/fix_smack_sd_pam_#2

exec: fix the wrong SMACK labeling of (sd-pam) daemon v3

9 years agoMerge pull request #1355 from evverx/systemd-run-man
Lennart Poettering [Wed, 23 Sep 2015 14:43:15 +0000 (16:43 +0200)]
Merge pull request #1355 from evverx/systemd-run-man

man: systemd-run: run bash with --send-sighup

9 years agoMerge pull request #1345 from georgmu/fix_accept_ra
Lennart Poettering [Wed, 23 Sep 2015 14:42:18 +0000 (16:42 +0200)]
Merge pull request #1345 from georgmu/fix_accept_ra

Set accept_ra to "2" if enabled in config

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 agoman: systemd-run: run bash with --send-sighup
Evgeny Vereshchagin [Wed, 23 Sep 2015 12:38:30 +0000 (12:38 +0000)]
man: systemd-run: run bash with --send-sighup

When bash is interactive it ignores SIGTERM.
SIGHUP indicates to bash that the connection has been
severed. `systemctl stop` doesn't wait TimeoutStopSec secs.

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 agoexec: move mac_smack_apply_pid() and setup_pam() to same condition block
Sangjung Woo [Wed, 23 Sep 2015 11:53:09 +0000 (20:53 +0900)]
exec: move mac_smack_apply_pid() and setup_pam() to same condition block

This cleans up exec_child() function by moving mac_smack_apply_pid()
and setup_pam() to the same condition block, since both of them have
the same condition (i.e params->apply_permissions). It improves
readability without changing its operation.

9 years agonetworkd: Wait for DHCPv6 before announcing link configured
Patrik Flykt [Wed, 23 Sep 2015 11:52:03 +0000 (14:52 +0300)]
networkd: Wait for DHCPv6 before announcing link configured

Wait until DHCPv6 has acquired an address before announcing the link
to be configured. Log the DHCPv6 lease lost event.

9 years agosd-dhcp6-client: Properly handle DHCPv6 client restart after resume
Patrik Flykt [Wed, 23 Sep 2015 11:10:26 +0000 (14:10 +0300)]
sd-dhcp6-client: Properly handle DHCPv6 client restart after resume

Whenever a Router Advertisement is received, dhcp6_configure() will be
called. A Router Advertisment can also instruct DHCPv6 to start acquiring
IPv6 addresses in manged mode, if it previously was handling only other
information. As an Router Advertisment is also received after the DHCPv6
client has resumed from a suspend, fix the function not to assume DHCPv6
is currently running, but instead try to restart it. Handle
sd_dhcp6_start() returning -EALREADY indicating that the DHCPv6 client was
already running.

Collect all client unrefs in one place to unclutter the error handling.

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

9 years agotest-dhcp6-client: Update test case due to changed semantics
Patrik Flykt [Wed, 23 Sep 2015 11:00:03 +0000 (14:00 +0300)]
test-dhcp6-client: Update test case due to changed semantics

Update the test case to stop the ongoing Information Request exchange
before unsetting its state. To keep the test case callback verification
simpler, temporarily unset the callback function before stopping.

9 years agosd-dhcp6-client: Prevent setting and restarting of DHCPv6 client
Patrik Flykt [Wed, 23 Sep 2015 10:51:53 +0000 (13:51 +0300)]
sd-dhcp6-client: Prevent setting and restarting of DHCPv6 client

Prevent modifications to index, MAC address, DUID and Information
Request while the DHCPv6 client is running.

Require the DHCPv6 client to be stopped first instead of always
unconditionally restarting it if the caller calls
sd_dhcp6_client_start() more than once. With this change, handling
of for example incoming Router Advertisments becomes much easier.

9 years agoexec: call setup_pam() after SMACK labeling
Sangjung Woo [Wed, 23 Sep 2015 11:41:52 +0000 (20:41 +0900)]
exec: call setup_pam() after SMACK labeling

When 'SmackProcessLabel=' is used in user@.service file, all processes
launched in systemd user session should be labeled as the designated name
of 'SmackProcessLabel' directive. However, if systemd has its own smack
label using '--with-smack-run-label' configuration, '(sd-pam)' is
labeled as the specific name of '--with-smack-run-label'. If
'SmackProcessLabel=' is used in user@.service file without
'--with-smack-run-label' configuration, (sd-pam) is labeled as "_" since
systemd (i.e. pid=1) is labeled as "_".

This is mainly because setup_pam() function is called before applying
smack label to child process. This patch fixes it by calling setup_pam()
after setting the smack label.

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 agoSet accept_ra to "2" if enabled in config
Georg Müller [Wed, 23 Sep 2015 08:27:45 +0000 (10:27 +0200)]
Set accept_ra to "2" if enabled in config

This causes the kernel to accept router advertisments even if
ip forwarding is enabled for this interface.

This fixes #1340.

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 agocore: make setup_pam() synchronous
David Herrmann [Tue, 22 Sep 2015 22:51:20 +0000 (00:51 +0200)]
core: make setup_pam() synchronous

If we spawn a unit with a non-empty 'PAMName=', we fork off a
child-process _inside_ the unit, known as '(sd-pam)', which watches the
session. It waits for the main-process to exit and then finishes it via
pam_close_session(3).

However, the '(sd-pam)' setup is highly asynchronous. There is no
guarantee that process gets spawned before we finish the unit setup.
Therefore, there might be a root-owned process inside of the cgroup of
the unit, thus causing cg_migrate() to error-out with EPERM.

This patch makes setup_pam() synchronous and waits for the '(sd-pam)'
setup to finish before continuing. This guarantees that setresuid(2) was
at least tried before we continue with the child setup of the real unit.
Note that if setresuid(2) fails, we already warn loudly about it. You
really must make sure that you own the passed user if using 'PAMName='.
It seems very plausible to rely on that assumption.

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.