Andrew Bartlett
2bad085305
build: Build *_wrapper without -DNDEBUG for in-tree use
...
These binaires are not installed, so are only used in make test,
and there we need debug output.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Oct 16 16:36:22 CEST 2015 on sn-devel-104
2015-10-16 16:36:22 +02:00
Andreas Schneider
e7b6990284
swrap: Bump version to 1.1.4
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Sep 8 16:49:23 CEST 2015 on sn-devel-104
2015-09-08 16:49:23 +02:00
Andreas Schneider
9fe5eac9e9
swrap: Call dlclose() in the destructor
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2015-09-08 13:47:20 +02:00
Andreas Schneider
5bd1ec1037
swrap: Fix signed comparsion warnings
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2015-09-08 13:47:20 +02:00
Andreas Schneider
830e3dd14f
swrap: Add environment variable to specify mtu size
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-09-08 13:47:20 +02:00
Andreas Schneider
55432439e2
swrap: Fix TCP support with sendmsg/recvmsg
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-09-08 13:47:20 +02:00
Andreas Schneider
049b7c8022
swrap: Correctly update the msg_name in recvmsg()
...
This has been found while debugging nsupdate.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-09-08 13:47:20 +02:00
Andreas Schneider
8e76e267fe
swrap: Bump version to 1.1.3
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-23 20:02:51 +01:00
Andreas Schneider
6ba81a483c
swrap: If we remove the socket_info also unlink the unix socket
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-02-23 20:02:51 +01:00
Andreas Schneider
ca9c6c8a32
swrap: Do not leak the socket_info we just removed.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-23 20:02:51 +01:00
Andreas Schneider
e8f56be3da
src: Add support for running with address sanitizer.
...
If address sanitzer will complain about our hack with variable function
attributes. This disables the checking of it.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-02-23 20:02:51 +01:00
Andreas Schneider
8dcc02f89b
swrap: Fix the loop for older gcc versions.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-23 20:02:51 +01:00
Andreas Schneider
78e8bafb32
socket_wrapper: Add missing prototype check for eventfd.
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10965
Newer glibc versions use and unsinged integer for the count instead of
an integer.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-12-08 14:32:10 +01:00
Andreas Schneider
47f307d112
swrap: Bump version to 1.1.2.
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Oct 2 12:00:14 CEST 2014 on sn-devel-104
2014-10-02 12:00:13 +02:00
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