summaryrefslogtreecommitdiff
path: root/src/shared/path-lookup.h
Commit message (Collapse)AuthorAge
* Cleaned up more unneeded types and functions.Sven Eden2017-03-14
| | | | | | | | | | | | | | - src/shared/install.h - removed - src/basic/unit-name.[hc] - cleaned - src/core/cgroup.[hc] - cleaned - src/libelogind/libelogind.sym - cleaned - src/libelogind/sd-daemon/sd-daemon.c - cleaned - src/shared/acl-util.[hc] - cleaned - src/shared/bus-util.[hc] - cleaned - src/shared/output-mode.h - cleaned - src/shared/path-lookup.h - cleaned - src/systemd/sd-daemon.h - cleaned
* Remove SysV compatSven Eden2017-03-14
|
* Prep v225: Applying various fixes and changes to src/shared that got lost ↵Sven Eden2017-03-14
| | | | during git am transfer.
* Get rid of some more unused defines and dirsAndy Wingo2017-03-14
|
* Remove SysV compatAndy Wingo2017-03-14
|
* install: when exporting prefix InstallInfo to become UnitFileInstallInfoLennart Poettering2017-03-14
| | | | | | | All other types exported from install.h should be namespaces like this, hence namespace InstallInfo the same way. Also, remove external forward definition of UnitFileScope type.
* core: rename SystemdRunningAs to ManagerRunningAsLennart Poettering2017-03-14
| | | | | | It's primarily just a property of the Manager object after all, and we try to refer to PID 1 as "manager" instead of "systemd", hence let's to stick to this here too.
* Get rid of some more unused defines and dirsAndy Wingo2015-04-19
|
* Remove SysV compatAndy Wingo2015-04-08
|
* sysv-generator: initialize LookupPaths just onceZbigniew Jędrzejewski-Szmek2015-03-14
| | | | | | | | With debugging on, sysv-generator would print the full set of lookup paths for *every* sysv script. While at it, pass LookupPaths as a pointer in sysv-generator, and constify it everywhere.
* Implement masking and overriding of generatorsZbigniew Jędrzejewski-Szmek2015-01-11
| | | | | | | | | | | | | | | | | | | | | | Sometimes it is necessary to stop a generator from running. Either because of a bug, or for testing, or some other reason. The only way to do that would be to rename or chmod the generator binary, which is inconvenient and does not survive upgrades. Allow masking and overriding generators similarly to units and other configuration files. For the systemd instance, masking would be more common, rather than overriding generators. For the user instances, it may also be useful for users to have generators in $XDG_CONFIG_HOME to augment or override system-wide generators. Directories are searched according to the usual scheme (/usr/lib, /usr/local/lib, /run, /etc), and files with the same name in higher priority directories override files with the same name in lower priority directories. Empty files and links to /dev/null mask a given name. https://bugs.freedesktop.org/show_bug.cgi?id=87230
* path-lookup, systemctl: export lookup_paths_init_from_scope() from ↵Ivan Shapovalov2015-01-05
| | | | shared/install.c and use it
* Rename user_runtime to user_runtime_dirZbigniew Jędrzejewski-Szmek2014-10-02
| | | | | This makes this function name similar to user_config_home() and makes it match the name of the environment variable.
* add a transient user unit directorySteven Allen2014-10-02
| | | | | | | | | This patch adds a transient user unit directory under `$XDG_RUNTIME_DIR/systemd/user/` and stores transient user-instance units (such as those created by `systemd-run --user`) under there instead of putting them in $XDG_CONFIG_HOME/systemd/user/. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=67331
* install: simplify usage of _cleanup_ macrosLennart Poettering2014-08-21
|
* core: remove systemd_running_as lookup functionsZbigniew Jędrzejewski-Szmek2014-07-19
| | | | They are unused and unlikely to ever be.
* Move x-systemd-device.timeout handling from core to fstab-generatorZbigniew Jędrzejewski-Szmek2014-06-30
| | | | | | | | | | | | | Instead of adjusting job timeouts in the core, let fstab-generator write out a dropin snippet with the appropriate JobTimeout. x-systemd-device.timeout option is removed from Options= line in the generated unit. The functions to write dropins are moved from core/unit.c to shared/dropin.c, to make them available outside of core. generator.c is moved to libsystemd-label, because it now uses functions defined in dropin.c, which are in libsystemd-label.
* Make systemctl --root look for files in the proper placesZbigniew Jędrzejewski-Szmek2014-05-15
| | | | | | | | | | | | | | | | | | | | Running systemctl enable/disable/set-default/... with the --root option under strace reveals that it accessed various files and directories in the main fs, and not underneath the specified root. This can lead to correct results only when the layout and configuration in the container are identical, which often is not the case. Fix this by adding the specified root to all file access operations. This patch does not handle some corner cases: symlinks which point outside of the specified root might be interpreted differently than they would be by the kernel if the specified root was the real root. But systemctl does not create such symlinks by itself, and I think this is enough of a corner case not to be worth the additional complexity of reimplementing link chasing in systemd. Also, simplify the code in a few places and remove an hypothetical memory leak on error.
* path_lookup: moved _cleanup_lookup_paths_free_ from install.c to path-lookup.hDaniel Buch2013-10-27
|
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-02
| | | | | | | | I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
* core: move ManagerRunningAs to sharedZbigniew Jędrzejewski-Szmek2012-09-18
| | | | | | | Note: I did s/MANAGER/SYSTEMD/ everywhere, even though it makes the patch quite verbose. Nevertheless, keeping MANAGER prefix in some places, and SYSTEMD prefix in others would just lead to confusion down the road. Better to rip off the band-aid now.
* use #pragma once instead of foo*foo #define guardsShawn Landden2012-07-19
| | | | | | | | | | | | | | | | | #pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported in other compilers. I've been using and maintaining (rebasing) this patch for a while now, as it annoyed me to see #ifndef fooblahfoo, etc all over the place, almost arrogant about the annoyance of having to define all these names to perform a commen but neccicary functionality, when a completely superior alternative exists. I havn't sent it till now, cause its kindof a style change, and it is bad voodoo to mess with style that has been established by more established editors. So feel free to lambast me as a crazy bafoon. v2 - preserve externally used headers
* manager: rework generator logicLennart Poettering2012-05-23
| | | | | | | | | | | | | | | | | | | | Previously generated units were always placed at the end of the search path. With this change there will be three unit dirs instead of one, to place generated entries at the beginning, in the middle and at the end of the search path: beginning: for units that need to override all configuration, regardless of user or vendor. Example use: system-update-generator uses this to temporarily redirect default.target. middle: for units that need to override vendor configuration, but not vendor configuration. Example use: /etc/fstab should override vendor supplied configuration (think /tmp), but should not override native user configuration. end: does not override anything but is available as well. Possible usage might be to convert D-Bus bus service files to native units but allowing vendor supplied native units to win.
* move more common files to shared/ and add them to shared.laKay Sievers2012-04-12