bigbiff bigbiff | e60683a | 2013-02-22 20:55:50 -0500 | [diff] [blame] | 1 | #ifndef UTIL_LINUX_ENV_H |
2 | #define UTIL_LINUX_ENV_H | ||||
3 | |||||
4 | #include "c.h" | ||||
5 | |||||
6 | extern void sanitize_env(void); | ||||
7 | extern char *safe_getenv(const char *arg); | ||||
8 | |||||
9 | static inline void xsetenv(char const *name, char const *val, int overwrite) | ||||
10 | { | ||||
11 | if (setenv(name, val, overwrite) != 0) | ||||
12 | err(EXIT_FAILURE, "failed to set the %s environment variable", name); | ||||
13 | } | ||||
14 | |||||
15 | #endif /* UTIL_LINUX_ENV_H */ | ||||
16 |