diff options
author | jilles <jilles@FreeBSD.org> | 2011-06-12 10:13:48 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-06-12 10:13:48 +0000 |
commit | 01ffb61bd7784f5de579d8f3a1f42dc5b08bb31e (patch) | |
tree | d740958d3d89dbf275ce30dc4bd761b499643266 /bin/sh/main.c | |
parent | 51a4a71669d8b3e0e255622f96fdd72cf3d7fbc6 (diff) | |
download | FreeBSD-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/sh/main.c')
-rw-r--r-- | bin/sh/main.c | 2 |
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"); } |