Home | History | Annotate | Download | only in installd

Lines Matching refs:idmap_fd

2082 static void run_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd)
2085 StringPrintf("%d", idmap_fd).c_str(), (char*)NULL);
2089 static void run_verify_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd)
2092 StringPrintf("%d", idmap_fd).c_str(), (char*)NULL);
2098 int idmap_fd = open(idmap_path, O_RDWR);
2099 if (idmap_fd < 0) {
2117 if (flock(idmap_fd, LOCK_EX | LOCK_NB) != 0) {
2122 run_verify_idmap(target_apk, overlay_apk, idmap_fd);
2126 close(idmap_fd);
2184 int idmap_fd = -1;
2202 idmap_fd = open(idmap_path, O_RDWR | O_CREAT | O_EXCL, 0644);
2204 idmap_fd = open(idmap_path, O_RDWR);
2207 if (idmap_fd < 0) {
2211 if (fchown(idmap_fd, AID_SYSTEM, uid) < 0) {
2215 if (fchmod(idmap_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) {
2221 close(idmap_fd);
2237 if (flock(idmap_fd, LOCK_EX | LOCK_NB) != 0) {
2242 run_idmap(target_apk, overlay_apk, idmap_fd);
2252 close(idmap_fd);
2255 if (idmap_fd >= 0) {
2256 close(idmap_fd);