Andreas Schneider
afe2f47c0f
swrap: Add support for eventfd with unsigned count variable.
...
The prototype in glibc 2.20.90 changed.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:11 +02:00
Andreas Schneider
539fa2c04f
swrap: Add a trace message for swrap_socket().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:11 +02:00
Andreas Schneider
8efc0952ad
swrap: Implement fcntl() to catch F_DUPFD.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:11 +02:00
Andreas Schneider
2efd5b2429
swrap: Include the function name in the debug output.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:11 +02:00
Andreas Schneider
872e1ae0ef
swrap: Silence alignment warnings.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:11 +02:00
Andreas Schneider
088db7f7b5
swrap: Fix type punning warnings when loading functions.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
b3c72e151f
swrap: Fix access to struct members in log messages.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
9ba259e68a
swrap: Fix whitespace errors.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
a504686566
swrap: Update copyright notice.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
9731516e7f
swrap: Wrap fopen to detect stale file descriptors.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
f8584abfef
swrap: Use swrap_address in swrap_accept().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
891e837c3c
swrap: Remove unused sockaddr_dup() function.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
8897474865
swrap: Use swrap_address in the socket_info struct.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
4402ba10b5
swrap: Use a sockaddr_un for the unix path in socket_info.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
9da1ff9ad1
swrap: Rename swrap_pcap_dump_packet().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
79e545b304
swrap: Rename swrap_pcap_get_fd().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
7d4c6cf25d
swrap: Rename swrap_marshall_packet().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
e64ea9cb79
swrap: Rename swrap_packet_init().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
c626aad36a
swrap: Rename socket_wrapper_pcap_file().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
2be25abcb1
swrap: Fix type punning warnings.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 09:35:10 +02:00
Jakub Hrozek
95c9917c86
Provide a compatible declaration of CMSG_ALIGN
...
Some platforms (like OSX) do support some of the CMGS macros, but don't
have a CMSG_ALIGN macro of their own.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-10-02 09:35:10 +02:00
Jakub Hrozek
5e70d80e7d
SO_PROTOCOL is platform-dependent
...
SO_PROTOCOL is not defined on all platforms. In particular, OSX doesn't
include it and so far I haven't found any compatible declaration.
Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-10-02 09:35:10 +02:00
Michael Adam
616364378d
swrap: fix another discard const warning in swrap_bind()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-10-02 09:35:10 +02:00
Michael Adam
f6fe9a997d
swrap: fix discard const warning in swrap_bind()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-10-02 09:35:10 +02:00
Michael Adam
bebbd28985
swrap: fix discard const warning in swrap_remove_stale()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-10-02 09:35:10 +02:00
Michael Adam
a7a47796fd
swrap: fix build when neither HAVE_STRUCT_IN_PKTINFO nor IP_RECVDSTADDR is defined
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-10-02 09:35:10 +02:00
Andreas Schneider
95d1828a24
waf: socket_wrapper should check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jul 31 21:12:07 CEST 2014 on sn-devel-104
2014-07-31 21:12:07 +02:00
Michael Adam
fae59b494b
lib: Bump socket_wrapper version to 1.1.1.
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
064592d9cb
swrap: Disable incomplete bind checks (and tests) for EADDRINUSE.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
f6023bbd67
lib: Bump socket_wrapper version to 1.1.0.
2014-06-05 23:57:10 +02:00
Michael Adam
b9d6ad85a8
swrap: check whether an address:port is already in use in swrap_bind()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
05c1e2db22
swrap: implement check_addr_port_in_use()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
f9ddd20c2d
swrap: fix AF_UNSPEC special case in swrap_bind()
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
8f28674b50
swrap: extend input checks in swrap_bind()
...
Not only check family, but depending on family, also check the length.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Michael Adam
3700a4625c
swrap: add check for rpc/rpc.h - needed on freebsd for bindresvport
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
6e6c817fd0
swrap: Add support for bindresvport().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
1b949b5d6c
swrap: Add missing family check in bind().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
5ee936d7e2
swrap: Setup myname in swrap_socket() for getsockname().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
1f03de017b
swrap: Make sure cmbuf is not NULL.
...
CID 63532
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
74ade40e3e
swrap: We need to pass a pointer-pointer to not leak memory.
...
CID 63533
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
353709b3f3
swrap: Support more socket options in getsockopt().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
3689addffb
swrap: Call swrap_msghdr_filter_cmsghdr in swrap_sendmsg_before().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
efe4eb2385
swrap: Add swrap_msghdr_filter_cmsg_pktinfo().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
6a35c6777d
swrap: Add swrap_sendmsg_filter_cmsg_socket().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
2fe9612436
swrap: Add swrap_sendmsg_copy_cmsg().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
c704966f79
swrap: Add swrap_sendmsg_filter_cmsghdr().
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
0247bdbbc8
swrap: Implement support for IP_RECVDSTADDR on BSD.
...
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
aa1e24ead4
swrap: Check if the in_pktinfo structure is available.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Andreas Schneider
7556e1388f
swrap: Silence a warning on OpenIndiana.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00
Pino Toscano
7a386b3308
swrap: Properly cache the handle also in LIBC_SO case.
...
Small regression introduced by me in commit
0fa56909442c3cfea6a697681ea0e89ba5a0aa0f.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10572
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-06-05 23:57:10 +02:00