aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-10-31 04:34:54 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-10-31 04:34:54 +0000
commitaba67249cb595187667c3207ee42daa260c53791 (patch)
tree65528b5af6c6d537a31b59b273a2e2d0304a7cee /src/main.c
parent38ade145bc5205d45e5677f16d823a102a0b90d8 (diff)
downloadmpd-aba67249cb595187667c3207ee42daa260c53791.tar.gz
mpd-aba67249cb595187667c3207ee42daa260c53791.tar.xz
mpd-aba67249cb595187667c3207ee42daa260c53791.zip
if a home directory is available for 'user', set env variable $HOME
git-svn-id: https://svn.musicpd.org/mpd/trunk@2426 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index d4732f046..15cc27e01 100644
--- a/src/main.c
+++ b/src/main.c
@@ -268,6 +268,9 @@ void changeToUser(Options * options) {
exit(EXIT_FAILURE);
}
+ if(userpwd->pw_dir) {
+ setenv("HOME", userpwd->pw_dir, 1);
+ }
}
}