Merge "Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)"
This commit is contained in:
commit
c840b382c5
1 changed files with 3 additions and 1 deletions
|
@ -50,6 +50,7 @@ NetlinkManager::~NetlinkManager() {
|
|||
int NetlinkManager::start() {
|
||||
struct sockaddr_nl nladdr;
|
||||
int sz = 64 * 1024;
|
||||
int on = 1;
|
||||
|
||||
memset(&nladdr, 0, sizeof(nladdr));
|
||||
nladdr.nl_family = AF_NETLINK;
|
||||
|
@ -62,7 +63,8 @@ int NetlinkManager::start() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0) {
|
||||
if (setsockopt(mSock, SOL_SOCKET, SO_RCVBUFFORCE, &sz, sizeof(sz)) < 0 ||
|
||||
setsockopt(mSock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)) < 0) {
|
||||
SLOGE("Unable to set uevent socket options: %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue