diff options
Diffstat (limited to 'src/compat/pam_misc_drop_env.c')
-rw-r--r-- | src/compat/pam_misc_drop_env.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/compat/pam_misc_drop_env.c b/src/compat/pam_misc_drop_env.c new file mode 100644 index 0000000..a8a7564 --- /dev/null +++ b/src/compat/pam_misc_drop_env.c @@ -0,0 +1,17 @@ +/* ISC license. */ + +#include <stdlib.h> +#include <pamela/compat.h> + +static inline void env_free (char **envp) +{ + char **p = envp ; + while (*p) free(*p++) ; + free(envp) ; +} + +char **pam_misc_drop_env (char **envp) +{ + env_free(envp) ; + return 0 ; +} |