summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2014-02-20manager: be more precise in message about restartZbigniew Jędrzejewski-Szmek
2014-02-21core: Add AppArmor profile switchingMichael Scherer
This permit to switch to a specific apparmor profile when starting a daemon. This will result in a non operation if apparmor is disabled. It also add a new build requirement on libapparmor for using this feature.
2014-02-21selinux: Don't attempt to load policy in initramfs if it doesn't existColin Walters
Currently on at least Fedora, SELinux policy does not come in the initramfs. systemd will attempt to load *both* in the initramfs and in the real root. Now, the selinux_init_load_policy() API has a regular error return value, as well as an "enforcing" boolean. To determine enforcing state, it looks for /etc/selinux/config as well as the presence of "enforcing=" on the kernel command line. Ordinarily, neither of those exist in the initramfs, so it will return "unknown" for enforcing, and systemd will simply ignore the failure to load policy.
2014-02-21hostnamectl: should the sanitized arch, not the native uname() oneLennart Poettering
2014-02-21core: add new ConditionArchitecture() that checks the architecture returned ↵Lennart Poettering
by uname()'s machine field.
2014-02-20condition: split out most of condition handling into libsystemd-shardTom Gundersen
The parts that require linknig to libcap, libselinux and friends stays in libsystemd-core.
2014-02-20condition: refactor a bitTom Gundersen
No functional change, just move code around a bit to make it simpler to split out some functions.
2014-02-20macro: introduce a nice macro for disabling -Wformat-nonliteral temporarilyLennart Poettering
2014-02-20core/unit: fix unit_add_target_dependencies() for units with no dependenciesDaniel Mack
For units without any dependencies, r needs to be initialized to 0. Otherwise, the return value of unit_add_target_dependencies() is unspecified.
2014-02-20api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering
first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
2014-02-19update TODOLennart Poettering
2014-02-19execute: modernizationsLennart Poettering
2014-02-19make gcc shut upLennart Poettering
If -flto is used then gcc will generate a lot more warnings than before, among them a number of use-without-initialization warnings. Most of them without are false positives, but let's make them go away, because it doesn't really matter.
2014-02-19core: add Personality= option for units to set the personality for spawned ↵Lennart Poettering
processes
2014-02-18seccomp: add helper call to add all secondary archs to a seccomp filterLennart Poettering
And make use of it where appropriate for executing services and for nspawn.
2014-02-18sd-rtnl-message: store reference to the bus in the messageTom Gundersen
This mimics the sd-bus api, as we may need it in the future.
2014-02-17Remove unused variable and two function stubsZbigniew Jędrzejewski-Szmek
2014-02-18util: generalize code that checks whether PIDs are alive or unwaited forLennart Poettering
2014-02-17doc: update punctuationJan Engelhardt
Resolve spotted issues related to missing or extraneous commas, dashes.
2014-02-17core: more exact test on the procfs special string "(deleted)"Jan Engelhardt
In other parts of systemd, the code checks for " (deleted)", but in one instance, it did not (yet). Make it do the same.
2014-02-17Fix gperf syntaxJasper St. Pierre
If we put a closing bracket on its own line, gperf will complain about empty lines. Only occurs if the option in question is disabled. So fix the m4 macros to work properly in both cases.
2014-02-17core: warn when unit files with unsupported options are parsedLennart Poettering
2014-02-17core: store and expose SELinuxContext field normalized as bool + stringLennart Poettering
2014-02-17main: make gcc shut upLennart Poettering
2014-02-17core: fixate show_status earlier, so that we actually print the welcome messageLennart Poettering
Previously, we'd fixed show_state only after printing the welcome message which had the effect that the welcome message was almost always suppressed.
2014-02-17core: find the closest parent slice that has a specfic cgroup controller ↵Lennart Poettering
enabled when enabling/disabling cgroup controllers for units
2014-02-17core: fix property changes in transient unitsLennart Poettering
2014-02-17unit: slice dependencies should not be subject to DefaultDependenciesLennart Poettering
2014-02-17main: don't set no_new_privs when using SystemCallArchitectures= system-wideLennart Poettering
After all, we want to allow userspace to get new privs...
2014-02-17core: rework cgroup mask propagationLennart Poettering
Previously a cgroup setting down tree would result in cgroup membership additions being propagated up the tree and to the siblings, however a unit could never lose cgroup memberships again. With this change we'll make sure that both cgroup additions and removals propagate properly.
2014-02-17Pass log config from systemd to systemd-shutdownZbigniew Jędrzejewski-Szmek
If PID 1 debug logging is enabled, it is nice to keep those settings when switching to systemd-shutdown binary, independently of whether this was done through /proc/cmdline options, or through runtime manipulations.
2014-02-17Some modernizationsZbigniew Jędrzejewski-Szmek
2014-02-17Extract looping over /proc/cmdline into a shared functionZbigniew Jędrzejewski-Szmek
In cryptsetup-generator automatic cleanup had to be replaced with manual cleanup, and the code gets a bit longer. But existing code had the issue that it returned negative values from main(), which was wrong, so should be reworked anyway.
2014-02-16Add white space between _XZ_FEATURE_ and _SECCOMP_FEATURE_Djalal Harouni
2014-02-16core: check for return value from get_process_stateYuxuan Shui
Fix for commit e10c9985bb.
2014-02-15sd-rtnl: always include linux/rtnetlink.hTom Gundersen
2014-02-14core: fix detection of dead processesYuxuan Shui
Commit 5ba6985b moves the UNIT_VTABLE(u)->sigchld_event before systemd actually reaps the zombie. Which leads to service_load_pid_file accepting zombie as a valid pid. This fixes timeouts like: [ 2746.602243] systemd[1]: chronyd.service stop-sigterm timed out. Killing. [ 2836.852545] systemd[1]: chronyd.service still around after SIGKILL. Ignoring. [ 2927.102187] systemd[1]: chronyd.service stop-final-sigterm timed out. Killing. [ 3017.352560] systemd[1]: chronyd.service still around after final SIGKILL. Entering failed mode.
2014-02-14service: when we complain about a notify message we cannot map to main pid ↵Lennart Poettering
because we don't know anything about the main pid, do so at debug level
2014-02-14service: if we don't know the main pid of a service, we cannot accept any ↵Lennart Poettering
notification messages
2014-02-13rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to ↵Lennart Poettering
sd_rtnl_xxx_new_yyy() So far we followed the rule to always indicate the "flavour" of constructors after the "_new_" or "_open_" in the function name, so let's keep things in sync here for rtnl and do the same.
2014-02-13rtnl: drop "sd_" prefix from cleanup macrosLennart Poettering
The "sd_" prefix is supposed to be used on exported symbols only, and not in the middle of names. Let's drop it from the cleanup macros hence, to make things simpler. The bus cleanup macros don't carry the "sd_" either, so this brings the APIs a bit nearer.
2014-02-13seccomp: fix build again if libseccomp is missingLennart Poettering
2014-02-13core: make StopWhenUnneeded work in conjunction with units that failLennart Poettering
during their start job https://bugzilla.redhat.com/show_bug.cgi?id=997031
2014-02-13core: add a system-wide SystemCallArchitectures= settingLennart Poettering
This is useful to prohibit execution of non-native processes on systems, for example 32bit binaries on 64bit systems, this lowering the attack service on incorrect syscall and ioctl 32→64bit mappings.
2014-02-13core: add SystemCallArchitectures= unit setting to allow disabling of non-nativeLennart Poettering
architecture support for system calls Also, turn system call filter bus properties into complex types instead of concatenated strings.
2014-02-12core: fix build without libseccompLennart Poettering
2014-02-12core: rework syscall filterLennart Poettering
- Allow configuration of an errno error to return from blacklisted syscalls, instead of immediately terminating a process. - Fix parsing logic when libseccomp support is turned off - Only keep the actual syscall set in the ExecContext, and generate the string version only on demand.
2014-02-12syscallfilter: port to libseccompRonny Chevalier
2014-02-11journald: log provenience of signalsZbigniew Jędrzejewski-Szmek
2014-02-10nspawn,man: use a common vocabulary when referring to selinux security contextsLennart Poettering
Let's always call the security labels the same way: SMACK: "Smack Label" SELINUX: "SELinux Security Context" And the low-level encapsulation is called "seclabel". Now let's hope we stick to this vocabulary in future, too, and don't mix "label"s and "security contexts" and so on wildly.