opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit 17629b9ce63dba6aa4146d483cd61448cddb1fa5
parent 46d2543203501994e10bfdac24392653f2325657
Author: Duncan Overbruck <mail@duncano.de>
Date:   Thu, 12 Nov 2020 21:26:04 +0100

configure: add setresgid, setreuid and setregid checks

Diffstat:
Mconfigure | 42++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/configure b/configure @@ -384,9 +384,47 @@ int main(void) { setresuid(0, 0, 0); return 0; }' -check_func "setresuid" "$src" || { +check_func "setresuid" "$src" +have_setresuid=$? + +# +# Check for setresgid(). +# +src=' +#include <unistd.h> +int main(void) { + setresgid(0, 0, 0); + return 0; +}' +check_func "setresgid" "$src" +have_setresgid=$? + +if [ $have_setresuid -eq 1 -o $have_setresgid -eq 1 ]; then printf 'SRCS += libopenbsd/bsd-setres_id.c\n' >>$CONFIG_MK -} +fi + +# +# Check for setreuid(). +# +src=' +#include <unistd.h> +int main(void) { + setreuid(0, 0); + return 0; +}' +check_func "setreuid" "$src" + + +# +# Check for setregid(). +# +src=' +#include <unistd.h> +int main(void) { + setregid(0, 0); + return 0; +}' +check_func "setregid" "$src" # # Check for closefrom().