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

Commit 7da513b7 authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by Chris Lew
Browse files

net: qrtr: Allow Root guid process to bind



In recovery mode qrtr-ns is running with root guid only. allow
qrtr-ns to bind the control port to support QRTR communication
in recovery mode.

CRs-Fixed: 2350005
Change-Id: I946ddef70373afca75af31ec56968185eb93733f
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent f8bde24e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -959,7 +959,9 @@ static int qrtr_port_assign(struct qrtr_sock *ipc, int *port)
		if (rc >= 0)
			*port = rc;
	} else if (*port < QRTR_MIN_EPH_SOCKET &&
		   !(capable(CAP_NET_ADMIN) || in_egroup_p(AID_VENDOR_QRTR))) {
		   !(capable(CAP_NET_ADMIN) ||
		   in_egroup_p(AID_VENDOR_QRTR) ||
		   in_egroup_p(GLOBAL_ROOT_GID))) {
		rc = -EACCES;
	} else if (*port == QRTR_PORT_CTRL) {
		rc = idr_alloc(&qrtr_ports, ipc, 0, 1, GFP_ATOMIC);