From 75efef98d4ca2281bd4f8d1a1ddf8805bb024984 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 10 Aug 2018 10:49:15 +0200 Subject: su: add --whitelist-environment * usable with --login to whitelist specified environment variables * the list is ignored for the core variables like HOME, SHELL, USER, LOGNAME and PATH (su --login always resets these variables) Note that su(1) requires password and after successful authentication user has full control over the session, so he can set arbitrary environment variables. The whitelist makes things more user friendly only. The patch removes unnecessary optimization when allocate environ[]. It seems better to keep all in glibc hands and just reset the environment array only. Addresses: https://github.com/karelzak/util-linux/issues/221 Signed-off-by: Karel Zak --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a41ca7689..995d1d70e 100644 --- a/configure.ac +++ b/configure.ac @@ -454,6 +454,7 @@ AC_CHECK_DECL([SO_PASSCRED], #include ]) AC_CHECK_FUNCS([ \ + clearenv \ __fpurge \ fpurge \ __fpending \ -- cgit v1.2.3-55-g7522