diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-09-11 16:22:20 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-09-11 16:22:20 -0400 |
commit | 1d177035b2bffdac46e12f8a873e15f8cff17e53 (patch) | |
tree | 3c582a4ca5e369d4a38d114a85192220acf68086 /.local/bin | |
parent | b579bbdac0413a94b64d500c7b919d2a47173f00 (diff) |
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
Diffstat (limited to '.local/bin')
-rw-r--r-- | .local/bin/autobuild.c | 12 |
1 files 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 <http://www.gnu.org/licenses/>. */ -#define _GNU_SOURCE /* for environment functions */ +#define _GNU_SOURCE /* for clearenv(3) */ #include <alloca.h> /* for alloca(3) */ -#include <errno.h> /* for errno */ -#include <error.h> /* for error(3) */ -#include <pwd.h> /* for getpwuid(3) */ -#include <stdlib.h> /* for environment functions */ +#include <errno.h> /* for errno */ +#include <error.h> /* for error(3) (GNU extension) */ +#include <pwd.h> /* for getpwuid(3) */ +#include <stdlib.h> /* for getenv(3), setenv(3), clearenv(3) */ #include <string.h> /* for strlen(3), strcpy(3) */ -#include <unistd.h> /* for geteuid(3), execv(3) */ +#include <unistd.h> /* for geteuid(3), setreuid(3), execv(3) */ void mysetenv(const char *name, const char *value) |