diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/env.c | 6 | ||||
-rw-r--r-- | lib/lib.h | 1 |
2 files changed, 7 insertions, 0 deletions
@@ -80,6 +80,12 @@ void xsetenv(char *name, char *val) environ[i] = new; } +void xunsetenv(char *name) +{ + if (strchr(name, '=')) error_exit("xunsetenv %s name has =", name); + xsetenv(name, 0); +} + // reset environment for a user, optionally clearing most of it void reset_env(struct passwd *p, int clear) { @@ -275,6 +275,7 @@ int human_readable(char *buf, unsigned long long num, int style); long environ_bytes(); void xsetenv(char *name, char *val); +void xunsetenv(char *name); void xclearenv(void); // linestack.c |