From dd733a5214fc3ef391a74e94f2c62ffa3000722b Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Mon, 30 Jan 2023 17:55:27 +0100 Subject: libpam_misc: make use of secure memory erasure --- libpam_misc/help_env.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libpam_misc/help_env.c') diff --git a/libpam_misc/help_env.c b/libpam_misc/help_env.c index 601c5f41..b01c9f71 100644 --- a/libpam_misc/help_env.c +++ b/libpam_misc/help_env.c @@ -11,6 +11,7 @@ #include #include #include +#include "pam_inline.h" /* * This function should be used to carefully dispose of the copied @@ -25,7 +26,7 @@ char **pam_misc_drop_env(char **dump) for (i=0; dump[i] != NULL; ++i) { D(("dump[%d]=`%s'", i, dump[i])); - _pam_overwrite(dump[i]); + pam_overwrite_string(dump[i]); _pam_drop(dump[i]); } _pam_drop(dump); @@ -77,7 +78,7 @@ int pam_misc_setenv(pam_handle_t *pamh, const char *name if (asprintf(&tmp, "%s=%s", name, value) >= 0) { D(("pam_putt()ing: %s", tmp)); retval = pam_putenv(pamh, tmp); - _pam_overwrite(tmp); /* purge */ + pam_overwrite_string(tmp); /* purge */ _pam_drop(tmp); /* forget */ } else { D(("malloc failure")); -- cgit v1.2.3