From e54c24f03a018f387b9490dabe62a304c4da89a2 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 6 Feb 2006 02:16:15 +0000 Subject: [PATCH] Set the HOME environment variable when using the --chuid switch in start-stop-daemon. Closes: #295169, #267784 --- ChangeLog | 5 +++++ debian/changelog | 4 +++- utils/start-stop-daemon.c | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a8250f98..59a801e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-06 Guillem Jover + + * utils/start-stop-daemon.c (main): When using --chuid set the HOME + environment variable. + 2006-02-05 Christian Perrier * man/*. Switch all translations to po4a. Work contributed diff --git a/debian/changelog b/debian/changelog index eaf6991c..0be78d04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,9 @@ dpkg (1.13.14~) UNRELEASED; urgency=low [ Guillem Jover ] * Make start-stop-daemon print the proper version instead of 'VERSION'. - + * Set the HOME environment variable when using the --chuid switch in + start-stop-daemon. Closes: #295169, #267784 + [ Frank Lichtenheld ] * Let dpkg-source ignore comments in the hunk header as used by diff -p (Anand Kumria). Closes: #344880 diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index 824b3333..658b8778 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) { -- 2.39.5