set HOME env submit/tizen_2.2/20130624.134753
authoryoonki.park <yoonki.park@samsung.com>
Mon, 24 Jun 2013 13:47:01 +0000 (22:47 +0900)
committeryoonki.park <yoonki.park@samsung.com>
Mon, 24 Jun 2013 13:47:01 +0000 (22:47 +0900)
Change-Id: I061edb850c73cd69c4e0e2fadc4490a06fae3cd0
Signed-off-by: yoonki.park <yoonki.park@samsung.com>
packaging/sdbd.spec
src/sdb.c

index bf69914fce4b48d4dbccc931ad01693296094f26..438281b13b3b1aa59c5ca45d7f7e1b9f25c999b1 100644 (file)
@@ -1,7 +1,7 @@
 Name:       sdbd
 Summary:    SDB daemon
 Version:    2.2.4
-Release:    1
+Release:    2
 Group:      TO_BE/FILLED_IN
 License:    TO BE FILLED IN
 Source0:    %{name}-%{version}.tar.gz
index 01a89280064800347b5779a8bdc6dd99c8a35264..99d6671c6134119e3ccd193912f8c539b768e794 100644 (file)
--- a/src/sdb.c
+++ b/src/sdb.c
@@ -31,8 +31,6 @@
 #include "sdb.h"
 
 #if !SDB_HOST
-//#include <private/android_filesystem_config.h> eric
-#include <linux/capability.h>
 #include <linux/prctl.h>
 #define SDB_PIDPATH "/tmp/.sdbd.pid"
 #else
@@ -1016,6 +1014,9 @@ int set_developer_privileges() {
             D("sdbd: unable to change working directory to /\n");
         }
     }
+    // TODO: use pam later
+    putenv("HOME=/home/developer");
+
     return 1;
 }
 #define ONDEMAND_ROOT_PATH "/home/developer"
@@ -1042,10 +1043,16 @@ static void execute_required_process() {
 static void init_sdk_requirements() {
     struct stat st;
 
+    // set env variable for temporary
+    // TODO: should use pam instead later!!
     if (!getenv("TERM")) {
         putenv("TERM=linux");
     }
 
+    if (!getenv("HOME")) {
+        putenv("HOME=/root");
+    }
+
     if (stat(ONDEMAND_ROOT_PATH, &st) == -1) {
         return;
     }