summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2015-09-22 13:51:52 -0700
committerTom Cherry <tomcherry@google.com>2015-12-04 14:11:02 -0800
commit265f525e21d1dea3c09678a545c2df324736a490 (patch)
tree42e0b0df5d5487157eb7e88e32b5ffa3ea319fce
parent65fc48557485e0d8afafb5c8c5644d93b53c3214 (diff)
downloadcore-265f525e21d1dea3c09678a545c2df324736a490.tar.gz
core-265f525e21d1dea3c09678a545c2df324736a490.tar.bz2
core-265f525e21d1dea3c09678a545c2df324736a490.zip
Remove ANDROID_PROPERTY_WORKSPACE
Bug 23290008 Change-Id: I95babe735444ada10c67594ace700cae5d1ec0b3
-rw-r--r--init/property_service.cpp20
-rw-r--r--init/property_service.h1
-rw-r--r--init/service.cpp7
3 files changed, 0 insertions, 28 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 66e46f8eb..fdfaa586a 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -64,13 +64,6 @@ static bool property_area_initialized = false;
static int property_set_fd = -1;
-struct workspace {
- size_t size;
- int fd;
-};
-
-static workspace pa_workspace;
-
void property_init() {
if (property_area_initialized) {
return;
@@ -82,13 +75,6 @@ void property_init() {
ERROR("Failed to initialize property area\n");
exit(1);
}
-
- pa_workspace.size = 0;
- pa_workspace.fd = open(PROP_FILENAME, O_RDONLY | O_NOFOLLOW | O_CLOEXEC);
- if (pa_workspace.fd == -1) {
- ERROR("Failed to open %s: %s\n", PROP_FILENAME, strerror(errno));
- return;
- }
}
static int check_mac_perms(const char *name, char *sctx, struct ucred *cr)
@@ -354,12 +340,6 @@ static void handle_property_set_fd()
}
}
-void get_property_workspace(int *fd, int *sz)
-{
- *fd = pa_workspace.fd;
- *sz = pa_workspace.size;
-}
-
static void load_properties_from_file(const char *, const char *);
/*
diff --git a/init/property_service.h b/init/property_service.h
index 8b76d2b3f..b662978e1 100644
--- a/init/property_service.h
+++ b/init/property_service.h
@@ -32,7 +32,6 @@ extern void property_load_boot_defaults(void);
extern void load_persist_props(void);
extern void load_system_props(void);
extern void start_property_service(void);
-void get_property_workspace(int *fd, int *sz);
std::string property_get(const char* name);
extern int property_set(const char *name, const char *value);
extern bool properties_initialized();
diff --git a/init/service.cpp b/init/service.cpp
index a3c5ca41c..4e5f46461 100644
--- a/init/service.cpp
+++ b/init/service.cpp
@@ -400,14 +400,7 @@ bool Service::Start(const std::vector<std::string>& dynamic_args) {
pid_t pid = fork();
if (pid == 0) {
- int fd, sz;
-
umask(077);
- if (properties_initialized()) {
- get_property_workspace(&fd, &sz);
- std::string tmp = StringPrintf("%d,%d", dup(fd), sz);
- add_environment("ANDROID_PROPERTY_WORKSPACE", tmp.c_str());
- }
for (const auto& ei : envvars_) {
add_environment(ei.name.c_str(), ei.value.c_str());