diff options
author | Omar Polo <op@omarpolo.com> | 2022-12-02 11:53:35 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2022-12-02 11:53:35 +0000 |
commit | bd8683d0fd36893c18e7271faaa3b9ea67df0695 (patch) | |
tree | 459f480e4db619bd0191c494015fa97e106304e0 /have | |
parent | 06035a023710962df95f48d8486739154a9d707a (diff) |
add tests and compat for setresuid and setresgid
Diffstat (limited to 'have')
-rw-r--r-- | have/Makefile | 2 | ||||
-rw-r--r-- | have/setresgid.c | 8 | ||||
-rw-r--r-- | have/setresuid.c | 8 |
3 files changed, 18 insertions, 0 deletions
diff --git a/have/Makefile b/have/Makefile index 4ac7158..3aa1b97 100644 --- a/have/Makefile +++ b/have/Makefile @@ -19,6 +19,8 @@ DISTFILES = Makefile \ reallocarray.c \ recallocarray.c \ setproctitle.c \ + setresgid.c \ + setresuid.c \ strlcat.c \ strlcpy.c \ strtonum.c \ diff --git a/have/setresgid.c b/have/setresgid.c new file mode 100644 index 0000000..616458f --- /dev/null +++ b/have/setresgid.c @@ -0,0 +1,8 @@ +#include <sys/types.h> +#include <unistd.h> + +int +main(void) +{ + return setresgid(-1, -1, -1) == -1; +} diff --git a/have/setresuid.c b/have/setresuid.c new file mode 100644 index 0000000..0f3f65c --- /dev/null +++ b/have/setresuid.c @@ -0,0 +1,8 @@ +#include <sys/types.h> +#include <unistd.h> + +int +main(void) +{ + return setresuid(-1, -1, -1) == -1; +} |