summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2006-02-06 02:16:15 +0000
committerGuillem Jover <guillem@debian.org>2006-02-06 02:16:15 +0000
commite54c24f03a018f387b9490dabe62a304c4da89a2 (patch)
tree2e53618e6961fe59b8648111631ffa5327ffa031 /utils
parent04bc1a0c6df0780a78c0324f0a6fd2a9213b7289 (diff)
downloaddpkg-e54c24f03a018f387b9490dabe62a304c4da89a2.tar.gz
Set the HOME environment variable when using the --chuid switch in
start-stop-daemon. Closes: #295169, #267784
Diffstat (limited to 'utils')
-rw-r--r--utils/start-stop-daemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 824b3333f..658b8778c 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -1227,6 +1227,8 @@ main(int argc, char **argv)
changegroup = ""; /* just empty */
runas_gid = pw->pw_gid;
}
+ if (access(pw->pw_dir, F_OK) == 0)
+ setenv("HOME", pw->pw_dir, 1);
}
if (stop) {