summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-09-29tty-ask-password: minor modernizationsLennart Poettering
2015-09-29util: introduce common version() implementation and use it everywhereLennart Poettering
This also allows us to drop build.h from a ton of files, hence do so. Since we touched the #includes of those files, let's order them properly according to CODING_STYLE.
2015-09-29util: unify implementation of NOP signal handlerLennart Poettering
This is highly complex code after all, we really should make sure to only keep one implementation of this extremely difficult function around.
2015-09-29core: remove set_default_unit()Lennart Poettering
The new free_and_strdup() call does pretty much the same thing these days, no need to keep a private limited purpose version around.
2015-09-29core: modernize prepare_reexecute()Lennart Poettering
2015-09-29core: exit early if we hit OOMLennart Poettering
2015-09-29core: use %m rather than strerror() where we canLennart Poettering
2015-09-29main: minor clean-upsLennart Poettering
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.
2015-09-29tree-wide: take benefit of the fact that fdset_free() returns NULLLennart Poettering
2015-09-29core: order #includes in main.cLennart Poettering
2015-09-29strv: add strv_free_free() to strv.c and make use of itLennart Poettering
Let's teach it a new trick, and make it return NULL.
2015-09-29tree-wide: port more code to use send_one_fd() and receive_one_fd()Lennart Poettering
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.
2015-09-29core: sort includes of manager.[ch] according to CODING_STYLELennart Poettering
2015-09-29sd-event: don't provide priority stabilityDavid Herrmann
Currently, we guarantee that if two event-sources with the same priority fire at the same time, they're always dispatched in the same order. While this might sound nice in theory, there's is little benefit in providing stability on that level. We have no control over the order the events are reported, hence, we cannot guarantee that we get notified about both at the same time. By dropping the stability guarantee, we loose roughly 10% Heap swaps in the prioq on a desktop cold-boot. Krzysztof Kotlenga even reported up to 20% on his tests. This sounds worth optimizing, so drop the stability guarantee.
2015-09-29prioq: never shuffle identical entriesDavid Herrmann
Skip shuffling identical entries in shuffle_up(), just like we already do in shuffle_down().
2015-09-29prioq: add introduction commentDavid Herrmann
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'.
2015-09-28Move all unit states to basic/ and extend systemctl --state=helpZbigniew Jędrzejewski-Szmek
2015-09-28systemctl: add --state=helpZbigniew Jędrzejewski-Szmek
This mirrors --type=help and simplifies completion scripts. The array of states is dense, so the is no need to check if the string is null.
2015-09-28Move UnitActiveState to basic/Zbigniew Jędrzejewski-Szmek
Preparation to allow systemctl to query the list of unit states.
2015-09-27sd-bus: va_start should use the last named parameterThomas Hindoe Paaboel Andersen
2015-09-27fsck: start reboot.target irreversiblyŁukasz Stelmach
In some situations rebooting after fixing rootfs fails because the job for reboot.target gets canceled. To avoid this the "mode" parameter of the StartUnitReplace() call needs to be set to "replace-irreversibly".
2015-09-27Merge pull request #1392 from dvdhrm/bus-format2Lennart Poettering
sd-bus: add sd_bus_path_{encode,decode}_many() (v2)
2015-09-27Merge pull request #1373 from pfl/dhcp6_opportunistic_configurationMartin Pitt
networkd: Be opportunistic when declaring link configured
2015-09-26sd-bus: add sd_bus_path_{encode,decode}_many()David Herrmann
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.
2015-09-24load-fragment: Use parse_cpu_set in CPUAffinity supportFilipe Brandenburger
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.
2015-09-24util: Add test for parse_cpu_setFilipe Brandenburger
2015-09-24util: refactor cpu_set parsing into its own functionFilipe Brandenburger
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.
2015-09-24Merge pull request #1376 from dvdhrm/hostnamed-argcLennart Poettering
hostnamed: drop redundant code
2015-09-24hostnamed: drop redundant codeDavid Herrmann
Doing argc checks once is enough enough enough enough.
2015-09-24networkd: Be opportunistic when declaring link configuredPatrik Flykt
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
2015-09-24s390: add personality supportHendrik Brueckner
Introduce personality support for Linux on z Systems to run particular services with a 64-bit or 31-bit personality.
2015-09-24Merge pull request #1366 from pocek/sd-event-fixesLennart Poettering
sd-event: fix prepare priority queue comparison function
2015-09-24Merge pull request #1332 from thom311/masterTom Gundersen
sd-dhcp6: ensure canceling lease timers and refactor setting lease
2015-09-24Merge pull request #1356 from pfl/dhcp6_suspendTom Gundersen
DHCPv6 suspend fixes
2015-09-24sd-event: fix prepare priority queue comparison functionKrzysztof Kotlenga
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
2015-09-23Merge pull request #1365 from floppym/kcmpLennart Poettering
Add fallback for kcmp() in case __NR_kcmp is undefined
2015-09-23Add fallback for kcmp() in case __NR_kcmp is undefinedMike Gilbert
IA64 is missing this syscall as of linux-4.2. This works around it until the necessary kernel patch gets merged.
2015-09-23Merge pull request #1349 from dvdhrm/sync-pamLennart Poettering
core: make setup_pam() synchronous
2015-09-23Merge pull request #1357 from again4you/devel/fix_smack_sd_pam_#2Lennart Poettering
exec: fix the wrong SMACK labeling of (sd-pam) daemon v3
2015-09-23Merge pull request #1345 from georgmu/fix_accept_raLennart Poettering
Set accept_ra to "2" if enabled in config
2015-09-23mising: add __NR_memfd_create syscall number for s390Hendrik Brueckner
2015-09-23exec: move mac_smack_apply_pid() and setup_pam() to same condition blockSangjung Woo
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.
2015-09-23networkd: Wait for DHCPv6 before announcing link configuredPatrik Flykt
Wait until DHCPv6 has acquired an address before announcing the link to be configured. Log the DHCPv6 lease lost event.
2015-09-23sd-dhcp6-client: Properly handle DHCPv6 client restart after resumePatrik Flykt
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
2015-09-23test-dhcp6-client: Update test case due to changed semanticsPatrik Flykt
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.
2015-09-23sd-dhcp6-client: Prevent setting and restarting of DHCPv6 clientPatrik Flykt
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.
2015-09-23exec: call setup_pam() after SMACK labelingSangjung Woo
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.
2015-09-23Merge pull request #1339 from alkino/masterDaniel Mack
Hook more properties for transient units
2015-09-23Set accept_ra to "2" if enabled in configGeorg Müller
This causes the kernel to accept router advertisments even if ip forwarding is enabled for this interface. This fixes #1340.
2015-09-23Hook more properties for transient unitsNicolas Cornu
systemd-run can now launch units with WorkingDirectory, RootDirectory set.