summaryrefslogtreecommitdiffstats
path: root/source/a/etc/_etc/etc/profile.d/z-dot-in-non-root-path.csh.new
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/etc/_etc/etc/profile.d/z-dot-in-non-root-path.csh.new')
-rw-r--r--source/a/etc/_etc/etc/profile.d/z-dot-in-non-root-path.csh.new17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/a/etc/_etc/etc/profile.d/z-dot-in-non-root-path.csh.new b/source/a/etc/_etc/etc/profile.d/z-dot-in-non-root-path.csh.new
new file mode 100644
index 000000000..8ff364f1b
--- /dev/null
+++ b/source/a/etc/_etc/etc/profile.d/z-dot-in-non-root-path.csh.new
@@ -0,0 +1,17 @@
+#!/bin/csh
+# Traditionally Slackware has included '.' at the end of the non-root
+# $path, and kept this behavior long after it had been dropped elsewhere
+# due to the relatively low attack risk by having it at (or near) the
+# end of the $path. But times have changed, and having this as a default
+# violates POLA (principle of least astonishment) just like removing it
+# back in the early 90s would have. So, by default this script is not
+# enabled. If you'd like '.' back at the end of your $path for non-root
+# users systemwide, make this script executable. A better choice is
+# probably to leave it off and let individual users decide to add it
+# in their local profile scripts if they want it. Even better is just
+# to start programs in '.' with ./program, like most of us have been
+# doing for years.
+
+# For non-root users, add the current directory to the search path:
+if (! "$uid" == "0") set path = ( $path . )
+