diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-10 10:43:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 10:43:20 (GMT) |
commit | c07206f2ccc2356aa74bc6813a94c2190017d44e (patch) | |
tree | 1677e5fdca5c3ce544e92c5484e16a0b68df1cc9 /gl/idpriv-droptemp.c | |
parent | e92046f810658016b7c373677efefda3b21400e4 (diff) | |
parent | d2fcf49ad4afc15f37d082d7bc96a808369ec2d4 (diff) | |
download | monitoring-plugins-c07206f2ccc2356aa74bc6813a94c2190017d44e.tar.gz |
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
Diffstat (limited to 'gl/idpriv-droptemp.c')
-rw-r--r-- | gl/idpriv-droptemp.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gl/idpriv-droptemp.c b/gl/idpriv-droptemp.c index 13d1064..2a85431 100644 --- a/gl/idpriv-droptemp.c +++ b/gl/idpriv-droptemp.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* Dropping uid/gid privileges of the current process temporarily. | 1 | /* Dropping uid/gid privileges of the current process temporarily. |
2 | Copyright (C) 2009-2013 Free Software Foundation, Inc. | 2 | Copyright (C) 2009-2023 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This program is free software: you can redistribute it and/or modify | 4 | This program is free software: you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 3 of the License, or | 6 | the Free Software Foundation, either version 3 of the License, or |
7 | (at your option) any later version. | 7 | (at your option) any later version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, |
@@ -12,7 +12,7 @@ | |||
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License |
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 15 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
16 | 16 | ||
17 | #include <config.h> | 17 | #include <config.h> |
18 | 18 | ||
@@ -58,7 +58,9 @@ idpriv_temp_drop (void) | |||
58 | 58 | ||
59 | /* This is for executables that have the setuid bit set. */ | 59 | /* This is for executables that have the setuid bit set. */ |
60 | # if HAVE_SETRESUID /* glibc, FreeBSD, OpenBSD, HP-UX */ | 60 | # if HAVE_SETRESUID /* glibc, FreeBSD, OpenBSD, HP-UX */ |
61 | /* See <http://www.usenix.org/events/sec02/full_papers/chen/chen.pdf> | 61 | /* See |
62 | Hao Chen, David Wagner, Drew Dean: Setuid Demystified | ||
63 | <https://www.usenix.org/legacy/publications/library/proceedings/sec02/full_papers/chen/chen.pdf> | ||
62 | figure 14. */ | 64 | figure 14. */ |
63 | if (setresuid (-1, uid, saved_uid) < 0) | 65 | if (setresuid (-1, uid, saved_uid) < 0) |
64 | return -1; | 66 | return -1; |
@@ -134,7 +136,9 @@ idpriv_temp_restore (void) | |||
134 | 136 | ||
135 | /* This is for executables that have the setuid bit set. */ | 137 | /* This is for executables that have the setuid bit set. */ |
136 | # if HAVE_SETRESUID /* glibc, FreeBSD, OpenBSD, HP-UX */ | 138 | # if HAVE_SETRESUID /* glibc, FreeBSD, OpenBSD, HP-UX */ |
137 | /* See <http://www.usenix.org/events/sec02/full_papers/chen/chen.pdf> | 139 | /* See |
140 | Hao Chen, David Wagner, Drew Dean: Setuid Demystified | ||
141 | <https://www.usenix.org/legacy/publications/library/proceedings/sec02/full_papers/chen/chen.pdf> | ||
138 | figure 14. */ | 142 | figure 14. */ |
139 | if (setresuid (-1, saved_uid, -1) < 0) | 143 | if (setresuid (-1, saved_uid, -1) < 0) |
140 | return -1; | 144 | return -1; |