From c5f4fe06fe30ef3900d54a28fa7eae54e4c688e9 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 12 Jun 2011 10:13:48 +0000 Subject: [PATCH] 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 --- bin/sh/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/main.c b/bin/sh/main.c index 2135d30af77c..2da5a15a9276 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"); }