summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-27Change all occurrences of zero_addr(&ss,AF_INET) toJeremy Allison1-4/+4
zero_addr(&ss). All current uses were always of the AF_INET form, so simplify the call. If in the future we need to zero an addr to AF_INET6 this can be done separately. Jeremy. (This used to be commit 2e92418a138bf2738b77b7e0fcb2fa37ad84fc0c)
2007-10-26Move the horrible hack for link local addresses out of namequery.cJeremy Allison1-4/+51
and into util_sock.c. is_ipaddress() now copes with link:local:v6%ifname addresses, as does interpret_string_addr(). Jeremy (This used to be commit a3f7db3d30ced566c8340696914f1be3293a9c5b)
2007-10-25Fix bug in writing names into gencacheJeremy Allison1-2/+2
as well as 2 typos where AF_INET6 was mistypes as AF_INET. JERRY YOU NEED THESE FIXES. Fixes smbclient -L localhost -U% Bugs reported by Kukks (thanks kukks). Jeremy. (This used to be commit f109f82622ca30ae2360e8300152e90b9587ffd8)
2007-10-25Fix resolve name to resolve IPv6 addresses of link-local%ifaddrJeremy Allison1-1/+5
Jeremy. (This used to be commit e6609cab732d5cd5cc9a5ae50aee15147f2ec6ec)
2007-10-25When doing reverse lookups actually look up the name, notJeremy Allison1-1/+1
just the numeric address (doh!) :-). Jeremy. (This used to be commit 9aa9ecd8cc29d055d78f16b8fb2156ec04063c42)
2007-10-24This is a large patch (sorry). Migrate from struct in_addrJeremy Allison1-44/+162
to struct sockaddr_storage in most places that matter (ie. not the nmbd and NetBIOS lookups). This passes make test on an IPv4 box, but I'll have to do more work/testing on IPv6 enabled boxes. This should now give us a framework for testing and finishing the IPv6 migration. It's at the state where someone with a working IPv6 setup should (theorecically) be able to type : smbclient //ipv6-address/share and have it work. Jeremy. (This used to be commit 98e154c3125d5732c37a72d74b0eb5cd7b6155fd)
2007-10-19Add test for "struct in6_addr" to the HAVE_IPV6 configure test.Gerald (Jerry) Carter1-8/+8
Also make use of "if defined(HAVE_IPV6)" rather than testing for AF_INET6 since this is not sufficient on HP-UX 11.11 to ensure a working IPv6 implementation. (This used to be commit 620785df4e57b72471ff0315e22e0d2f28a2b1a5)
2007-10-15Move to protocol independent code in most of lib/util_sock.cJeremy Allison1-114/+223
We don't use gethostbyname any more except in one case where we're looking for host aliases (I don't know how to do that with getaddrinfo yet). New function should be getaddrinfo(). Next step will be fixing lib/access.c, and then changing libsmb/namequery.c to cope with IPv6 address returns. Jeremy. (This used to be commit 4a56b697b6adcf095e25895c4a9ba3192ed34124)
2007-10-12Dummy formatting commit to check I've set up my home gitJeremy Allison1-1/+2
correctly. (This used to be commit a1166e9e651f4acdcf7926c5d8e9cf0c9108fe71)
2007-10-12Convert get_peer_addr() to IPv6. Only is_myname_or_ipaddr()Jeremy Allison1-55/+112
lefto to do then I can fix the lib/access.c functions. Jeremy. (This used to be commit 3403c6c330b886c86d6d856c3ffc13b043fd6fc1)
2007-10-11Add const to the get_peer_addr() and get_socket_addr()Jeremy Allison1-15/+16
calls. Use the IPv6 varient for get_peer_addr(). Jeremy. (This used to be commit baf1f52e34ae2465a7a34be1065da29ed97e7bea)
2007-10-10Add start of IPv6 implementation. Currently most of this is avoidingJeremy Allison1-49/+466
IPv6 in winbindd, but moves most of the socket functions that were wrongly in lib/util.c into lib/util_sock.c and provides generic IPv4/6 independent versions of most things. Still lots of work to do, but now I can see how I'll fix the access check code. Nasty part that remains is the name resolution code which is used to returning arrays of in_addr structs. Jeremy. (This used to be commit 3f6bd0e1ec5cc6670f3d08f76fc2cd94c9cd1a08)
2007-10-10[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.Gerald (Jerry) Carter1-42/+3
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
2007-10-10r25565: Fix unintended consequence change for IPv6 noticedJeremy Allison1-1/+6
by Volker. We used to return 0.0.0.0 for the text address of an uninitialized socket - ensure we still do so. Once uninitialized address is as good as any other. Jeremy. (This used to be commit 2827bbe0f853d413b6fcb0eb676048c041cea713)
2007-10-10r25510: Now we're returning the port instead of using a global,Jeremy Allison1-2/+2
remember to use ntohs. Hopefully will fix the build farm. Jeremy. (This used to be commit 5174acccb589edbfbe4ba633f4178f7200d7d6c4)
2007-10-10r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal withJeremy Allison1-54/+73
the ripple effects this causes. utmp has to change etc. Remove some global varables and store address/port in the unexpected db. Jeremy. (This used to be commit 18c6a2211d9e25233d01715b3f78977edcd6d869)
2007-10-10r25473: Reformatting only. Prepare for new ip functions.Jeremy Allison1-254/+240
Jeremy. (This used to be commit 2a8f3dd55074eeb3d96a1b478981780651bbe88b)
2007-10-10r23997: Check in the infrastructure for getting rid of the global ↵Volker Lendecke1-0/+116
InBuffer/OutBuffer The complete history of this patch can be found under http://www.samba.org/~vlendec/inbuf-checkin/. Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only checking into 3_2 at the moment, as it currently will slow down operations for all non-converted (i.e. all at this moment) operations, as it will copy the talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort to convert everything necessary for the normal operations an XP box does. I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More to come, but I would appreciate some help here. Volker (This used to be commit 5594af2b208c860d3f4b453af6a649d9e4295d1c)
2007-10-10r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell1-2/+1
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
2007-10-10r23779: Change from v2 or later to v3 or later.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10r22926: Don't use <=0, use < 0 to allow keepalives to propagate up.Jeremy Allison1-1/+1
Jeremy. (This used to be commit bf0313629e16c27461b028d3ea49185e99fc4d9c)
2007-10-10r22923: Fix runaway smbd now receive_smb_raw() returns a ssize_t not a BOOL.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 9204f1741bbdd693351b61ac1810dd722cfbf233)
2007-10-10r22920: Add in the UNIX capability for 24-bit readX, as discussedJeremy Allison1-6/+12
with the Apple guys and Linux kernel guys. Still looking at how to do writeX as there's no recvfile(). Jeremy. (This used to be commit a53268fb2082de586e2df250d8ddfcff53379102)
2007-10-10r22181: Fix for EISCON in open_any_socket_out from William JojoJeremy Allison1-0/+3
for bug #3632. Jeremy. (This used to be commit 7979a5a350739150a9c7077f2c35d9512d8596e4)
2007-10-10r21990: Stop messing with the signing engine just becauseJeremy Allison1-11/+11
we're encrypted. This will make further changes and spec much more clear. Jeremy. (This used to be commit ffa3a5c508a494d22e8ee3ada424a6517ddf8923)
2007-10-10r21922: Fixed the build by rather horrid means. I really needJeremy Allison1-28/+29
to restructure libsmb/smb_signing.c so it isn't in the base libs path but lives in libsmb instead (like smb_seal.c does). Jeremy. (This used to be commit 1b828f051d0782201f697de15ff973bd6b097d5b)
2007-10-10r21880: Make client and server calls into encryption code symetrical,Jeremy Allison1-2/+2
depending on encryption context pointer. Jeremy. (This used to be commit d3f3ced6c8a03d971143baf878158d671dfcbc3b)
2007-10-10r21876: Start adding in the seal implementation - prototype codeJeremy Allison1-3/+6
for the server side enc. (doesn't break anything). I'll keep updating this until I've got NTLM seal working on both client and server, then add in the gss level seal. Jeremy. (This used to be commit 530ac29abf23e920baa549e7cec55199edd8bd74)
2007-10-10r21865: Add in the stubs for SMB transport encryption. Will fleshJeremy Allison1-1/+22
these out as I implement. Don't add to SAMBA_3_0_25, this is experimental code. NFSv4 you're now officially on notice... :-). Jeremy. (This used to be commit 5bfe638f2172e272741997100ee5ae8ff280494d)
2007-10-10r20148: Forgot to merge. Ensure open_any_socket_out()Jeremy Allison1-1/+1
is safe from signals. Jeremy. (This used to be commit c264a0aa4a83a3d47db33446b16a8766bc14824f)
2007-10-10r15700: Make nmbd udp sockets non-blocking to prevent problemJeremy Allison1-1/+6
with select returning true but no data being available. Fix for bug #3779. Jeremy. (This used to be commit e5787cf75b2e7d50f551f34f28d280c27b0aa134)
2007-10-10r15672: Fix for bug #3783. winbindd_cm.c calls open_any_socket_out()Jeremy Allison1-1/+1
to make connections to ports 445 or 139 on the DC it's trying to contact. It calls sys_select() on the non-blocking sockets, not sys_select_intr(). This is a mistake (I believe) as it allows a signal to early terminate the connection attempts - whereas sys_select_intr() will ignore signals until we get back to the main processing loop where they'll be handled correctly. This change means winbindd_cm will not early terminate if it gets a message whilst trying to connect to DC's. Gunther, Volker and Jerry please review (but I think this is correct). Jeremy. (This used to be commit 24aaa486771f797d35ea6b0711c12cd3e663dd8c)
2007-10-10r15030: On a performace hunt... Remove as many extraneousJeremy Allison1-3/+2
memset's as possible. Jeremy. (This used to be commit 1217ed392b75aa8bfefa9c3f1ec5fa3bba841ee0)
2007-10-10r12953: Support the TCP_FASTACK socket option if it is available. Note that ↵James Peach1-0/+3
this will not acutally help, but it is good to be complete. (This used to be commit 2163e4b6b453ebf1fefc64e74890300108bbf8f6)
2007-10-10r7591: Don't call getpeeraddr on a disconnected socket.Jeremy Allison1-5/+8
Jeremy. (This used to be commit a9cd218eb607066a65818b534ec5e3ecb55da4cf)
2007-10-10r7554: Refactor very messy code in util_sock.c Remove ↵Jeremy Allison1-133/+95
write_socket_data/read_socket_data as they do nothing that write_socket/read_socket don't do. Add a more useful error message when read_socket/write_socket error out on the main client fd for a process (ie. try and list the IP of the client that errored). Jeremy. (This used to be commit cbd7578e7c226e6a8002542141b914ed4c7a8269)
2007-10-10r7318: Unify HEAD and 3.0 socket functions. Add HEAD functions here ↵Jeremy Allison1-0/+93
#ifdef'ed out. Correct branch this time ! Jeremy. (This used to be commit 052b4f8e2849b4897176e64cc29b6a5f686d946e)
2007-10-10r7039: Ensure we always call read_socket_with_timeout() whenJeremy Allison1-1/+6
timeout > 0. Better solution after much helpful input from derrell@samba.org. We may eventually change the read_socket_with_timeout() interface to count down the timeout value. Jeremy. (This used to be commit 09c9a62aa53ed26e59ed57e577614d02a796c492)
2007-10-10r7034: Revert change in util_sock.c from derrell until this isJeremy Allison1-58/+13
discussed more on samba-technical. Jeremy. (This used to be commit 7ad6fdc1ef4754fc25d81ab27fd5ebb40e04a6cf)
2007-10-10r7025: 1 if not all data is available at the time we go to read a packet, retryDerrell Lipman1-13/+58
the read using a timeout to ensure that all data for the packet is received. 2 some minor changes to meet coding standards 3 eliminate some compiler warnings (This used to be commit 7b4d4f6109d815ec70c65564435d7d9bd22f66d9)
2007-10-10r6890: Refactor printing interface to take offset into job. Fixes bugJeremy Allison1-8/+8
where large print jobs can have out-of-order offsets. Bug found by Arcady Chernyak <Arcady.Chernyak@efi.com> Jeremy. (This used to be commit 482f7e0e3706098b71aa0b31a134994acb1e9fcf)
2007-10-10r6553: Added Linux per-socket TCP settings patch from "Ed Boraas" ↵Jeremy Allison1-0/+9
<ed.boraas@concordia.ab.ca>. Jeremy. (This used to be commit 96f0e2d3fc68010f9e956802710ce0bdb8d7c664)
2007-10-10r4217: Fix open_any_socket_out.Volker Lendecke1-13/+27
This was a missing merge from HEAD or rather a commit to 3_0 from the wrong source. Fixed slightly over HEAD, HEAD merge will follow. Deal with connection refused according to the specs. Volker (This used to be commit 7230cb87eba2c296217bb0255893c55ae5d695d3)
2007-10-10r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison1-1/+1
allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy. (This used to be commit 620f2e608f70ba92f032720c031283d295c5c06a)
2007-10-10r3843: If a connection to a DC is requested, open connections ↵Volker Lendecke1-0/+136
simultaeneously to all DCs found. The first one to reply wins. Volker (This used to be commit 84ac54aef2bd56b5c889d3b05b8828aceb8ae00e)
2007-10-10r2978: Fix #1926 typo in debug. Found by Bill McGonigle ↵Jeremy Allison1-1/+1
<bill+samba@bfccomputing.com>. Jeremy. (This used to be commit 4fd314243e82d9c55bc9849a722424d45553013e)
2007-10-10r1104: get_called_name is used in the printing subsystem. In case of multi-homedVolker Lendecke1-0/+22
servers we need to make sure that the clients are given back the IP address they connected to. Volker (This used to be commit 5f482df169eebae87ec769a05e3c3fc6e32af1e3)
2007-10-10r487: fixing some compile issues with the IBM AIX compiler reoported on the ↵Gerald Carter1-5/+7
ml -- now to watch the build farm some more (This used to be commit 79fed5f5a73cfe4811f626acbcf85860e23e7826)
2007-10-10r426: fixed bug noticed by wim.delvaux@adaptiveplanet.com in handling of ↵Andrew Tridgell1-0/+1
timeout in socket connections (This used to be commit 88278b24de4e3e408ac8a6139bd375a72bc664ce)
2004-03-27Merge from HEAD the SMB signing patch that I developed a couple of weeksAndrew Bartlett1-1/+1
ago. This patch re-adds support for 'optional' SMB signing. It also ensures that we are much more careful about when we enable signing, particularly with on-the-fly smb.conf reloads. The client code will now attempt to use smb signing by default, and disable it if the server doesn't correctly support it. Andrew Bartlett (This used to be commit e27b5cbe75d89ec839dafd52dd33101885a4c263)