summaryrefslogtreecommitdiff
path: root/src/shared/exit-status.h
Commit message (Collapse)AuthorAgeFilesLines
* exit-status: add EXIT_BPFIago López Galeiras2021-10-061-0/+1
| | | | It will be used later.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* core: add credentials logicLennart Poettering2020-08-251-0/+1
| | | | Fixes: #15778 #16060
* exit-status: rename EXIT_STATUS_GLIBC → EXIT_STATUS_LIBCLennart Poettering2019-07-291-2/+2
| | | | | After all these two exit codes are defined by ISO C as part of the C library, and it's not the GNU implementation defines them.
* shared/exit-status: use Bitmap instead of SetsZbigniew Jędrzejewski-Szmek2019-07-291-6/+6
| | | | | | | | | | | | | | | | | | I opted to embed the Bitmap structure directly in the ExitStatusSet. This means that memory usage is a bit higher for units which don't define this setting: Service changes: /* size: 2720, cachelines: 43, members: 73 */ /* sum members: 2680, holes: 9, sum holes: 39 */ /* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */ /* last cacheline: 32 bytes */ /* size: 2816, cachelines: 44, members: 73 */ /* sum members: 2776, holes: 9, sum holes: 39 */ /* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */ But this way the code is simpler and we do less pointer chasing.
* shared/exit-status: add exit_status_from_string()Zbigniew Jędrzejewski-Szmek2019-07-291-0/+1
|
* shared/exit-status: turn status level into a bitmask, add "test"Zbigniew Jędrzejewski-Szmek2019-07-291-11/+20
| | | | | The "test" doesn't really test much automatically, but it is still useful to look at the mappings.
* core: introduce NUMAPolicy and NUMAMask optionsMichal Sekletar2019-06-241-0/+1
| | | | | | | | | | | | | Make possible to set NUMA allocation policy for manager. Manager's policy is by default inherited to all forked off processes. However, it is possible to override the policy on per-service basis. Currently we support, these policies: default, prefer, bind, interleave, local. See man 2 set_mempolicy for details on each policy. Overall NUMA policy actually consists of two parts. Policy itself and bitmask representing NUMA nodes where is policy effective. Node mask can be specified using related option, NUMAMask. Default mask can be overwritten on per-service level.
* exit-status: introduce EXIT_EXCEPTION mapping to 255Lennart Poettering2018-11-201-0/+2
|
* Move various files that don't need to be in basic/ to shared/Zbigniew Jędrzejewski-Szmek2018-11-201-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't have much effect on the final build, because we link libbasic.a into libsystemd-shared.so, so in the end, all the object built from basic/ end up in libsystemd-shared. And when the static library is linked into binaries, any objects that are included in it but are not used are trimmed. Hence, the size of output artifacts doesn't change: $ du -sb /var/tmp/inst* 54181861 /var/tmp/inst1 (old) 54207441 /var/tmp/inst1s (old split-usr) 54182477 /var/tmp/inst2 (new) 54208041 /var/tmp/inst2s (new split-usr) (The negligible change in size is because libsystemd-shared.so is bigger by a few hundred bytes. I guess it's because symbols are named differently or something like that.) The effect is on the build process, in particular partial builds. This change effectively moves the requirements on some build steps toward the leaves of the dependency tree. Two effects: - when building items that do not depend on libsystemd-shared, we build less stuff for libbasic.a (which wouldn't be used anyway, so it's a net win). - when building items that do depend on libshared, we reduce libbasic.a as a synchronization point, possibly allowing better parallelism. Method: 1. copy list of .h files from src/basic/meson.build to /tmp/basic 2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-103/+0
| | | | | | | | | | basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/
* exit-status: introduce common exit_status_set_test() call for testing exit ↵Lennart Poettering2015-04-281-0/+1
| | | | status set membership
* smack: introduce new SmackProcessLabel optionWaLyong Cho2014-11-241-0/+1
| | | | | | | | | | | | | | | | | 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]
* exit-status: add new exit code for custom endpoint errorsDaniel Mack2014-09-081-0/+1
|
* exit-status: fix URL in commentDaniel Mack2014-09-051-1/+1
| | | | The LSB sites have moved, so update the URL.
* core: introduce exit_status_set_is_empty() to make things a bit easier to readLennart Poettering2014-07-031-0/+1
|
* exit-status: rename ExitStatusSet's "code" field to "status"Lennart Poettering2014-07-031-1/+1
| | | | | We should follow the naming scheme waitid() uses, not come up with our own reversed one...
* core: introduce new RestartForceExitStatus= service settingLennart Poettering2014-07-031-0/+2
| | | | | | This does the inverse of RestartPreventExitStatus=: it forces a restart of a service when a certain exit status is returned by a service process.
* kdbus: when uploading bus name policy, resolve users/groups out-of-processLennart Poettering2014-06-051-0/+1
| | | | | It's not safe invoking NSS from PID 1, hence fork off worker processes that upload the policy into the kernel for busnames.
* socket: add SocketUser= and SocketGroup= for chown()ing sockets in the file ↵Lennart Poettering2014-06-051-1/+2
| | | | | | | system This is relatively complex, as we cannot invoke NSS from PID 1, and thus need to fork a helper process temporarily.
* core: remove tcpwrap supportLennart Poettering2014-03-241-1/+1
| | | | | | | | | | | | 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.
* core: move ShowStatus type into the coreLennart Poettering2014-03-031-12/+2
| | | | | Let's make the scope of the show-status stuff a bit smaller, and make it private to the core, rather than shared API in shared/.
* core: introduce new RuntimeDirectory= and RuntimeDirectoryMode= unit settingsLennart Poettering2014-03-031-0/+1
| | | | | As discussed on the ML these are useful to manage runtime directories below /run for services.
* core: add new RestrictAddressFamilies= switchLennart Poettering2014-02-261-1/+2
| | | | | | | | | This new unit settings allows restricting which address families are available to processes. This is an effective way to minimize the attack surface of services, by turning off entire network stacks for them. This is based on seccomp, and does not work on x86-32, since seccomp cannot filter socketcall() syscalls on that platform.
* core: Add AppArmor profile switchingMichael Scherer2014-02-211-1/+2
| | | | | | This permit to switch to a specific apparmor profile when starting a daemon. This will result in a non operation if apparmor is disabled. It also add a new build requirement on libapparmor for using this feature.
* core: add Personality= option for units to set the personality for spawned ↵Lennart Poettering2014-02-191-1/+2
| | | | processes
* core: fixate show_status earlier, so that we actually print the welcome messageLennart Poettering2014-02-171-1/+1
| | | | | | Previously, we'd fixed show_state only after printing the welcome message which had the effect that the welcome message was almost always suppressed.
* exec: Add SELinuxContext configuration itemMichael Scherer2014-02-101-1/+2
| | | | | | | | 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.
* manager: add systemd.show_status=auto modeZbigniew Jędrzejewski-Szmek2014-01-271-0/+12
| | | | | | | | | | | | | 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.
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-021-1/+1
| | | | | | | | 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.
* service: add options RestartPreventExitStatus and SuccessExitStatusLukas Nykryn2012-08-141-3/+8
| | | | | | | | | In some cases, like wrong configuration, restarting after error does not help, so administrator can specify statuses by RestartPreventExitStatus which will not cause restart of a service. Sometimes you have non-standart exit status, so this can be specified by SuccessfulExitStatus.
* use #pragma once instead of foo*foo #define guardsShawn Landden2012-07-191-4/+1
| | | | | | | | | | | | | | | | | #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
* execute: support syscall filtering using seccomp filtersLennart Poettering2012-07-171-2/+3
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-121-4/+4
| | | | | | | | | | | | | | 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.
* util: move all to shared/ and split external dependencies in separate ↵Kay Sievers2012-04-101-0/+85
internal libraries Before: $ ldd /lib/systemd/systemd-timestamp linux-vdso.so.1 => (0x00007fffb05ff000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f90aac57000) libcap.so.2 => /lib64/libcap.so.2 (0x00007f90aaa53000) librt.so.1 => /lib64/librt.so.1 (0x00007f90aa84a000) libc.so.6 => /lib64/libc.so.6 (0x00007f90aa494000) /lib64/ld-linux-x86-64.so.2 (0x00007f90aae90000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f90aa290000) libattr.so.1 => /lib64/libattr.so.1 (0x00007f90aa08a000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f90a9e6e000) After: $ ldd systemd-timestamp linux-vdso.so.1 => (0x00007fff3cbff000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5eaa1c3000) librt.so.1 => /lib64/librt.so.1 (0x00007f5ea9fbb000) libc.so.6 => /lib64/libc.so.6 (0x00007f5ea9c04000) /lib64/ld-linux-x86-64.so.2 (0x00007f5eaa3fc000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f5ea9a00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5ea97e4000)