Merge "servicemanager: enable bctest with debug logs" into linaro_android_4.3
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index c918633..3bd5e42 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -525,6 +525,7 @@
     struct sockaddr addr;
     socklen_t alen;
     int lsocket, s, count;
+    char nfs_hack_flag[PROPERTY_VALUE_MAX];
 
     ALOGI("installd firing up\n");
 
@@ -538,7 +539,12 @@
         exit(1);
     }
 
-    drop_privileges();
+    property_get("hack.installd.for.nfs", nfs_hack_flag, "0");
+    if(!strcmp(nfs_hack_flag, "1")) {
+        ALOGI("Will not drop the privileges of installd service since hack.installd.for.nfs=%s.\n", nfs_hack_flag);
+    }else{
+        drop_privileges();
+    }
 
     lsocket = android_get_control_socket(SOCKET_PATH);
     if (lsocket < 0) {