summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2011-06-12 10:13:48 +0000
committerjilles <jilles@FreeBSD.org>2011-06-12 10:13:48 +0000
commit01ffb61bd7784f5de579d8f3a1f42dc5b08bb31e (patch)
treed740958d3d89dbf275ce30dc4bd761b499643266 /bin
parent51a4a71669d8b3e0e255622f96fdd72cf3d7fbc6 (diff)
downloadFreeBSD-src-01ffb61bd7784f5de579d8f3a1f42dc5b08bb31e.zip
FreeBSD-src-01ffb61bd7784f5de579d8f3a1f42dc5b08bb31e.tar.gz
sh: Read .profile from the home directory (or / if HOME is not set).
In most cases, login shells are started from the home directory, but not in all, such as xterm -ls. This commit depends on r222957 for read_profile() performing parameter expansion. PR: bin/50569
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index 2135d30..2da5a15 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
state1:
state = 2;
if (privileged == 0)
- read_profile(".profile");
+ read_profile("${HOME-}/.profile");
else
read_profile("/etc/suid_profile");
}
OpenPOWER on IntegriCloud