Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 265f525e authored by Tom Cherry's avatar Tom Cherry
Browse files

Remove ANDROID_PROPERTY_WORKSPACE

Bug 23290008

Change-Id: I95babe735444ada10c67594ace700cae5d1ec0b3
parent 65fc4855
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -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 *);

/*
+0 −1
Original line number Diff line number Diff line
@@ -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();
+0 −7
Original line number Diff line number Diff line
@@ -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());