diff options
author | maxim <maxim@FreeBSD.org> | 2002-12-15 09:37:54 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2002-12-15 09:37:54 +0000 |
commit | c2efb986aa7a9448a5b0efbbf48d022f86f9c3ba (patch) | |
tree | 776989afbda3b5cf02b01d28679ed7155cb299b6 /lib/libc/gen/getpeereid.c | |
parent | 7c1f8a0482277ec58ffe23375ce71c08006c77f6 (diff) | |
download | FreeBSD-src-c2efb986aa7a9448a5b0efbbf48d022f86f9c3ba.zip FreeBSD-src-c2efb986aa7a9448a5b0efbbf48d022f86f9c3ba.tar.gz |
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
Diffstat (limited to 'lib/libc/gen/getpeereid.c')
-rw-r--r-- | lib/libc/gen/getpeereid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/getpeereid.c b/lib/libc/gen/getpeereid.c index b64ff54..cf7f84c 100644 --- a/lib/libc/gen/getpeereid.c +++ b/lib/libc/gen/getpeereid.c @@ -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) |