summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
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.
2014-02-10exec: Add support for ignoring errors on SELinuxContext by prefixing it with ↵Michael Scherer
-, like for others settings. Also remove call to security_check_context, as this doesn't serve anything, since setexeccon will fail anyway.
2014-02-10exec: Ignore the setting SELinuxContext if selinux is not enabledMichael Scherer
2014-02-10exec: Add SELinuxContext configuration itemMichael Scherer
This permit to let system administrators decide of the domain of a service. This can be used with templated units to have each service in a différent domain ( for example, a per customer database, using MLS or anything ), or can be used to force a non selinux enabled system (jvm, erlang, etc) to start in a different domain for each service.
2014-02-10includes: remove duplicate includesTom Gundersen
Found by the new check-includes make target.
2014-02-08manager: fix initialization of plymouth socketZbigniew Jędrzejewski-Szmek
I'm not sure why this makes a difference...
2014-02-08core: use automatic cleanup in two functionsZbigniew Jędrzejewski-Szmek
2014-02-07core: when an already abandoned unit gets abandoned again generate a clean errorLennart Poettering
2014-02-07core: one step back again, for nspawn we actually can't wait for cgroups ↵Lennart Poettering
running empty since systemd will get exactly zero notifications about it
2014-02-07core: allow PIDs to be watched by two units at the same timeLennart Poettering
In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly referenced as part of the session scope.
2014-02-07core: don't send duplicate SIGCONT when killing unitsLennart Poettering
2014-02-07core: watch SIGCHLD more closely to track processes of units with no ↵Lennart Poettering
reliable cgroup empty notifier When a process dies that we can associate with a specific unit, start watching all other processes of that unit, so that we can associate those processes with the unit too. Also, for service units start doing this as soon as we get the first SIGCHLD for either control or main process, so that we can follow the processes of the service from one to the other, as long as process that remain are processes of the ones we watched that died and got reassigned to us as parent. Similar, for scope units start doing this as soon as the scope controller abandons the unit, and thus management entirely reverts to systemd. To abandon a unit introduce a new Abandon() scope unit method call.
2014-02-07core: fix warningThomas Hindoe Paaboel Andersen
introduced in c7040b5d1c2c148f12b6a5eef3dfce1661805131
2014-02-06transaction: print more information about conflicting jobsZbigniew Jędrzejewski-Szmek
Also remove some debug statement that should not have been committed.
2014-02-06core: only send SIGHUP when doing first kill, not when doing final sigkillLennart Poettering
2014-02-05core: don't wait for non-control/non-main processes when killing processes ↵Lennart Poettering
on the host either Since the current kernel cgroup notification logic is easily confused by existing subgroups, let's do the same thing as in containers before. and just not wait for non-control and non-main processes. This should be corrected as soon as we have sane cgroup notifications from the kernel.
2014-02-05kill: fix error returnLennart Poettering
2014-02-05core: allow User=, Group=, Nice=, Environment=, Type= to be passed when ↵Lennart Poettering
creating a transient service
2014-02-03conf-parser: warn when we open configuration files with weird access bitsLennart Poettering
2014-02-01bus: update kdbus.h (ABI break)Kay Sievers
2014-01-31core: fix oom checkLennart Poettering
2014-01-31core: introduce new stop protocol for unit scopesLennart Poettering
By specifiy a Controller property when creating the scope a client can specify a bus name that will be notified with a RequestStop bus signal when the scope has been asked to shut down, instead of sending SIGTERM to the scope processes themselves. https://bugzilla.redhat.com/show_bug.cgi?id=1032695
2014-01-29core: in containers, don't wait for cgroup empty notifications which will ↵Lennart Poettering
never come
2014-01-29core: use a bit more PID_FMTLennart Poettering
2014-01-29core: make sure to always go through both SIGTERM and SIGKILL states of unitsLennart Poettering
Given that we now have KillMode=mixed where SIGTERM might kill a smaller set than SIGKILL we need to make sure to always go explicitly throught the SIGKILL state to get the right end result.
2014-01-29service: allow KillMode=mixed in conjunction with PAMName=Lennart Poettering
2014-01-29core: introduce new KillMode=mixed which sends SIGTERM only to the main ↵Lennart Poettering
process, but SIGKILL to all daemon processes This should fix some race with terminating systemd --user, where the system systemd instance might race against the user systemd instance when sending SIGTERM.
2014-01-28manager: remove "debugging" "feature"Zbigniew Jędrzejewski-Szmek
2014-01-28manager: requeue the cylon eye for 5s later when a job finishesZbigniew Jędrzejewski-Szmek
We'd reqeue the next status update very soon after. Change it so that we wait for full 5s without any job status changes until we print anything.
2014-01-28manager: print ephemeral information about running jobs' timeouts (v2)Zbigniew Jędrzejewski-Szmek
This reverts commit 28c758de94bc8ba97b89d9dab3f517cf466978d0 but makes job_coldplug smarter. In (v1) I changed the job start timestamp to be always set, so the start time can be reported in the cylon eye message. The bug was that when deserializing jobs, they would be ignored if their start timestamp was unset which was synonymous with no timeout. But after the change, jobs would have a start timestamp set despite having no timeout. After deserialization they would be considered immediately expired. Fix this by checking if the timeout is not zero when considering jobs for expiration.
2014-01-28Revert "manager: print ephemeral information about running jobs' timeouts"Kay Sievers
This reverts commit 2cba2e03524ec0922ddc70f933e8a89b7d23b4ec. It breaks bootup with dracut, the transition to the real rootfs fails.
2014-01-27manager: also turn on output on unit failureZbigniew Jędrzejewski-Szmek
2014-01-27manager: add systemd.show_status=auto modeZbigniew Jędrzejewski-Szmek
When set to auto, status will shown when the first ephemeral message is shown (a job has been running for five seconds). Then until the boot or shutdown ends, status messages will be shown. No indication about the switch is done: I think it should be clear for the user that first the cylon eye and the ephemeral messages appear, and afterwards messages are displayed. The initial arming of the event source was still wrong, but now should really be fixed.
2014-01-27Replace mkostemp+unlink with open(O_TMPFILE)Zbigniew Jędrzejewski-Szmek
This will only work on Linux >= 3.11, and probably not on all filesystems. Fallback code is provided.