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

Commit 719e4048 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick Committed by Android Git Automerger
Browse files

am 9cbac1fc: am 9f1e0e3a: Close the property socket *after* updating properties.

* commit '9cbac1fc':
  Close the property socket *after* updating properties.
parents 99f28ca6 9cbac1fc
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -189,15 +189,6 @@ static void update_prop_info(prop_info *pi, const char *value, unsigned len)
    __futex_wake(&pi->serial, INT32_MAX);
}

static int property_write(prop_info *pi, const char *value)
{
    int valuelen = strlen(value);
    if(valuelen >= PROP_VALUE_MAX) return -1;
    update_prop_info(pi, value, valuelen);
    return 0;
}


/*
 * Checks permissions for starting/stoping system services.
 * AID_SYSTEM and AID_ROOT are always allowed.
@@ -384,8 +375,8 @@ void handle_property_set_fd()
    }

    r = recv(s, &msg, sizeof(msg), 0);
    close(s);
    if(r != sizeof(prop_msg)) {
        close(s);
        ERROR("sys_prop: mis-match msg size recieved: %d expected: %d\n",
              r, sizeof(prop_msg));
        return;
@@ -416,6 +407,11 @@ void handle_property_set_fd()
    default:
        break;
    }

    // Note: bionic's property client code assumes that the property
    // server will not close the socket until *AFTER* the property is
    // written to memory.
    close(s);
}

void get_property_workspace(int *fd, int *sz)