]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/capability-util.c
user-util: rework maybe_setgroups() a bit 4299/head
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Oct 2016 15:54:12 +0000 (17:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 6 Oct 2016 17:04:10 +0000 (19:04 +0200)
commit97f0e76f18d322d29bcfbc4ab6bb9cd67a1cdd54
tree658b2caae552a9a7be6810dab6b44e653a89fef9
parent7429b2eb8308f3a2bf8c28d555fcdf5e961e65f0
user-util: rework maybe_setgroups() a bit

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.
src/basic/capability-util.c
src/basic/user-util.c
src/core/execute.c