projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Freebsd creds: do not overwrite recv len
[lttng-tools.git]
/
src
/
common
/
sessiond-comm
/
sessiond-comm.c
diff --git
a/src/common/sessiond-comm/sessiond-comm.c
b/src/common/sessiond-comm/sessiond-comm.c
index 20baaaf7b0dfafa2cd660d492eb0162367625dbe..c2b76f37a0401886cc8b5b8fe8ffd3263b3f83e8 100644
(file)
--- a/
src/common/sessiond-comm/sessiond-comm.c
+++ b/
src/common/sessiond-comm/sessiond-comm.c
@@
-541,10
+541,13
@@
ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len,
memcpy(creds, CMSG_DATA(cmptr), sizeof_cred);
#elif defined(__FreeBSD__)
memcpy(creds, CMSG_DATA(cmptr), sizeof_cred);
#elif defined(__FreeBSD__)
- ret = getpeereid(sock, &creds->uid, &creds->gid);
- if (ret != 0) {
- return ret;
- }
+ {
+ int peer_ret;
+
+ peer_ret = getpeereid(sock, &creds->uid, &creds->gid);
+ if (peer_ret != 0) {
+ return peer_ret;
+ }
#else
#error "Please implement credential support for your OS."
#endif /* __linux__ */
#else
#error "Please implement credential support for your OS."
#endif /* __linux__ */
This page took
0.031572 seconds
and
5
git commands to generate.