summaryrefslogtreecommitdiff
path: root/src/core/execute.c
AgeCommit message (Collapse)Author
2012-08-13namespace: rework namespace supportLennart Poettering
- don't use pivot_root() anymore, just reuse root hierarchy - first create all mounts, then mark them read-only so that we get the right behaviour when people want writable mounts inside of read-only mounts - don't pass invalid combinations of MS_ constants to the kernel
2012-07-20unit: split off KillContext from ExecContext containing only kill definitionsLennart Poettering
2012-07-17execute: free syscall filter array after useLennart Poettering
2012-07-17execute: support syscall filtering using seccomp filtersLennart Poettering
2012-07-16unit: introduce %s specifier for the user shellLennart Poettering
2012-06-26core: make systemd.confirm_spawn=1 actually workLennart Poettering
This adds a timeout if the TTY cannot be acquired and makes sure we always output the question to the console, never to the TTY of the respective service.
2012-06-22journal: set the _SYSTEMD_UNIT field for messages from terminated processesEelco Dolstra
As described in https://bugs.freedesktop.org/show_bug.cgi?id=50184 the journal currently doesn't set fields such as _SYSTEMD_UNIT properly for messages coming from processes that have already terminated. This means among other things that "systemctl status" may not show some of the output of services that wrote messages just before they exited. This patch fixes this by having processes that log to the journal write their unit identifier to journald when the connection to /run/systemd/journal/stdout is opened. Journald stores the unit ID and uses it to fill in _SYSTEMD_UNIT when it cannot be obtained normally (i.e. from the cgroup). To prevent impersonating another unit, this information is only used when the caller is root. This doesn't fix the general problem of getting metadata about messages from terminated processes (which requires some kernel support), but it allows "systemctl status" and similar queries to do the Right Thing for units that log via stdout/stderr.
2012-06-04silence gcc warning on 32 bitKay Sievers
2012-06-04remove support for deprecated /proc/self/oom_adjKay Sievers
2012-05-31util: introduce a proper nsec_t and make use of it where appropriateLennart Poettering
2012-05-24main: add configuration option to alter capability bounding set for PID 1Lennart Poettering
This also ensures that caps dropped from the bounding set are also dropped from the inheritable set, to be extra-secure. Usually that should change very little though as the inheritable set is empty for all our uses anyway.
2012-05-24service: for Type=idle units consider START_PRE, START, START_POST all as ACTIVELennart Poettering
We want to avoid a deadlock when a service has ExecStartPre= programs that wait for the job queue to run empty because of Type=idle, but which themselves keep the queue non-empty because START_PRE was considered ACTIVATING and hence the job not complete. With this patch we alter the state translation table so that it is impossible ever to wait for Type=idle unit, hence removing the deadlock.
2012-05-22execute: use a much lower idle timeout that default timeLennart Poettering
The idle timeout after all is for cosmetics only, hence avoid any substantial delays just for it.
2012-05-21sd-pam: Drop uid so parent signal arrives at child.Auke Kok
The PAM helper thread needs to capture the death signal from the parent, but is prohibited from doing so since when the child dies as normal user, the kernel won't allow it to send a TERM to the PAM helper thread which is running as root. This causes the PAM threads to never exit, accumulating after user sessions exit. There is however really no need to keep the PAM threads running as root, so, we can just setresuid() to the same user as defined in the unit file for the parent thread (User=). This makes the TERM signal arrive as normal. In case setresuid() fails, we ignore the error, so we at least fall back to the current behaviour.
2012-05-08util: split-out path-util.[ch]Kay Sievers
2012-04-24service: introduce Type=idle and use it for gettysLennart Poettering
Type=idle is much like Type=simple, however between the fork() and the exec() in the child we wait until PID 1 informs us that no jobs are left. This is mostly a cosmetic fix to make gettys appear only after all boot output is finished and complete. Note that this does not impact the normal job logic as we do not delay the completion of any jobs. We just delay the invocation of the actual binary, and only for services that otherwise would be of Type=simple.
2012-04-13service: place control command in subcgroup control/Lennart Poettering
Previously, we were brutally and onconditionally killing all processes in a service's cgroup before starting the service anew, in order to ensure that StartPre lines cannot be misused to spawn long-running processes. On logind-less systems this has the effect that restarting sshd necessarily calls all active ssh sessions, which is usually not desirable. With this patch control processes for a service are placed in a sub-cgroup called "control/". When starting a service anew we simply kill this cgroup, but not the main cgroup, in order to avoid killing any long-running non-control processes from previous runs. https://bugzilla.redhat.com/show_bug.cgi?id=805942
2012-04-12execute: when we can't get the requested rlimit, get the next closestLennart Poettering
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2012-04-11move libsystemd_core.la sources into core/Kay Sievers