summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2014-10-24manager: Linux on hppa has fewer rtsigs, hence avoid using the higher ones thereLennart Poettering
https://bugs.freedesktop.org/show_bug.cgi?id=84931
2014-10-24shutdown: pass own argv to /run/initramfs/shutdownMarius Tessmann
Since commit b1e90ec515408aec2702522f6f68c4920b56375b systemd passes its log settings to systemd-shutdown via command line parameters. However, systemd-shutdown doesn't pass these parameters to /run/initramfs/shutdown, causing it to fall back to the default log settings. This fixes the following bugs about the shutdown not being quiet despite "quiet" being in the kernel parameters: https://bugs.freedesktop.org/show_bug.cgi?id=79582 https://bugs.freedesktop.org/show_bug.cgi?id=57216
2014-10-23socket: properly label socket symlinksLennart Poettering
2014-10-23socket: fix error comparisonLennart Poettering
2014-10-23selinux: clean up selinux label function namingLennart Poettering
2014-10-23selinux: rework label query APIsLennart Poettering
APIs that query and return something cannot silently fail, they must either return something useful, or an error. Fix that. Also, properly rollback socket unit fd creation when something goes wrong with the security framework.
2014-10-23smack: rework smack APIs a bitLennart Poettering
a) always return negative errno error codes b) always become a noop if smack is off c) always take a NULL label as a request to remove it
2014-10-23mac: rename all calls that apply a label mac_{selinux|smack}_apply_xyz(), ↵Lennart Poettering
and all that reset it to defaults mac_{selinux|smack}_fix() Let's clean up the naming schemes a bit and use the same one for SMACK and for SELINUX.
2014-10-23unit: adjust for the possibility of set_move() failingMichal Schmidt
2014-10-23unit: place reservations before merging other's dependenciesMichal Schmidt
With the hashmap implementation that uses chaining the reservations merely ensure that the merging won't result in long bucket chains. With a future alternative implementation it will additionally reserve memory to make sure the merging won't fail.
2014-10-23mac: also rename use_{smack,selinux,apparmor}() calls so that they share the ↵Lennart Poettering
new mac_{smack,selinux,apparmor}_xyz() convention
2014-10-23mac: rename apis with mac_{selinux/smack}_ prefixWaLyong Cho
2014-10-22sd-bus: rename sd_bus_get_owner_uid(), sd_bus_get_owner_machine_id() and ↵Daniel Mack
sd_bus_get_peer_creds() Clean up the function namespace by renaming the following: sd_bus_get_owner_uid() → sd_bus_get_name_creds_uid() sd_bus_get_owner_machine_id() → sd_bus_get_name_machine_id() sd_bus_get_peer_creds() → sd_bus_get_owner_creds()
2014-10-21util: avoid duplication of TIME_T_MAXRonny Chevalier
2014-10-17systemd: try harder to bind to notify socketZbigniew Jędrzejewski-Szmek
Without the socket open we are going to crash and burn. If for whatever reason we fail during deserialization we will fail when trying to open the socket. In this case it is better to unlink the old socket and maybe lose some messages, than to continue without the notification socket. Of course this situation should not happen, but we should handle it as gracefully as possible anyway. https://bugzilla.redhat.com/show_bug.cgi?id=1099299
2014-10-17systemd: log deserialization errors as warningsZbigniew Jędrzejewski-Szmek
If we failed to parse something that we wrote ourselves, things are seriously off. This is also likely to lead to problems futher on.
2014-10-17systemd: continue switch-root even if umount failsZbigniew Jędrzejewski-Szmek
Leaving the old root around seems better than aborting the switch.
2014-10-17environment: append unit_id to error messages regarding EnvironmentFileLukas Nykryn
2014-10-17execute: downgrade namespace error to "warning"Lennart Poettering
Also, extend the printed warning a bit, explaining the situation more verbosely.
2014-10-17namespace: add missing 'const' to parametersLennart Poettering
2014-10-17execute: don't fail child when we don't have privileges to setup namespacesMichal Sekletar
If we don't have privileges to setup the namespaces then we are most likely running inside some sort of unprivileged container, hence not being able to create namespace is not a problem because spawned service can't access host system anyway.
2014-10-13polkit: as we dropped support for the polkit bus transport, also drop its ↵Lennart Poettering
polkit policy
2014-10-12Set $NOTIFY_SOCKET for control procs if NotifyAccess=allBrandon L Black
2014-10-12ModernizationZbigniew Jędrzejewski-Szmek
2014-10-11Report aa_change_onexec error codeMichael Scherer
Since aa_change_onexec return the error code in errno, and return -1, the current code do not give any useful information when something fail. This make apparmor easier to debug, as seen on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760526
2014-10-10mount-setup: skip relabelling when SELinux and SMACK not supportedEmil Renner Berthing
This is also the only place where FTW_ACTIONRETVAL is used, so this makes systemd compile without SELinux or SMACK support when the standard library doesn't support this extension.
2014-10-09service: enter SERVICE_STOP_SIGTERM state after getting "STOPPING=1"Michal Schmidt
SERVICE_STOP would mean we're running the ExecStop command. That's not the case with "STOPPING=1". Instead we should enter the same state as if we just told the service to stop, i.e. SERVICE_STOP_SIGTERM. This fixes a bug where voluntarily exiting services would hang around in deactivating state until timeout.
2014-10-08core: map the 'rescue' argument to rescue.targetMantas Mikulėnas
Even though the 'emergency' and 'single' aliases come from sysvinit, the lack of 'rescue' is still quite confusing (caught me by surprise for the 9th time yet) and inconsistent with `systemctl rescue` as well.
2014-10-08systemctl: add add-wants and add-requires verbsLukas Nykryn
2014-10-08unit: move UnitDependency to unit-nameLukas Nykryn
2014-10-03core/namespace: remove invalid checkZbigniew Jędrzejewski-Szmek
dir cannot be NULL here, because it was allocated with alloca. CID #1237768.
2014-10-03core/namespace: remove invalid checkZbigniew Jędrzejewski-Szmek
root cannot be NULL here, because it was allocated with alloca. CID #1237769.
2014-10-02Revert "mount: order options before other arguments to mount"Lennart Poettering
This reverts commit 141a1ceaa62578f1ed14f04cae2113dd0f49fd7f. People should fix their libc's getopt(), instead of us using a weird option ordering...
2014-10-02Rename user_runtime to user_runtime_dirZbigniew Jędrzejewski-Szmek
This makes this function name similar to user_config_home() and makes it match the name of the environment variable.
2014-10-02add a transient user unit directorySteven Allen
This patch adds a transient user unit directory under `$XDG_RUNTIME_DIR/systemd/user/` and stores transient user-instance units (such as those created by `systemd-run --user`) under there instead of putting them in $XDG_CONFIG_HOME/systemd/user/. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67331
2014-10-02core/swap: only make configured units part of swap.targetZbigniew Jędrzejewski-Szmek
We used to make all .swap units either RequiredBy=swap.target or WantedBy=swap.target. But swap.target should be the "configured swap units", either through /etc/fstab or non-generated .swap units. It is surprising when systemd starts treating a swap device that was possibly temporarily enabled as a hard dependency for other units. So do not add dependencies with swap.target for units gleaned from /proc/swaps. Similarly, we added dependencies for all aliases of the device name, which clutters up the dependency graph but does not seem to bring any value, since the status of those following units is consistent with the main one anyway. This should be a fix for [1], and it seems the right thing to do anyway. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1114786
2014-10-01core: limit timestamp to sane precisionZbigniew Jędrzejewski-Szmek
Anything below .1 s is meaningless anyway.
2014-09-30core: execute - don't leak strvTom Gundersen
2014-09-29Do not format USEC_INFINITY as NULLZbigniew Jędrzejewski-Szmek
systemctl would print 'CPUQuotaPerSecUSec=(null)' for no limit. This does not look right. Since USEC_INFINITY is one of the valid values, format_timespan() could return NULL, and we should wrap every use of it in strna() or similar. But most callers didn't do that, and it seems more robust to return a string ("infinity") that makes sense most of the time, even if in some places the result will not be grammatically correct.
2014-09-29core/dbus: simplify handling of CPUQuotaPerSecUSecZbigniew Jędrzejewski-Szmek
No functional change intended.
2014-09-29core/swap: advertise Discard over dbusZbigniew Jędrzejewski-Szmek
2014-09-29core/swap: follow the configured unit by defaultZbigniew Jędrzejewski-Szmek
Phenomenon: parameters configured in /etc/fstab for swap units are ignored. E.g. pri= settings have no effect when systemd starts swap units. What is even more confusing, .swap units for the name used in /etc/fstab initially show proper values for Priority=, but after starting them, they are re-initalized from /proc/swaps and show the -1 value from /proc/swaps. Change swap units to follow the original configured unit. This way proper settings are used when starting the swap.
2014-09-29fstab-generator: properly deal with discard as non-last optionZbigniew Jędrzejewski-Szmek
Previous code would only return correct results when discard was the last option. While at it, avoid incorrect behaviour for (invalid) 'pri' option not followed by '=...', and also do not return -1 as the error code.
2014-09-29swap: introduce Discard propertyJan Synacek
Process possible "discard" values from /etc/fstab.
2014-09-26make utmp/wtmp support configurableEmil Renner Berthing
This adds --disable-utmp option to configure. If it is used, all utmp-related functionality, including querying runlevel support, is removed.
2014-09-25localectl: print warning when there are options given on kernel cmdlineMichal Sekletar
2014-09-19socket: introduce SELinuxContextFromNet optionMichal Sekletar
This makes possible to spawn service instances triggered by socket with MLS/MCS SELinux labels which are created based on information provided by connected peer. Implementation of label_get_child_mls_label derived from xinetd. Reviewed-by: Paul Moore <pmoore@redhat.com>
2014-09-18core: Remove uninitialized warnings from bus-endpoint.cPhilippe De Swert
Gcc is spewing some warnings about uninitialized variables. Let's get rid of the noise.
2014-09-18mount: order options before other arguments to mountEmil Renner Berthing
2014-09-16core: fix resource leak in manager_environment_addAndreas Henriksson
Second error path must free the (potentially) allocated memory in the first code chunk before returning. Found by coverity. Fixes: CID#1237750