From 68ad3d291533713213e71788f9f0304c5a5c6715 Mon Sep 17 00:00:00 2001 From: Santiago Vila Date: Fri, 3 May 2024 18:02:00 +0200 Subject: Use a regexp to source files in /etc/profile.d. Closes: #885414, #1069279. Restrict the files to be processed from /etc/profile.d to those following a sensible regular expression. --- share/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/profile b/share/profile index de64c87..a897491 100644 --- a/share/profile +++ b/share/profile @@ -25,7 +25,7 @@ if [ "${PS1-}" ]; then fi if [ -d /etc/profile.d ]; then - for i in /etc/profile.d/*.sh; do + for i in $(run-parts --list --regex '^[a-zA-Z0-9_][a-zA-Z0-9._-]*\.sh$' /etc/profile.d); do if [ -r $i ]; then . $i fi -- cgit v1.2.3