summaryrefslogtreecommitdiff
path: root/src/basic/capability-util.c
Commit message (Collapse)AuthorAge
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-08-24
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-08-24
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* util: add new write_string_filef() helperLennart Poettering2018-08-24
| | | | | This new helper combines asprintf() and write_string_file() in one, which is useful at various places to shorten the code a bit.
* tree-wide: avoid assignment of r just to use in a comparisonZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | This changes r = ...; if (r < 0) to if (... < 0) when r will not be used again.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-08-24
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Prep v236 : Add missing SPDX-License-Identifier (2/9) src/basicSven Eden2018-03-26
|
* Apply updates from upstreamSven Eden2017-12-07
|
* v235: Added missing updatesSven Eden2017-11-19
|
* capability: add new ambient_capabilities_supported() helperLennart Poettering2017-09-25
| | | | | This new function reports whether ambient caps are available, and should be quick because the result is cached.
* capability: change capability_bounding_set_drop() to be work without ↵Lennart Poettering2017-09-25
| | | | | | | privileges when executing a NOP This way daemons which already dropped all caps may use the call to drop priviliges again, which becomes a non-failing NOP.
* Prep v235: Apply pending upstream updates in src/basic [1/4]Sven Eden2017-08-30
|
* capability: change capability_bounding_set_drop() to be work without ↵Lennart Poettering2017-08-29
| | | | | | | privileges when executing a NOP This way daemons which already dropped all caps may use the call to drop priviliges again, which becomes a non-failing NOP.
* user-util: rework maybe_setgroups() a bitLennart Poettering2017-07-05
| | | | | | | | | | | | | | | Let's drop the caching of the setgroups /proc field for now. While there's a strict regime in place when it changes states, let's better not cache it since we cannot really be sure we follow that regime correctly. More importantly however, this is not in performance sensitive code, and there's no indication the cache is really beneficial, hence let's drop the caching and make things a bit simpler. Also, while we are at it, rework the error handling a bit, and always return negative errno-style error codes, following our usual coding style. This has the benefit that we can sensible hanld read_one_line_file() errors, without having to updat errno explicitly.
* core: do not fail in a container if we can't use setgroupsGiuseppe Scrivano2017-07-05
| | | | It might be blocked through /proc/PID/setgroups
* Prep v229: Add missing fixes from upstream [1/6] src/basicSven Eden2017-05-17
|
* basic: include only what we useThomas Hindoe Paaboel Andersen2017-05-17
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* Prep v228: Condense elogind source masks (1/5)Sven Eden2017-04-26
| | | | | | | | | | | | Although having a two line mask like /// UNNEEDED by elogind #if 0 it is much more easier to read (and patch!) if those two lines were condense into a one-line mask start like #if 0 /// UNNEEDED by elogind
* Prep v228: Clean up the new src/basic/*-util-[hc] files:Sven Eden2017-04-26
| | | | | | | | | | | | | - src/basic/capability-util.[hc] - src/basic/cgroup-util.[hc] - src/basic/fd-util.[hc] - src/basic/fs-util.[hc] - src/basic/memfd-util.[hc] - src/basic/path-util.[hc] - src/basic/socket-util.[hc] - src/basic/terminal-util.[hc] - src/basic/user-util.[hc] - src/basic/xattr-util.[hc]
* Prep v228: Add remaining updates from upstream (1/3)Sven Eden2017-04-26
The util.[hc] files have been stripped of a lot of functions, that got sorted into various new files representing the type of utility. This commit adds the missing files.