summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2021-02-16 19:34:42 +0100
committerBenny Baumann <BenBE@geshi.org>2021-02-17 15:59:50 +0100
commita73064dda97d751047748c4539a969495bdadf73 (patch)
tree0069e0d6e56f639484d62906f55b2ddf098fd50b /CRT.c
parentb1befa328786c1c2a2b0507786c9cc50cf7576e1 (diff)
Remove setuid support
This support was rarely ever used and has been disabled by default for some time. As far as the developer team is aware there's no distribution that activated this feature in their packages by default.
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/CRT.c b/CRT.c
index 7e651c3b..aa115abe 100644
--- a/CRT.c
+++ b/CRT.c
@@ -658,37 +658,6 @@ static void CRT_handleSIGTERM(int sgn) {
_exit(0);
}
-#ifdef HAVE_SETUID_ENABLED
-
-static int CRT_euid = -1;
-
-static int CRT_egid = -1;
-
-void CRT_dropPrivileges() {
- CRT_egid = getegid();
- CRT_euid = geteuid();
- if (setegid(getgid()) == -1) {
- CRT_fatalError("Fatal error: failed dropping group privileges");
- }
- if (seteuid(getuid()) == -1) {
- CRT_fatalError("Fatal error: failed dropping user privileges");
- }
-}
-
-void CRT_restorePrivileges() {
- if (CRT_egid == -1 || CRT_euid == -1) {
- CRT_fatalError("Fatal error: internal inconsistency");
- }
- if (setegid(CRT_egid) == -1) {
- CRT_fatalError("Fatal error: failed restoring group privileges");
- }
- if (seteuid(CRT_euid) == -1) {
- CRT_fatalError("Fatal error: failed restoring user privileges");
- }
-}
-
-#endif /* HAVE_SETUID_ENABLED */
-
#ifndef NDEBUG
static int stderrRedirectNewFd = -1;

© 2014-2024 Faster IT GmbH | imprint | privacy policy