qrtr: Fix NET_BIND_SERVICE logic

Fix the capability logic to allow node id configuration be done from
clients that have NET_ADMIN or NET_BIND_SERVICE

Change-Id: I795bfe2d4a969348b1ff3ef6000feecc27b5bc53
Signed-off-by: Chris Lew <clew@codeaurora.org>
This commit is contained in:
Chris Lew 2018-03-19 15:40:22 -07:00 committed by Gerrit - the friendly Code Review server
parent 75639baf85
commit 56faadfd27

View File

@ -1078,7 +1078,7 @@ static int qrtr_addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh,
struct ifaddrmsg *ifm;
int rc;
if (!netlink_capable(skb, CAP_NET_ADMIN) ||
if (!netlink_capable(skb, CAP_NET_ADMIN) &&
!netlink_capable(skb, CAP_NET_BIND_SERVICE))
return -EPERM;