summaryrefslogtreecommitdiff
path: root/source3/lib/util_sock.c
AgeCommit message (Collapse)AuthorFilesLines
2008-05-28Security fix for CVE-2008-1105: Boundary failure when parsing SMB responsesJeremy Allison1-13/+5
can result in a buffer overrun. Jeremy. (This used to be commit 23b825e9d2c74c5b940cf4d3aa56c18692259972)
2008-04-07increase log level for this failed setsockopt call. EINVAL is a normal error ↵Björn Jacke1-1/+4
on Solaris when we do this on an already resetted connection. (This used to be commit 42bc4ff7fd6bfc92bde015ae8f3a9fb62d443cd5)
2008-03-26Fix a bug in the output from print_canonical_sockaddr() fix from ↵Gerald W. Carter1-2/+8
36f8bafbd3dee66a8.... Make sure that IPv4 addresses are not enclised in []'s. (This used to be commit 4ddf58dbdc3d74cb72788ef4a2ec7587d4948c40)
2008-03-24Ignore port when pulling IP addr from struct sockaddr_storage.Gerald (Jerry) Carter1-34/+10
Linux man page states that getaddinfo() will leave the port uninitialized when passing in NULL for the service name. So we can't really trust that anymore. I doubt non-default KDC ports are an issues so just drop the port from the generated krb5.conf. AIX exhibits this bug the most. (This used to be commit 36f8bafbd3dee66a869aa26cfc2eb4aa62019325)
2008-03-16Fix Coverity ID 567Volker Lendecke1-1/+1
Jeremy, please push it if you like it and mark the bug as fixed on the Coverity site. Thanks, Volker (This used to be commit 2fd25423700cb60f20a8b8d6613279cb06fb518d)
2008-02-29Eliminate tons of build warnings on non-IPV6 system.Michael Adam1-1/+1
Michael (This used to be commit ee4810099c2d26a0ebab3c41a95bc6b57921683d)
2008-02-25Fix some warningsVolker Lendecke1-2/+1
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result (This used to be commit ad37b7b0aee265a3e4d8b7552610f4b9a105434d)
2008-02-20Fix possible close of invalid fd if call to socket() returns -1.Tim Potter1-1/+2
(This used to be commit f7d2f692994918037e603ef95dd097b03d2c5456)
2008-02-05Fix a debug messageVolker Lendecke1-1/+1
(This used to be commit 24aa3518aef7e36fde03d58f36487cbf29c027c9)
2008-02-02Convert read_data() to NTSTATUSVolker Lendecke1-23/+2
(This used to be commit af40b71023f8c4a2133d996ea698c72b97624043)
2008-02-02Convert receive_smb_raw to NTSTATUSVolker Lendecke1-44/+7
(This used to be commit ba771bd858602452a9e58c3aab1336f2ac8a25ef)
2008-02-02read_socket_with_timeout_ntstatus->read_socket_with_timeoutVolker Lendecke1-8/+7
(This used to be commit 90554799afa42855c3e7b87dc632e67f0952f988)
2008-02-02Get rid of read_socket_with_timeoutVolker Lendecke1-22/+23
(This used to be commit f9c8ac83ff42137d2101d3bb17e5dcc3c3d70a8f)
2008-02-02Convert read_smb_length to return NTSTATUSVolker Lendecke1-18/+5
(This used to be commit 5750c3a51b4ddac635a98195d1621b24f91bad3f)
2008-02-02Convert read_smb_length_return_keepalive to return NTSTATUSVolker Lendecke1-36/+44
(This used to be commit 73a79a957a33a8761acf54598ce71e3604ecf3c5)
2008-02-02Convert read_smb_length_return_keepalive to read_socket_with_timeout_ntstatusVolker Lendecke1-2/+19
(This used to be commit 59e8f22f36be5a70fdb101964570ce7c10e8ff65)
2008-02-02Add read_socket_with_timeout_ntstatusVolker Lendecke1-23/+48
(This used to be commit 546ca0414aa1a9389e620b8f532224a3a19256d4)
2008-02-01Fix a typoVolker Lendecke1-1/+1
(This used to be commit 1efdef08ae19a01b03bf6730df1fb4a9a4a8aba0)
2008-01-25Tiny simplificationVolker Lendecke1-8/+7
(This used to be commit e78f6872bfc19ce0476b8d79c856a8d9c646a913)
2008-01-25Remove a pointless while loopVolker Lendecke1-11/+7
(This used to be commit f591bd68eafdbaefcaa95510cc4cb9a74cef0562)
2008-01-24More read_data -> read_socket_with_timeoutVolker Lendecke1-16/+3
(This used to be commit f1d7de462cf0f64648a3a1fc6f0c64a7bbdb3c2a)
2008-01-23read_socket_with_timeout has timeout=0 handlingVolker Lendecke1-38/+1
(This used to be commit 7101026061c470ed962267b43ac0aa67cc761a64)
2008-01-21util_sock: Don't return a pointer to freed memory.Kai Blin1-1/+2
Fix a bug in my bugfix. Thanks to vl for spotting that one. (This used to be commit 24f68b90cca111256a7b03f7062cb57c2b08a0d6)
2008-01-21util_sock: Fix memcache bug in get_mydnsfullname.Kai Blin1-3/+3
get_mydnsfullname relied on memcache_add(); memcache_lookup() working. When run from ntlm_auth, the global_cache variable in memcache is NULL, so the add and lookup both fail. In that case, just return the result of the getaddrinfo call. Jeremy, please check. (This used to be commit 1db41ff52565e9f336a22fb9ffd80d51677e023b)
2008-01-16Fix IPv6 bug #5204, which caused krb5 DNS lookupsJeremy Allison1-2/+25
for a name '[<ipv6 addr>'. Jeremy. (This used to be commit f2aa921505e49f894bfed4e5e2f9fc01918b1bb0)
2008-01-04Refactor the crypto code after a very helpful conversationJeremy Allison1-74/+0
with Volker. Mostly making sure we have data on the incoming packet type, not stored in the smb header. Jeremy. (This used to be commit c4e5a505043965eec77b5bb9bc60957e8f3b97c8)
2008-01-03Trivial simplificationVolker Lendecke1-3/+2
... things you come across when you review code (This used to be commit 1e006bcfb15d44ecb81b6994c588d30d87b48033)
2008-01-02Convert the little caches in util_sock.c to useJeremy Allison1-47/+118
the singleton memcache. Vl please check (passes make valgrindtest). Jeremy. (This used to be commit a4d613cde86caf5782c4bfc47122d6ba807990ac)
2007-12-26Add SMB encryption. Still fixing client decrypt butJeremy Allison1-3/+27
negotiation works. Jeremy. (This used to be commit d78045601af787731f0737b8627450018902b104)
2007-12-09Fix connect(2) callers to use correct sockaddr size.James Peach1-4/+5
Some systems (eg Mac OSX 10.5) require the length passed to match the socket address family. This introduces sys_connect() that does the right thing, and replaces all uses oc connect(2) with sys_connect(). Note that there are some LGPL callers that still call connect(2) directly. (This used to be commit e1bfdc17c49da582cdf907e260301ab1946b2ed3)
2007-12-07Remove next_token - all uses must now be next_token_talloc.Jeremy Allison1-2/+4
No more temptations to use static length strings. Jeremy. (This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
2007-11-21Doh ! Don't use #else when #endif is needed.Jeremy Allison1-2/+1
Jeremy. (This used to be commit a04e916b89c901911ffc0a62e57a3ec87fe7ac28)
2007-11-21Add set_sockaddr_port function for winbindd.Jeremy Allison1-0/+13
Jeremy. (This used to be commit 4b47052694285a1d1d313dfd61bd17011d62948d)
2007-11-15Add MAX_DNS_NAME_LENGTH, remove more pstrings.Jeremy Allison1-2/+2
Jeremy. (This used to be commit a1725f4ff7ed375808c78ac661b539557748d0a5)
2007-11-11Remove a pstring.Jeremy Allison1-4/+11
Jeremy. (This used to be commit c0412b5d13546f388b615a073e82e7730e01d731)
2007-11-08Remove more fstring/pstring bad useage. Go talloc !Jeremy Allison1-25/+27
Jeremy. (This used to be commit 2a0173743d2cf615d52278f3dd87cc804abe2d16)
2007-11-07Unify the name and addr cache for client_name toJeremy Allison1-21/+31
make threading easier ultimately. Jeremy. (This used to be commit 48e0725cd6bb976ca799e6b8464c94aeffb1672b)
2007-11-05Remove the horror that was the global smb_rw_error.Jeremy Allison1-43/+44
Each cli struct has it's own local copy of this variable, so use that in client code. In the smbd server, add one static to smbd/proccess.c and use that inside smbd. Fix a bunch of places where smb_rw_error could be set by calling read_data() in places where we weren't reading from the SMB client socket (ie. winbindd). Jeremy. (This used to be commit 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db)
2007-11-04Don't alloc struct iface_struct nics[MAX_INTERFACES]; (128 entries)Jeremy Allison1-1/+8
on the stack - use talloc. Jeremy (This used to be commit b5e37af251a26648b0e4f59ca548c5374399175e)
2007-11-04This should really be a cond_set_smb_read_error().Jeremy Allison1-3/+1
Jeremy. (This used to be commit 5ab76b58c00dde89b56060482f5cdc5d0c6c56cb)
2007-11-04Don't use 0 when we mean SMB_READ_OK.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 08ee4314a9e25700288f4ea1af22ee1732dfea61)
2007-11-03Remove most of the remaining globals out of lib/util_sock.c.Jeremy Allison1-38/+30
I have a plan for dealing with the remaining..... Watch this space. Jeremy. (This used to be commit 963fc7685212689f02b3adcc05b4273ee5c382d4)
2007-11-03Remove more static data from lib/util_sock.c andJeremy Allison1-34/+24
callers. Jeremy. (This used to be commit 35aaa36f82c70964cee5d0778eb04547b226dd3f)
2007-11-03Missed one case where I need to pass down addrlen.Jeremy Allison1-1/+1
Jeremy (This used to be commit 62b5ca3334598aec3304d21118f67702afc3854a)
2007-11-03I can't get away without a 'length' arg. :-).Jeremy Allison1-9/+10
Jeremy. (This used to be commit 95d01279a5def709d0a5d5ae7224d6286006d120)
2007-11-03Stop get_peer_addr() and client_addr() from using globalJeremy Allison1-12/+15
statics. Part of my library cleanups. Jeremy. (This used to be commit e848506c858bd16706c1d7f6b4b032005512b8ac)
2007-11-03Remove the smb_read_error global variable and replaceJeremy Allison1-21/+38
it with accessor functions. "One global or pstring a day...." :-). Jeremy. (This used to be commit d50d14c300abc83b7015718ec48acc8b3227a273)
2007-11-02Ensure we use the correct socklen_t values for bind() forJeremy Allison1-1/+3
Solaris. Jeremy. (This used to be commit 638579d75a2aa00836dc4c0c772381b775944b16)
2007-11-02Fix Solaris by ensuring we use the IPv4 or IPv6 lengthJeremy Allison1-3/+4
in any getnameinfo calls. Jeremy (This used to be commit 4d7badb0c44f287034f58d9a412e662c0fbecdc9)
2007-10-30Add new parameter, "min receivefile size" (by default setJeremy Allison1-105/+1
to zero). If non-zero, writeX calls greater than this value will be left in the socket buffer for later handling with recvfile (or userspace equivalent). Definition of recvfile for your system is left as an exercise for the reader (I'm working on getting splice working :-). Jeremy. (This used to be commit 11c03b75ddbcb6e36b231bb40a1773d1c550621c)