From 1d177035b2bffdac46e12f8a873e15f8cff17e53 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 11 Sep 2017 16:22:20 -0400 Subject: suid wrapper: tidy #include comments - note that _GNU_SOURCE is for clearenv(3) specifically, since it is non-POSIX. - note that error(3) is a GNU extension - note which env functions we get from stdlib.h - don't forget to mention setreuid(3) for unistd.h --- .local/bin/autobuild.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.local/bin/autobuild.c b/.local/bin/autobuild.c index c8a319d..96faa31 100644 --- a/.local/bin/autobuild.c +++ b/.local/bin/autobuild.c @@ -15,14 +15,14 @@ * along with this program. If not, see . */ -#define _GNU_SOURCE /* for environment functions */ +#define _GNU_SOURCE /* for clearenv(3) */ #include /* for alloca(3) */ -#include /* for errno */ -#include /* for error(3) */ -#include /* for getpwuid(3) */ -#include /* for environment functions */ +#include /* for errno */ +#include /* for error(3) (GNU extension) */ +#include /* for getpwuid(3) */ +#include /* for getenv(3), setenv(3), clearenv(3) */ #include /* for strlen(3), strcpy(3) */ -#include /* for geteuid(3), execv(3) */ +#include /* for geteuid(3), setreuid(3), execv(3) */ void mysetenv(const char *name, const char *value) -- cgit v1.2.2