Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
system_netd
Commits
e6ab884a
Commit
e6ab884a
authored
14 years ago
by
Vernon Tang
Browse files
Options
Download
Email Patches
Plain Diff
Set SO_PASSCRED on the uevent socket. (needed for change I393c21da)
Change-Id: I11767da938f6e8fd9b3b604218c26c3c8b8da881
parent
54a9575b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
NetlinkManager.cpp
NetlinkManager.cpp
+3
-1
No files found.
NetlinkManager.cpp
View file @
e6ab884a
...
...
@@ -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
)
{
LOGE
(
"Unable to set uevent socket options: %s"
,
strerror
(
errno
));
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment