Author: guillem
Date: 2006-02-06 02:16:15 +0000 (Mon, 06 Feb 2006)
New Revision: 78

Modified:
   trunk/ChangeLog
   trunk/debian/changelog
   trunk/utils/start-stop-daemon.c
Log:
Set the HOME environment variable when using the --chuid switch in
start-stop-daemon. Closes: #295169, #267784


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2006-02-06 00:01:49 UTC (rev 77)
+++ trunk/ChangeLog     2006-02-06 02:16:15 UTC (rev 78)
@@ -1,3 +1,8 @@
+2006-02-06  Guillem Jover  <[EMAIL PROTECTED]>
+
+       * utils/start-stop-daemon.c (main): When using --chuid set the HOME
+       environment variable.
+
 2006-02-05  Christian Perrier  <[EMAIL PROTECTED]>
 
        * man/*. Switch all translations to po4a. Work contributed

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2006-02-06 00:01:49 UTC (rev 77)
+++ trunk/debian/changelog      2006-02-06 02:16:15 UTC (rev 78)
@@ -2,7 +2,9 @@
 
   [ 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

Modified: trunk/utils/start-stop-daemon.c
===================================================================
--- trunk/utils/start-stop-daemon.c     2006-02-06 00:01:49 UTC (rev 77)
+++ trunk/utils/start-stop-daemon.c     2006-02-06 02:16:15 UTC (rev 78)
@@ -1227,6 +1227,8 @@
                        changegroup = ""; /* just empty */
                        runas_gid = pw->pw_gid;
                }
+               if (access(pw->pw_dir, F_OK) == 0)
+                       setenv("HOME", pw->pw_dir, 1);
        }
 
        if (stop) {


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to