1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

200 Commits

Author SHA1 Message Date
Volker Lendecke
0dbd396862 Add a macro async_req_setup()
This streamlines setting up a multi-step async request a bit
2009-01-18 16:45:07 +01:00
Jeremy Allison
fb904194c9 "First thing, kill all the language lawyers" :-). Ensure possible insane compilers
can't kill us later.
Jeremy.
2009-01-16 11:55:01 -08:00
Jeremy Allison
354a2e03ab Fix bug #6040 - Calling Samba print server with an aliased DNS-name fails.
Jeremy.
2009-01-15 10:29:34 -08:00
Volker Lendecke
fe56659442 Remove a duplicated comment 2009-01-04 18:03:23 +01:00
Volker Lendecke
0cc63c6416 Add open_socket_out_defer_send/recv 2009-01-04 16:42:40 +01:00
Volker Lendecke
19b783cce9 Async wrapper for open_socket_out_send/recv 2009-01-04 16:42:40 +01:00
Volker Lendecke
fafb9ecc61 open_socket_out is always used with SOCK_STREAM, remove argument "type" 2009-01-03 19:22:06 +01:00
Volker Lendecke
afd70855b7 Make write_data use write_data_iov 2008-12-29 13:24:28 +01:00
Volker Lendecke
82a152fcf9 Add write_data_iov 2008-12-29 13:24:27 +01:00
Dan Sledz
2f17be1f57 s3: Use DEBUGADD instead of DEBUG to avoid printing the header 2008-12-15 23:30:50 -08:00
Tim Prouty
1eb743ab8e s3: Change sockaddr util function names for consistency
Also eliminates name conflicts with OneFS system libraries
2008-12-03 10:40:20 -08:00
Jelmer Vernooij
22f566c39b Move set_sockaddr_port to libutil. 2008-10-23 21:08:13 +02:00
Jelmer Vernooij
fe36fe8c3e Use common net utility code (address and sockaddr manipulation). 2008-10-23 20:41:15 +02:00
Jelmer Vernooij
d6a5476ee7 Use sockaddr_storage only where we rely on the size, use sockaddr
otherwise (to clarify we can also pass in structs smaller than
sockaddr_storage, such as sockaddr_in).
2008-10-23 19:53:15 +02:00
Jelmer Vernooij
aa982895e5 Add data_blob_string_const_null() function that includes the terminating
null byte and use it in Samba 3.

This matches the behaviour prior to my data_blob changes.
2008-10-13 05:20:26 +02:00
Steven Danneman
304554115a Cleanup of DC enumeration in get_dcs()
This is a fix for a few small inefficiencies/bugs in the get_dcs() path.

* because the third add_one_dc_unique() loop was outside the ADS check all DCs
  returned from the non-sitename lookup were being tacked onto the dc_name_ip
  list twice.
* add_one_dc_unique() now checks if the given IP address already exists before
  adding it to the list, making the returned list actually unique
* added more thorough doxygen comment headers
(This used to be commit cb2d488e1d)
2008-09-04 11:50:25 -07:00
Zach Loafman
06d0790c07 Fix various build warnings
This fixes various build warnings on our platform. I'm sure I haven't
caught them all, but it's a start.
(This used to be commit 6b73f259cb)
2008-07-22 15:00:48 +02:00
Zach Loafman
272690bda8 Minor style correction
Set sin[6]_family instead of ss_family in in[6]_addr_to_sockaddr_storage
so that assignments look like they're going to the same place.
(This used to be commit 3d19112f64)
2008-07-08 15:58:19 -07:00
Jeremy Allison
d36434f312 Security fix for CVE-2008-1105: Boundary failure when parsing SMB responses
can result in a buffer overrun.
Jeremy.
(This used to be commit 23b825e9d2)
2008-05-28 09:31:42 -07:00
Björn Jacke
b6e9fffaa2 increase log level for this failed setsockopt call. EINVAL is a normal error on Solaris when we do this on an already resetted connection.
(This used to be commit 42bc4ff7fd)
2008-04-07 11:49:54 +02:00
Gerald W. Carter
f4f0d39bfa Fix a bug in the output from print_canonical_sockaddr() fix from 36f8bafbd3dee66a8....
Make sure that IPv4 addresses are not enclised in []'s.
(This used to be commit 4ddf58dbdc)
2008-03-26 16:58:27 -05:00
Gerald (Jerry) Carter
22d7cd6605 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.
(This used to be commit 36f8bafbd3)
2008-03-24 17:25:13 -05:00
Volker Lendecke
a5e1910f82 Fix Coverity ID 567
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 2fd2542370)
2008-03-16 12:23:44 -07:00
Michael Adam
e9c2515df0 Eliminate tons of build warnings on non-IPV6 system.
Michael
(This used to be commit ee4810099c)
2008-02-29 13:35:16 +01:00
Volker Lendecke
3176392878 Fix some warnings
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
(This used to be commit ad37b7b0ae)
2008-02-25 16:09:26 +01:00
Tim Potter
abf8465659 Fix possible close of invalid fd if call to socket() returns -1.
(This used to be commit f7d2f69299)
2008-02-20 17:58:50 -08:00
Volker Lendecke
abe2fd7697 Fix a debug message
(This used to be commit 24aa3518ae)
2008-02-05 22:22:03 +01:00
Volker Lendecke
b42a5d68a3 Convert read_data() to NTSTATUS
(This used to be commit af40b71023)
2008-02-02 11:03:23 +01:00
Volker Lendecke
88c27f83d4 Convert receive_smb_raw to NTSTATUS
(This used to be commit ba771bd858)
2008-02-02 11:03:23 +01:00
Volker Lendecke
6ddfa6ae77 read_socket_with_timeout_ntstatus->read_socket_with_timeout
(This used to be commit 90554799af)
2008-02-02 11:03:22 +01:00
Volker Lendecke
5e43eeb1b6 Get rid of read_socket_with_timeout
(This used to be commit f9c8ac83ff)
2008-02-02 11:03:22 +01:00
Volker Lendecke
9f6e983d0b Convert read_smb_length to return NTSTATUS
(This used to be commit 5750c3a51b)
2008-02-02 11:03:21 +01:00
Volker Lendecke
0afbfa4284 Convert read_smb_length_return_keepalive to return NTSTATUS
(This used to be commit 73a79a957a)
2008-02-02 11:03:21 +01:00
Volker Lendecke
3e5b98555b Convert read_smb_length_return_keepalive to read_socket_with_timeout_ntstatus
(This used to be commit 59e8f22f36)
2008-02-02 11:03:21 +01:00
Volker Lendecke
3f970f91c2 Add read_socket_with_timeout_ntstatus
(This used to be commit 546ca0414a)
2008-02-02 11:03:21 +01:00
Volker Lendecke
680a0f0c69 Fix a typo
(This used to be commit 1efdef08ae)
2008-02-01 23:32:51 +01:00
Volker Lendecke
e2ad28509c Tiny simplification
(This used to be commit e78f6872bf)
2008-01-25 20:55:51 +01:00
Volker Lendecke
31a6f80784 Remove a pointless while loop
(This used to be commit f591bd68ea)
2008-01-25 20:55:51 +01:00
Volker Lendecke
9344628bef More read_data -> read_socket_with_timeout
(This used to be commit f1d7de462c)
2008-01-24 09:41:22 +01:00
Volker Lendecke
a925a53f61 read_socket_with_timeout has timeout=0 handling
(This used to be commit 7101026061)
2008-01-23 17:09:10 +01:00
Kai Blin
36e3e75e06 util_sock: Don't return a pointer to freed memory.
Fix a bug in my bugfix. Thanks to vl for spotting that one.
(This used to be commit 24f68b90cc)
2008-01-21 18:02:24 +01:00
Kai Blin
7b6a439efe 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.
(This used to be commit 1db41ff525)
2008-01-21 13:28:06 +01:00
Jeremy Allison
bd8abea49f Fix IPv6 bug #5204, which caused krb5 DNS lookups
for a name '[<ipv6 addr>'.
Jeremy.
(This used to be commit f2aa921505)
2008-01-16 13:21:46 -08:00
Jeremy Allison
9254bb4ef1 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.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Volker Lendecke
149e86b842 Trivial simplification
... things you come across when you review code
(This used to be commit 1e006bcfb1)
2008-01-03 10:24:45 +01:00
Jeremy Allison
cc957c7f6d Convert the little caches in util_sock.c to use
the singleton memcache. Vl please check (passes
make valgrindtest).
Jeremy.
(This used to be commit a4d613cde8)
2008-01-02 17:37:39 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
James Peach
daba3f8b54 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.
(This used to be commit e1bfdc17c4)
2007-12-09 13:28:00 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
dc9237d231 Doh ! Don't use #else when #endif is needed.
Jeremy.
(This used to be commit a04e916b89)
2007-11-21 10:31:18 -08:00