summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-29s3-lib: If we create a pipe socket, don't start to listen.Andreas Schneider1-6/+0
The create_pipe_sock() function should only create the socket as the name states and not start to listen on it too. We should start to listen on in the individual places as we need different backlog values. Autobuild-User: Andreas Schneider <asn@cryptomilk.org> Autobuild-Date: Mon Aug 29 13:21:43 CEST 2011 on sn-devel-104
2011-07-12s3:lib: s/SMBkeepalive/NBSSkeepaliveStefan Metzmacher1-2/+2
metze
2011-07-08s3:libsmb: remove unused enum smb_read_errors infrastructureStefan Metzmacher1-20/+0
metze
2011-07-06s3: Follow the TALLOC_FREE convention in source3Volker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Jul 6 11:01:05 CEST 2011 on sn-devel-104
2011-07-06s3: Fix Coverity ID 2586 -- NO_EFFECTVolker Lendecke1-1/+1
tsocket_address_bsd_sockaddr returns ssize_t, and on some systems socklen_t is unsigned. So (len < 0) could never have turned true. Volker
2011-07-04s3-util: Add a get_remote_hostname() function.Andreas Schneider1-0/+108
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-06-09s3-param Remove special case for global_myname(), rename to lp_netbios_name()Andrew Bartlett1-1/+1
There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_MEMDUP() to talloc_memdup()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_MEMDUP isn't standard talloc.
2011-06-09s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
2011-06-01lib/util/time.c: timeval_current_ofs_usecRusty Russell1-7/+7
Several places want "microseconds from current time", and several were simply handing "usecs" values which could be over a million. Using a helper to do this is safer and more readable. I didn't replace any obviously correct callers (ie. constants). I also renamed wait_nsec in source3/lib/util_sock.c; it's actually microseconds not nanoseconds (introduced with this code in Volker's 19b783cc Async wrapper for open_socket_out_send/recv). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-05-17is_my_ipaddr() should recognise loopback addresses as ours.Jeremy Allison1-5/+5
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue May 17 20:05:42 CEST 2011 on sn-devel-104
2011-05-08s3-lib Use common lib/socket code for get_interfaces() et alAndrew Bartlett1-1/+1
2011-05-08Improve debug messages when creating socket directoriesAndrew Bartlett1-5/+12
This makes clear what the permissions error and directory name actually is Andrew Bartlett
2011-05-05More const fixes for compiler warnings from the waf build.Jeremy Allison1-2/+2
2011-05-03lib/util Move set_socket_options() into common code.Andrew Bartlett1-160/+0
2011-05-03lib/util Move more network utility functions from source3 into lib/utilAndrew Bartlett1-156/+0
This will help with the merge of the interfaces layer. Andrew Bartlett
2011-04-29s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner1-0/+2
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-25s3:lib/util_sock: listen on IPv6 addresses with IPV6_ONLY (bug #7383)Stefan Metzmacher1-0/+26
This avoids getting IPv4 addresses as mapped IPv6 addresses (e.g. ::ffff:192.168.0.1). Before the bahavior was inconsistent between operating system and distributions. Some system have IPV6_ONLY as default. Now we consistently get AF_INET for IPv4 addresses and AF_INET6 for IPv6 addresses. It also makes it possible to listen only on IPv6 now as "::" doesn't imply "0.0.0.0" anymore. Which also avoids confusing log messages that we were not able to bind to "0.0.0.0". metze
2011-04-13s3-util_sock: very brief documentation for open_socket_out().Günther Deschner1-0/+10
The most important bit is to document that timeout is in MILLIseconds, not seconds. Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2011-03-24Fix is_myname_or_ipaddr() to be robust against strange DNS setups.Jeremy Allison1-30/+56
If IPv6 DNS names are turned on, but Samba isn't configured to listen on an IPv6 interface, then is_myname_or_ipaddr() can return false on a valid DNS name that it should detect is our own. If the IPv6 addr is returned by preference, then looking at the first addr only causes is_myname_or_ipaddr() to fail. We need to look at all the addresses returned by the DNS lookup and check all of them against our interface list. This is an order N^2 lookup, but there shouldn't be enough addresses to make this a practical problem. Jeremy.
2011-03-23s3-lib Remove the clobber_region() code.Andrew Bartlett1-4/+0
This code wrote to the full buffer in fstrcpy(), pstrcpy() and other fixed-length string manipulation functions. The hope of this code was to find out at run time if we were mixing up pstring and fstring etc, and to record where this came from. It has a runtime performance impact (particularly if compiled with --enable-developer). It is being removed because of the complexity it adds, and the distinct lack of bugs that this complexity has been credited in finding. The macro-based compile-time checking of string sizes remains. Andrew Bartlett
2011-03-16s3-interfaces: only include interfaces.h where needed.Günther Deschner1-0/+1
Guenther
2011-02-28s3: Eliminate sys_select_intr from read_fd_with_timeoutVolker Lendecke1-12/+7
2011-02-28s3: Add poll_intr_one_fdVolker Lendecke1-0/+17
2011-02-28s3: Add poll_one_fd()Volker Lendecke1-0/+27
2011-02-27s3: Make is_zero_addr take a sockaddr_storageVolker Lendecke1-1/+1
All callers had to cast this anyway Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sun Feb 27 11:02:53 CET 2011 on sn-devel-104
2011-02-09s3: Fix some nonempty blank lines and some typosVolker Lendecke1-1/+1
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Feb 9 00:01:45 CET 2011 on sn-devel-104
2010-12-22s3: Remove unused open_any_socket_outVolker Lendecke1-165/+0
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Dec 22 17:27:29 CET 2010 on sn-devel-104
2010-12-19s3: Fix some typosVolker Lendecke1-1/+1
2010-10-07 s3: Adding TCP_KEEPALIVE_THRESHOLD and TCP_KEEPALIVE_ABORT_THRESHOLD to ↵Ira Cooper1-0/+6
the list of accepted socket settings. These are both exclusive to Solaris/OpenSolaris. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Oct 7 00:26:39 UTC 2010 on sn-devel-104
2010-10-01samba: share select wrappers.Günther Deschner1-0/+1
Guenther
2010-09-20s3-build: only include async headers where needed.Günther Deschner1-0/+1
Guenther
2010-08-26s3-build: only include memcache.h where needed.Günther Deschner1-0/+1
Guenther
2010-08-18s3: Fix an uninitialized variableVolker Lendecke1-3/+2
2010-08-17s3: Move read_smb_length() to smbd/reply.cVolker Lendecke1-42/+0
2010-08-17s3: Remove smbd_server_fd from receive_smb_rawVolker Lendecke1-25/+4
This is only called from client code
2010-08-17s3: Lift smbd_server_fd() from read_smb_length_return_keepaliveVolker Lendecke1-13/+24
2010-08-17s3: Lift smbd_server_fd() from read_data()Volker Lendecke1-19/+1
All callers have appropriate debug messages themselves
2010-08-17s3: Lift smbd_server_fd() from read_fd_with_timeout()Volker Lendecke1-43/+44
2010-08-17s3-util: remove unused variable.Günther Deschner1-1/+0
Guenther
2010-08-17s3: Remove smbd_server_fd() from write_data()Volker Lendecke1-20/+1
This completely removes the DEBUG(0, ..) error message from write_data(). I've gone through all callers of write_data() and made sure that they have their own equivalent error message printing.
2010-08-16s3: Remove get_client_fd()Volker Lendecke1-4/+4
2010-03-26s3-util_sock: Rise debug level for getpeername failed messages.Karolin Seeger1-4/+6
Don't show all getpeername failed messages in debug level 0 and 1. Karolin Signed-off-by: Volker Lendecke <vl@samba.org>
2009-09-15libcli:nbt make the lmhosts parsing code and dependicies commonAndrew Bartlett1-115/+0
This starts the process to have Samba4 use lmhosts. Andrew Bartlett
2009-09-06Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".Jeremy Allison1-17/+25
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed from sys_read() to sys_recv(). read_socket_with_timeout() is called with non-fd's (with a pty in chgpasswd.c and with a disk file in lib/dbwrap_file.c via read_data()). recv works for the disk file, but not the pty. Change the name of read_socket_with_timeout() to read_fd_with_timeout() to make this clear (and add comments). Jeremy.
2009-09-05Save and report the correct errno value.Simo Sorce1-8/+12
2009-07-28(Hopefully) fix the problem Kai reported withJeremy Allison1-5/+53
net ads leave and IPv6. Ensure all DC lookups prefer IPv4. Jeremy.
2009-07-14s3: allow setting the TCP_QUICKACK socket optionBjörn Jacke1-0/+3
2009-06-08Make open_udp_socket() IPv6 clean. Trying to fix bug #6437 - Unable to join ↵Jeremy Allison1-10/+25
IPv6-only ads domain. Avaiting feedback from submitter before backport to 3.4 and earlier. Jeremy.