o Fix bogus getsockopt(2) call: swap SOCK_STREAM and LOCAL_PEERCRED.
The bug does not affect anything because SOCK_STREAM == LOCAL_PEERCRED == 0x1. PR: bin/46165 Submitted by: Alain Thivillon <at@rominet.net> Reviewed by: dd MFC after: 1 week
This commit is contained in:
parent
2840cabe6a
commit
04e30a1ce6
@ -43,7 +43,7 @@ getpeereid(int s, uid_t *euid, gid_t *egid)
|
||||
int error;
|
||||
|
||||
xuclen = sizeof(xuc);
|
||||
error = getsockopt(s, LOCAL_PEERCRED, 1, &xuc, &xuclen);
|
||||
error = getsockopt(s, SOCK_STREAM, LOCAL_PEERCRED, &xuc, &xuclen);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
if (xuc.cr_version != XUCRED_VERSION)
|
||||
|
Loading…
x
Reference in New Issue
Block a user