aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/unpcb.h
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2018-08-03 01:37:00 +0000
committerAlan Somers <asomers@FreeBSD.org>2018-08-03 01:37:00 +0000
commitda4465506dbcfd5162b628be28365b1e3a3d3126 (patch)
treed7b711e7888b14493c33c8816d17b6b975cb0859 /sys/sys/unpcb.h
parent420a1ab3492ca3f026ba664e4ca880d54c8b386b (diff)
downloadsrc-da4465506dbcfd5162b628be28365b1e3a3d3126.tar.gz
src-da4465506dbcfd5162b628be28365b1e3a3d3126.zip
Fix LOCAL_PEERCRED with socketpair(2)
Enable the LOCAL_PEERCRED socket option for unix domain stream sockets created with socketpair(2). Previously, it only worked with unix domain stream sockets created with socket(2)/listen(2)/connect(2)/accept(2). PR: 176419 Reported by: Nicholas Wilson <nicholas@nicholaswilson.me.uk> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16350
Notes
Notes: svn path=/head/; revision=337222
Diffstat (limited to 'sys/sys/unpcb.h')
-rw-r--r--sys/sys/unpcb.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/sys/unpcb.h b/sys/sys/unpcb.h
index 7363e5e47d03..9583da646d81 100644
--- a/sys/sys/unpcb.h
+++ b/sys/sys/unpcb.h
@@ -166,4 +166,13 @@ struct xunpgen {
} __aligned(8);;
#endif /* _SYS_SOCKETVAR_H_ */
+#if defined(_KERNEL)
+struct thread;
+
+/* In uipc_userreq.c */
+void
+unp_copy_peercred(struct thread *td, struct unpcb *client_unp,
+ struct unpcb *server_unp, struct unpcb *listen_unp);
+#endif
+
#endif /* _SYS_UNPCB_H_ */