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

Commit 60838494 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Android: binder: check set_context_mgr permission on time."

parents 311e48be 256cb47c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2714,6 +2714,9 @@ static int binder_ioctl_set_ctx_mgr(struct file *filp)
		ret = -EBUSY;
		goto out;
	}
	ret = security_binder_set_context_mgr(proc->tsk);
	if (ret < 0)
		goto out;
	if (uid_valid(binder_context_mgr_uid)) {
		if (!uid_eq(binder_context_mgr_uid, curr_euid)) {
			pr_err("BINDER_SET_CONTEXT_MGR bad uid %d != %d\n",
@@ -2779,9 +2782,6 @@ static long binder_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
		ret = binder_ioctl_set_ctx_mgr(filp);
		if (ret)
			goto err;
		ret = security_binder_set_context_mgr(proc->tsk);
		if (ret < 0)
			goto err;
		break;
	case BINDER_THREAD_EXIT:
		binder_debug(BINDER_DEBUG_THREADS, "%d:%d exit\n",