diff options
Diffstat (limited to 'src/compat/pam_misc_paste_env.c')
-rw-r--r-- | src/compat/pam_misc_paste_env.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compat/pam_misc_paste_env.c b/src/compat/pam_misc_paste_env.c new file mode 100644 index 0000000..b70fd58 --- /dev/null +++ b/src/compat/pam_misc_paste_env.c @@ -0,0 +1,14 @@ +/* ISC license. */ + +#include <pamela/pam.h> +#include <pamela/compat.h> + +int pam_misc_paste_env (pam_handle_t *pamh, char const *const *envp) +{ + for (; *envp ; envp++) + { + int e = pam_putenv(pamh, *envp) ; + if (e != PAM_SUCCESS) return e ; + } + return PAM_SUCCESS ; +} |