summaryrefslogtreecommitdiff
path: root/frameworks/native/native.git-3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'frameworks/native/native.git-3.patch')
-rw-r--r--frameworks/native/native.git-3.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/frameworks/native/native.git-3.patch b/frameworks/native/native.git-3.patch
new file mode 100644
index 0000000..936e34a
--- /dev/null
+++ b/frameworks/native/native.git-3.patch
@@ -0,0 +1,45 @@
+From 5f4d94214fc46fd41be434ecd0fc613bd2e88e5e Mon Sep 17 00:00:00 2001
+From: Yongqin Liu <yongqin.liu@linaro.org>
+Date: Fri, 20 Dec 2013 06:09:30 -0500
+Subject: [PATCH] installd: insert one backdoor to support boot via nfs
+
+when boot via nfs, we need the install usr on nfs server to have the
+chown permission as it does on android. but that's no easy to do with
+setting of nfs. so we will make the install to run as root via the
+property hack.installd.for.nfs set to 1 when want to boot via nfs
+
+Change-Id: I101849f9b7f55b9e8dd657ae321cf9341ddc7d02
+Signed-off-by: Vishal <vishal.bhoj@linaro.org>
+---
+ cmds/installd/installd.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
+index 0c80dac..e9eb61a 100644
+--- a/cmds/installd/installd.c
++++ b/cmds/installd/installd.c
+@@ -533,6 +533,7 @@ int main(const int argc, const char *argv[]) {
+ socklen_t alen;
+ int lsocket, s, count;
+ int selinux_enabled = (is_selinux_enabled() > 0);
++ char nfs_hack_flag[PROPERTY_VALUE_MAX];
+
+ ALOGI("installd firing up\n");
+
+@@ -551,7 +552,12 @@ int main(const int argc, const char *argv[]) {
+ 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) {
+--
+1.8.5
+