1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-18 19:17:08 +03:00

181 Commits

Author SHA1 Message Date
Björn Jacke
42bc4ff7fd increase log level for this failed setsockopt call. EINVAL is a normal error on Solaris when we do this on an already resetted connection. 2008-04-07 11:49:54 +02:00
Gerald W. Carter
4ddf58dbdc Fix a bug in the output from print_canonical_sockaddr() fix from 36f8bafbd3dee66a8....
Make sure that IPv4 addresses are not enclised in []'s.
2008-03-26 16:58:27 -05:00
Gerald (Jerry) Carter
36f8bafbd3 Ignore port when pulling IP addr from struct sockaddr_storage.
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.
2008-03-24 17:25:13 -05:00
Volker Lendecke
2fd2542370 Fix Coverity ID 567
Jeremy, please push it if you like it and mark the bug as fixed on the Coverity
site.

Thanks,

Volker
2008-03-16 12:23:44 -07:00
Michael Adam
ee4810099c Eliminate tons of build warnings on non-IPV6 system.
Michael
2008-02-29 13:35:16 +01:00
Volker Lendecke
ad37b7b0ae Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
2008-02-25 16:09:26 +01:00
Tim Potter
f7d2f69299 Fix possible close of invalid fd if call to socket() returns -1. 2008-02-20 17:58:50 -08:00
Volker Lendecke
24aa3518ae Fix a debug message 2008-02-05 22:22:03 +01:00
Volker Lendecke
af40b71023 Convert read_data() to NTSTATUS 2008-02-02 11:03:23 +01:00
Volker Lendecke
ba771bd858 Convert receive_smb_raw to NTSTATUS 2008-02-02 11:03:23 +01:00
Volker Lendecke
90554799af read_socket_with_timeout_ntstatus->read_socket_with_timeout 2008-02-02 11:03:22 +01:00
Volker Lendecke
f9c8ac83ff Get rid of read_socket_with_timeout 2008-02-02 11:03:22 +01:00
Volker Lendecke
5750c3a51b Convert read_smb_length to return NTSTATUS 2008-02-02 11:03:21 +01:00
Volker Lendecke
73a79a957a Convert read_smb_length_return_keepalive to return NTSTATUS 2008-02-02 11:03:21 +01:00
Volker Lendecke
59e8f22f36 Convert read_smb_length_return_keepalive to read_socket_with_timeout_ntstatus 2008-02-02 11:03:21 +01:00
Volker Lendecke
546ca0414a Add read_socket_with_timeout_ntstatus 2008-02-02 11:03:21 +01:00
Volker Lendecke
1efdef08ae Fix a typo 2008-02-01 23:32:51 +01:00
Volker Lendecke
e78f6872bf Tiny simplification 2008-01-25 20:55:51 +01:00
Volker Lendecke
f591bd68ea Remove a pointless while loop 2008-01-25 20:55:51 +01:00
Volker Lendecke
f1d7de462c More read_data -> read_socket_with_timeout 2008-01-24 09:41:22 +01:00
Volker Lendecke
7101026061 read_socket_with_timeout has timeout=0 handling 2008-01-23 17:09:10 +01:00
Kai Blin
24f68b90cc util_sock: Don't return a pointer to freed memory.
Fix a bug in my bugfix. Thanks to vl for spotting that one.
2008-01-21 18:02:24 +01:00
Kai Blin
1db41ff525 util_sock: Fix memcache bug in get_mydnsfullname.
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.
2008-01-21 13:28:06 +01:00
Jeremy Allison
f2aa921505 Fix IPv6 bug #5204, which caused krb5 DNS lookups
for a name '[<ipv6 addr>'.
Jeremy.
2008-01-16 13:21:46 -08:00
Jeremy Allison
c4e5a50504 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
2008-01-04 12:56:23 -08:00
Volker Lendecke
1e006bcfb1 Trivial simplification
... things you come across when you review code
2008-01-03 10:24:45 +01:00
Jeremy Allison
a4d613cde8 Convert the little caches in util_sock.c to use
the singleton memcache. Vl please check (passes
make valgrindtest).
Jeremy.
2008-01-02 17:37:39 -08:00
Jeremy Allison
d78045601a Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
2007-12-26 17:12:36 -08:00
James Peach
e1bfdc17c4 Fix connect(2) callers to use correct sockaddr size.
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.
2007-12-09 13:28:00 -08:00
Jeremy Allison
ec003f3936 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
2007-12-07 17:32:32 -08:00
Jeremy Allison
a04e916b89 Doh ! Don't use #else when #endif is needed.
Jeremy.
2007-11-21 10:31:18 -08:00
Jeremy Allison
4b47052694 Add set_sockaddr_port function for winbindd.
Jeremy.
2007-11-21 10:10:52 -08:00
Jeremy Allison
a1725f4ff7 Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
2007-11-15 18:27:26 -08:00
Jeremy Allison
c0412b5d13 Remove a pstring.
Jeremy.
2007-11-11 21:45:55 -08:00
Jeremy Allison
2a0173743d Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
2007-11-08 17:25:45 -08:00
Jeremy Allison
48e0725cd6 Unify the name and addr cache for client_name to
make threading easier ultimately.
Jeremy.
2007-11-07 12:48:58 -08:00
Jeremy Allison
255c2adf7b Remove the horror that was the global smb_rw_error.
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.
2007-11-05 11:12:56 -08:00
Jeremy Allison
b5e37af251 Don't alloc struct iface_struct nics[MAX_INTERFACES]; (128 entries)
on the stack - use talloc.
Jeremy
2007-11-04 22:20:04 -08:00
Jeremy Allison
5ab76b58c0 This should really be a cond_set_smb_read_error().
Jeremy.
2007-11-04 22:14:19 -08:00
Jeremy Allison
08ee4314a9 Don't use 0 when we mean SMB_READ_OK.
Jeremy.
2007-11-04 22:12:31 -08:00
Jeremy Allison
963fc76852 Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
2007-11-03 23:20:10 -07:00
Jeremy Allison
35aaa36f82 Remove more static data from lib/util_sock.c and
callers.
Jeremy.
2007-11-03 22:34:46 -07:00
Jeremy Allison
62b5ca3334 Missed one case where I need to pass down addrlen.
Jeremy
2007-11-03 20:27:59 -07:00
Jeremy Allison
95d01279a5 I can't get away without a 'length' arg. :-).
Jeremy.
2007-11-03 18:41:26 -07:00
Jeremy Allison
e848506c85 Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
2007-11-03 18:15:45 -07:00
Jeremy Allison
d50d14c300 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
2007-11-03 15:12:42 -07:00
Jeremy Allison
638579d75a Ensure we use the correct socklen_t values for bind() for
Solaris.
Jeremy.
2007-11-02 14:22:19 -07:00
Jeremy Allison
4d7badb0c4 Fix Solaris by ensuring we use the IPv4 or IPv6 length
in any getnameinfo calls.
Jeremy
2007-11-02 10:25:34 -07:00
Jeremy Allison
11c03b75dd Add new parameter, "min receivefile size" (by default set
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.
2007-10-30 16:22:24 -07:00
Jeremy Allison
2e92418a13 Change all occurrences of zero_addr(&ss,AF_INET) to
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.
2007-10-27 20:29:36 -07:00