summaryrefslogtreecommitdiff
path: root/source4/lib/socket/socket_ip.c
AgeCommit message (Collapse)AuthorFilesLines
2020-08-28lib/util: remove extra safe_string.h fileMatthew DeVore1-0/+2
lib/util/safe_string.h is similar to source3/include/safe_string.h, but the former has fewer checks. It is missing bcopy, strcasecmp, and strncasecmp. Add the missing elements to lib/util/safe_string.h remove the other safe_string.h which is in the source3-specific path. To accomodate existing uses of str(n?)casecmp, add #undef lines to source files where they are used. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 28 02:18:40 UTC 2020 on sn-devel-184
2020-03-25lib: Remove unused SOCKET_FLAG_BLOCKVolker Lendecke1-29/+20
Nobody in the code set this flag, so remove it Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-05-08s4 lib socket: Ensure address string owned by parent structGary Lockyer1-1/+1
The local address string was not owned by it's parent structure, which caused a use after free error in continue_ip_open_socket source4/librpc/rpc/dcerpc_sock.c:267 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13929 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed May 8 20:03:42 UTC 2019 on sn-devel-184
2018-11-28s4:lib: Use #ifdef instead of #if for config.h definitionsAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-02-13libsocket: Avoid an unnecessary else branchVolker Lendecke1-1/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Tue Feb 13 21:07:17 CET 2018 on sn-devel-144
2017-12-18source4/lib/socket/socket_ip.c set socket close on execGary Lockyer1-0/+3
Set SOCKET_CLOEXEC on the sockets returned by accept. This ensures that the socket is unavailable to any child process created by system(). Making it harder for malicious code to set up a command channel, as seen in the exploit for CVE-2015-0240 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Dec 18 08:49:57 CET 2017 on sn-devel-144
2016-08-05lib: Fix a pointless error checkVolker Lendecke1-1/+2
According to susv4, addr.s6_addr is a uint8_t s6_addr[16] which is always != 0 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2011-12-17s3: Fix the clustering buildVolker Lendecke1-2/+2
ctdb_private.h already defines set_close_on_exec. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat Dec 17 18:41:39 CET 2011 on sn-devel-104
2011-12-15s4-socket: use set_close_on_exec()Andrew Tridgell1-0/+4
this prevents a fd leak to child processes
2011-10-31s4:lib/socket: don't pass -1 to close()Stefan Metzmacher1-1/+4
metze
2011-06-20libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbolAndrew Bartlett1-29/+29
The two error tables need to be combined, but for now seperate the names. (As the common parts of the tree now use the _common function, errmap_unix.c must be included in the s3 autoconf build). Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-06s4-ipv6: fixed ipv6_listen() to use IPV6_V6ONLYAndrew Tridgell1-4/+24
this changes ipv6_listen() to use IPV6_V6ONLY, and to setup the right scope id for link local IPv6 addresses
2011-03-19source4/lib: Fix prototypes for all functions.Jelmer Vernooij1-0/+3
2011-03-09s4:lib/socket: use sockaddr_in6 in ipv6_tcp_accept()Stefan Metzmacher1-1/+1
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Mar 9 14:36:42 CET 2011 on sn-devel-104
2010-03-26libutil: moved the networking defines to util_net.hAndrew Tridgell1-0/+1
These were causing thousands of warnings on solaris8
2009-02-12Fix Coverity ID 871 -- do not dereference "sp" before checking for NULLVolker Lendecke1-1/+3
2009-01-30s4:lib/socket: don't use gethostbyname2()Stefan Metzmacher1-8/+25
metze
2008-02-20Make more module init functions public, since they are compiled with ↵Jelmer Vernooij1-2/+2
-fvisibility=hidden. Not doing this causes failures on Mac OS X. (This used to be commit da1a9438bd89569077ef1eaa9dc977b5f9d62836)
2007-12-21r26409: Pass smb ports along.Jelmer Vernooij1-0/+4
(This used to be commit 2833f320de1f1fd39c710ad0a61c3fa1bb1df31f)
2007-12-21r25624: Remove ipv4_addr hack. Only causes 4 extra includes of ↵Jelmer Vernooij1-11/+11
system/network.h because we stripped down includes. (This used to be commit 262c1c23a61f1f4fae13e0a61179fe98b682cecf)
2007-10-10r25545: Use inet_ntop for ipv4 code as well - should make it easier to share ↵Jelmer Vernooij1-12/+14
code between IPv4 and IPv6 later on. (This used to be commit e3df90927b2878917f0f555772a875f05bf609e8)
2007-10-10r25522: Convert to standard bool types.Jelmer Vernooij1-5/+5
(This used to be commit 5e814287ba475e12f8cc934fdd09b199dcdfdb86)
2007-10-10r25411: Fix IPv6 socket backend.Jelmer Vernooij1-10/+12
(This used to be commit 02b4621181c35ebf3e7c2531302b44863b94f8bf)
2007-10-10r25384: Support DGRAM IPv6 sockets.Jelmer Vernooij1-10/+23
(This used to be commit e227c749711aef2f2ce2eb66f7f3485962f36399)
2007-10-10r24939: Integrate IPv4 and IPv6 modules (a lot of code can be shared).Jelmer Vernooij1-0/+964
(This used to be commit 15f47aaf533bec4d7d82d75d27c233b3b0b261cd)