summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2018-04-08 14:30:05 -0400
committerLeo Famulari <leo@famulari.name>2018-04-11 18:45:06 -0400
commite453da132a3482540d2166b23554ef693b2c0c0d (patch)
treea643a75134c00761bcdf5da96759f65b31bbc11d /gnu
parent87a841b2d4b7f8bfd661ba2d2cd2bbce7f490fbd (diff)
system: Provide a fall-back PATH for non-login shells started with su(1).
* gnu/system.scm (operating-system-etc-service): Provide values for ENV_PATH and ENV_SUPATH in '/etc/login.defs'.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 592a0ea58a..1cf00aafcd 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -571,7 +571,16 @@ This is the GNU system. Welcome.\n")
(define* (operating-system-etc-service os)
"Return a <service> that builds containing the static part of the /etc
directory."
- (let ((login.defs (plain-file "login.defs" "# Empty for now.\n"))
+ (let ((login.defs
+ (plain-file "login.defs"
+ (string-append
+ "# Default paths for non-login shells started by su(1).\n"
+ "ENV_PATH /run/setuid-programs:"
+ "/run/current-system/profile/bin:"
+ "/run/current-system/profile/sbin\n"
+ "ENV_SUPATH /run/setuid-programs:"
+ "/run/current-system/profile/bin:"
+ "/run/current-system/profile/sbin\n")))
(issue (plain-file "issue" (operating-system-issue os)))
(nsswitch (plain-file "nsswitch.conf"