Lines Matching refs:idmap_fd
1442 static void run_idmap(const char *target_apk, const char *overlay_apk, int idmap_fd)
1448 snprintf(idmap_str, sizeof(idmap_str), "%d", idmap_fd);
1493 int idmap_fd = -1;
1503 idmap_fd = open(idmap_path, O_RDWR | O_CREAT | O_EXCL, 0644);
1504 if (idmap_fd < 0) {
1508 if (fchown(idmap_fd, AID_SYSTEM, uid) < 0) {
1512 if (fchmod(idmap_fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) < 0) {
1529 if (flock(idmap_fd, LOCK_EX | LOCK_NB) != 0) {
1534 run_idmap(target_apk, overlay_apk, idmap_fd);
1544 close(idmap_fd);
1547 if (idmap_fd >= 0) {
1548 close(idmap_fd);