summaryrefslogtreecommitdiff
path: root/share/profile
diff options
context:
space:
mode:
authorLibravatar Santiago Vila <[email protected]>2024-05-03 18:02:00 +0200
committerLibravatar Santiago Vila <[email protected]>2024-05-03 18:48:28 +0200
commit68ad3d291533713213e71788f9f0304c5a5c6715 (patch)
tree96805da3ad81162c98fe1ebb88ea0dd2a11b0248 /share/profile
parent067f4126b633201d43bb3947054332da1753be15 (diff)
downloadbase-files-68ad3d291533713213e71788f9f0304c5a5c6715.tar.gz
base-files-68ad3d291533713213e71788f9f0304c5a5c6715.zip
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.
Diffstat (limited to '')
-rw-r--r--share/profile2
1 files changed, 1 insertions, 1 deletions
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