summaryrefslogtreecommitdiff
path: root/src/core/dbus-execute.c
AgeCommit message (Collapse)Author
2015-11-11execute: Add new PassEnvironment= directiveFilipe Brandenburger
This directive allows passing environment variables from the system manager to spawned services. Variables in the system manager can be set inside a container by passing `--set-env=...` options to systemd-spawn. Tested with an on-disk test.service unit. Tested using multiple variable names on a single line, with an empty setting to clear the current list of variables, with non-existing variables. Tested using `systemd-run -p PassEnvironment=VARNAME` to confirm it works with transient units. Confirmed that `systemctl show` will display the PassEnvironment settings. Checked that man pages are generated correctly. No regressions in `make check`.
2015-11-02Merge pull request #1690 from evverx/run-runtime-directoryLennart Poettering
systemd-run can launch units with RuntimeDirectory
2015-10-27process-util: move a couple of process-related calls overLennart Poettering
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: split out syslog-related calls into syslog-util.[ch]Lennart Poettering
2015-10-27src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → ↵Lennart Poettering
capability-util.[ch] The files are named too generically, so that they might conflict with the upstream project headers. Hence, let's add a "-util" suffix, to clarify that this are just our utility headers and not any official upstream headers.
2015-10-27util-lib: split out resource limits related calls into rlimit-util.[ch]Lennart Poettering
2015-10-27util-lib: split out hex/dec/oct encoding/decoding into its own fileLennart Poettering
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-27run: can launch units with RuntimeDirectoryEvgeny Vereshchagin
2015-10-26run: can launch units with ProtectHomeEvgeny Vereshchagin
2015-10-25Merge pull request #1654 from poettering/util-libTom Gundersen
Various changes to src/basic/
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24run: can launch units with ProtectSystemEvgeny Vereshchagin
2015-10-22core: check parsed bus msg in full before applying itLennart Poettering
2015-10-21Merge pull request #1623 from evverx/run-rw-ro-ia-dirsLennart Poettering
systemd-run can launch units with ReadWriteDirectories, ReadOnlyDirectories, InaccessibleDirectories
2015-10-20run: can launch units with ReadWriteDirectories, ReadOnlyDirectories, ↵Evgeny Vereshchagin
InaccessibleDirectories
2015-10-20dbus-execute: remove unused variableThomas Hindoe Paaboel Andersen
from ceb728cf
2015-10-20Merge pull request #1616 from evverx/run-fix-environment-parsingLennart Poettering
run: fix Environment parsing
2015-10-20run: fix Environment parsingEvgeny Vereshchagin
* `Environment=` resets previous assignments * `Environment='a=1 b=2'` sets `a` to `1` and `b` to `2` * `Environment='"a=1 2" b=2"'` sets `a` to `1 2` and `b` to `2`
2015-10-19dbus-execute: some cleanups when parsing EnvironmentFiles= for transient unitsLennart Poettering
2015-10-19Hook more properties for transient unitsNicolas Cornu
systemd-run can now launch units with EnvironmentFile set.
2015-10-17run: can launch units with OOMScoreAdjustEvgeny Vereshchagin
2015-10-15run: can launch units with TimerSlackNSecEvgeny Vereshchagin
2015-10-14core: execute: validate syslog level and facilityEvgeny Vereshchagin
2015-10-14systemd-run: can launch units with SyslogFacilityEvgeny Vereshchagin
2015-10-14systemd-run: can launch units with SyslogLevelEvgeny Vereshchagin
2015-10-14Merge pull request #1529 from evverx/dbus-props-syslog-fac-priLennart Poettering
core: expose `SyslogFacility` and `SyslogLevel` as properties on dbus
2015-10-14core: expose SyslogLevel and SyslogFacility as properties on dbusEvgeny Vereshchagin
2015-10-12bus-util: add bus_property_get_rlimit (move from core/dbus_execute)Evgeny Vereshchagin
2015-10-09systemd-run can now launch units with SyslogIdentifierEvgeny Vereshchagin
2015-10-09systemd-run can now launch units with SyslogLevelPrefixEvgeny Vereshchagin
2015-09-29core: allow setting WorkingDirectory= to the special value ~Lennart Poettering
If set to ~ the working directory is set to the home directory of the user configured in User=. This change also exposes the existing switch for the working directory that allowed making missing working directories non-fatal. This also changes "machinectl shell" to make use of this to ensure that the invoked shell is by default in the user's home directory. Fixes #1268.
2015-09-23Hook more properties for transient unitsNicolas Cornu
systemd-run can now launch units with WorkingDirectory, RootDirectory set.
2015-09-11Hook more properties for transient unitsGabriel de Perthuis
systemd-run can now launch units with PrivateTmp, PrivateDevices, PrivateNetwork, NoNewPrivileges set.
2015-09-09tree-wide: use coccinelle to patch a lot of code to use mfree()Lennart Poettering
This replaces this: free(p); p = NULL; by this: p = mfree(p); Change generated using coccinelle. Semantic patch is added to the sources.
2015-08-25core: drop spurious new lineLennart Poettering
2015-08-24core: open up more executable properties via the busLennart Poettering
This is preparation for a later commit that makes use of these properties for spawning an interactive shell in a container.
2015-08-24core: optionally create LOGIN_PROCESS or USER_PROCESS utmp entriesLennart Poettering
When generating utmp/wtmp entries, optionally add both LOGIN_PROCESS and INIT_PROCESS entries or even all three of LOGIN_PROCESS, INIT_PROCESS and USER_PROCESS entries, instead of just a single INIT_PROCESS entry. With this change systemd may be used to not only invoke a getty directly in a SysV-compliant way but alternatively also a login(1) implementation or even forego getty and login entirely, and invoke arbitrary shells in a way that they appear in who(1) or w(1). This is preparation for a later commit that adds a "machinectl shell" operation to invoke a shell in a container, in a way that is compatible with who(1) and w(1).
2014-12-23run: add a new "-t" mode for invoking a binary on an allocated TTYLennart Poettering
2014-11-24smack: introduce new SmackProcessLabel optionWaLyong Cho
In service file, if the file has some of special SMACK label in ExecStart= and systemd has no permission for the special SMACK label then permission error will occurred. To resolve this, systemd should be able to set its SMACK label to something accessible of ExecStart=. So introduce new SmackProcessLabel. If label is specified with SmackProcessLabel= then the child systemd will set its label to that. To successfully execute the ExecStart=, accessible label should be specified with SmackProcessLabel=. Additionally, by SMACK policy, if the file in ExecStart= has no SMACK64EXEC then the executed process will have given label by SmackProcessLabel=. But if the file has SMACK64EXEC then the SMACK64EXEC label will be overridden. [zj: reword man page]
2014-07-29time-util: add and use USEC/NSEC_INFINIYKay Sievers
2014-06-23core: make sure Environment fields passed in for transient units are ↵Hristo Venev
properly written to unit files https://bugs.freedesktop.org/show_bug.cgi?id=76744
2014-06-04core: rename ReadOnlySystem= to ProtectSystem= and add a third value for ↵Lennart Poettering
also mounting /etc read-only Also, rename ProtectedHome= to ProtectHome=, to simplify things a bit. With this in place we now have two neat options ProtectSystem= and ProtectHome= for protecting the OS itself (and optionally its configuration), and for protecting the user's data.
2014-06-03core: add new ReadOnlySystem= and ProtectedHome= settings for service unitsLennart Poettering
ReadOnlySystem= uses fs namespaces to mount /usr and /boot read-only for a service. ProtectedHome= uses fs namespaces to mount /home and /run/user inaccessible or read-only for a service. This patch also enables these settings for all our long-running services. Together they should be good building block for a minimal service sandbox, removing the ability for services to modify the operating system or access the user's private data.
2014-03-24core: remove tcpwrap supportLennart Poettering
tcpwrap is legacy code, that is barely maintained upstream. It's APIs are awful, and the feature set it exposes (such as DNS and IDENT access control) questionnable. We should not support this natively in systemd. Hence, let's remove the code. If people want to continue making use of this, they can do so by plugging in "tcpd" for the processes they start. With that scheme things are as well or badly supported as they were from traditional inetd, hence no functionality is really lost.
2014-03-05core: make the LimitXYZ= properties settable for transient service unitsLennart Poettering
2014-03-05core: when passing resource limit values to client, map RLIM_INFINITY into ↵Lennart Poettering
portable value (uint64_t) -1
2014-03-04Introduce strv_consume which takes ownershipZbigniew Jędrzejewski-Szmek
This mirrors set_consume and makes the common use a bit nicer.
2014-03-03core: introduce new RuntimeDirectory= and RuntimeDirectoryMode= unit settingsLennart Poettering
As discussed on the ML these are useful to manage runtime directories below /run for services.