Ninjatrappeur's systemd working tree
Go to file
Lennart Poettering 6592b9759c core: add new new bus call for migrating foreign processes to scope/service units
This adds a new bus call to service and scope units called
AttachProcesses() that moves arbitrary processes into the cgroup of the
unit. The primary user for this new API is systemd itself: the systemd
--user instance uses this call of the systemd --system instance to
migrate processes if itself gets the request to migrate processes and
the kernel refuses this due to access restrictions.

The primary use-case of this is to make "systemd-run --scope --user …"
invoked from user session scopes work correctly on pure cgroupsv2
environments. There, the kernel refuses to migrate processes between two
unprivileged-owned cgroups unless the requestor as well as the ownership
of the closest parent cgroup all match. This however is not the case
between the session-XYZ.scope unit of a login session and the
user@ABC.service of the systemd --user instance.

The new logic always tries to move the processes on its own, but if
that doesn't work when being the user manager, then the system manager
is asked to do it instead.

The new operation is relatively restrictive: it will only allow to move
the processes like this if the caller is root, or the UID of the target
unit, caller and process all match. Note that this means that
unprivileged users cannot attach processes to scope units, as those do
not have "owning" users (i.e. they have now User= field).

Fixes: #3388
2018-02-12 11:34:00 +01:00
.github Docs: Fix spelling and capitalization (#7408) 2017-11-21 14:37:16 +01:00
.mkosi mkosi: update to fedora 27, it's released since a while 2018-02-12 11:34:00 +01:00
catalog catalog: update french translation 2017-12-22 15:34:51 +01:00
coccinelle coccinelle: O_NDELAY → O_NONBLOCK 2018-01-24 11:09:29 +01:00
docs Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: fix mute microphone button on TravelMate P645-S (#8105) 2018-02-05 17:43:23 +01:00
man Suspend on lid close based on power status. (#8016) 2018-02-09 17:37:39 +01:00
modprobe.d Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
network Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
po l10n: update Czech Translation (#8007) 2018-01-26 12:51:21 +09:00
presets Hook up systemd-tmpfiles as user units 2017-12-06 10:19:35 +01:00
rules rules: Mark the kvm device as static_node (for s390x and ppc64) (#7795) 2018-01-08 10:49:15 +01:00
scripts fuzz: add DHCP server fuzzer 2018-01-19 21:48:14 -05:00
shell-completion shell-completion: add --global and unit-paths 2018-02-09 12:27:34 +01:00
src core: add new new bus call for migrating foreign processes to scope/service units 2018-02-12 11:34:00 +01:00
sysctl.d Do not set `net.ipv4.conf.default.*` 2017-12-05 16:34:59 +02:00
sysusers.d sysusers: use NOBODY_USER_NAME 2017-12-07 17:12:13 +09:00
test Merge pull request #8058 from keszybz/sysusers-inline 2018-02-05 16:50:51 +09:00
tmpfiles.d Add license headers and SPDX identifiers to meson.build files 2017-11-19 19:08:15 +01:00
tools [gdb-sd_dump_hashmaps.py] String Formatting Update (#7819) 2018-01-27 14:03:08 +01:00
travis-ci Integration of Travis CI and Coverity Scan Analysis (#7691) 2018-01-11 11:41:35 +01:00
units slice: system.slice should be perpetual like -.mount 2018-02-04 22:51:34 +00:00
xorg login: avoid external process call 2018-01-12 18:02:57 +01:00
.dir-locals.el meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
.editorconfig editorconfig: add rule for meson.build files (#6671) 2017-08-28 16:37:23 +02:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore Add mkosi.output/ to .gitignore 2017-11-29 14:33:56 +01:00
.mailmap NEWS: start putting together an entry for v237 2018-01-25 13:21:00 +01:00
.travis.yml Integration of Travis CI and Coverity Scan Analysis (#7691) 2018-01-11 11:41:35 +01:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
CODING_STYLE CODING_STYLE: provide better explanation why /* */ over // (#7647) 2017-12-15 10:26:07 +01:00
DISTRO_PORTING DISTRO_PORTING: document that distros may/should change fallback DNS as well as fallback NTP if they wish 2017-07-24 11:49:16 +02:00
ENVIRONMENT.md systemctl,verbs: Introduce SYSTEMD_OFFLINE environment variable 2017-12-14 16:00:16 -05:00
HACKING Merge pull request #7933 from keszybz/fuzz-regression 2018-01-27 12:56:42 +03:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
NEWS NEWS: add missing equal sign 2018-01-28 16:54:18 +01:00
README README: fix context for CONFIG_DEVPTS_MULTIPLE_INSTANCES 2018-01-17 18:04:27 +00:00
README.md README.md: add CII Best Practices badge 2017-11-04 21:15:57 +01:00
TODO update TODO 2018-01-31 19:54:25 +01:00
TRANSIENT-SETTINGS.md doc: update TRANSIENT-SETTINGS.md 2018-01-03 02:32:54 +09:00
UIDS-GIDS.md UIDS-GIDS.md: explicitly mention one more user of the overflowuid 2018-01-23 21:20:09 +01:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
meson.build meson.build: make docdir configurable (#8068) 2018-02-02 06:46:15 +09:00
meson_options.txt meson.build: make docdir configurable (#8068) 2018-02-02 06:46:15 +09:00
mkosi.build separate flags from shebang 2017-12-25 19:48:49 +01:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00

README.md

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Build Status
Coverity Scan Status
CII Best Practices

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the HACKING file for information how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.