1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-07 09:49:30 +03:00
Commit Graph

225 Commits

Author SHA1 Message Date
668470c992 libcli:nbt make the lmhosts parsing code and dependicies common
This starts the process to have Samba4 use lmhosts.

Andrew Bartlett
2009-09-15 07:42:54 -07:00
43c766a14a Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
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-06 21:38:50 -07:00
bc081cf0cc Save and report the correct errno value. 2009-09-05 12:49:26 -04:00
2d0cd3e53a (Hopefully) fix the problem Kai reported with
net ads leave and IPv6. Ensure all DC lookups
prefer IPv4.
Jeremy.
2009-07-28 18:02:10 -07:00
036bad6131 s3: allow setting the TCP_QUICKACK socket option 2009-07-14 22:29:59 +02:00
c736baf9f8 Make open_udp_socket() IPv6 clean. Trying to fix bug #6437 - Unable to join IPv6-only ads domain.
Avaiting feedback from submitter before backport to 3.4 and earlier.
Jeremy.
2009-06-08 13:26:39 -07:00
3cd03b229b Allow AF_UNIX for open_socket_out 2009-06-06 10:42:54 +02:00
bbbf9f13ad Fix bug 5681: Do not limit the number of network interfaces
Jeremy as far as I can see there is no real technical reason to limit the
number of interfaces. If you like this patch, can you please merge it to 3.4?
If you don't please tell me :-)

Thanks,

Volker
2009-05-18 13:38:55 +02:00
b9f3a78169 s3:libsmb: move read_smb_send/recv() static in async_smb.c
metze
2009-05-13 18:27:50 +02:00
ad9d64ee1b Clean up assignments to iov_base, ensure it's always cast to void *. This should quieten some warnings with picky compilers on the buildfarm.
Jeremy.
2009-05-12 11:45:37 -07:00
5b7b47f015 Add getaddrinfo_send/recv 2009-05-01 12:30:59 +02:00
dcda3ab8ca Reactivate get_socket_port 2009-04-12 14:51:15 +02:00
78951bd7f4 s3-util-sock: add ismyaddr() check in is_myname_or_ipaddr().
Guenther
2009-04-08 12:47:10 +02:00
ad29104d3d Add read_smb_send/recv, dumping keepalives 2009-04-06 21:32:05 +02:00
0dfdb7b911 s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets
This ways the pcap support in socket wrapper sees the received data.

metze
2009-03-19 13:54:17 +01:00
20cee26a3d Convert open_socket_out_defer to tevent_req 2009-03-16 19:32:01 +01:00
cb9effdc63 Use tevent_wakeup_send in open_socket_out_defer 2009-03-16 18:49:54 +01:00
67d41d0fc7 Make struct tevent_req opaque
Move struct tevent_req in tevent_internal, and ad getters and setters
for private data and the callback function.
This patch also renames 'private_state' into 'data'. What is held in this
pointer is in fact data and not a state like enum tevent_req_state.
Calling it 'state' is confusing.

The functions addedd are:
tevent_req_set_callback() - sets req->async.fn and req->async.private_data
tevent_req_set_print_fn() - sets req->private_print
tevent_req_callback_data() - gets req->async.private_data
tevent_req_data() - gets rea->data

This way it is much simpler to keep API/ABI compatibility in the future.
2009-03-02 11:02:09 -05:00
6cdcfa3fc1 Remove a temporary debug message -- sorry 2009-02-26 13:26:12 +01:00
a777b4d501 Convert open_socket_out to tevent_req 2009-02-26 13:04:34 +01:00
39976035eb Convert async_connect to tevent_req 2009-02-24 20:40:47 +01:00
1696298aad s3 async: Fix the build on systems that have ETIMEDOUT but not ETIME
Fallback on EAGAIN
2009-02-09 13:23:44 -08:00
c3b9b6c8aa async_sock: Use unix errnos instead of NTSTATUS
This also switches wb_reqtrans to use wbcErr instead of NTSTATUS as it would
be pointless to convert to errno first and to wbcErr later.
2009-02-09 08:36:08 +01:00
d3f9b0fab6 Next step disentangling async_req from NTSTATUS
Now I need to document this :-)
2009-02-02 20:15:03 +01:00
c14b7e648b Split up async_req into a generic and a NTSTATUS specific part 2009-02-01 19:05:39 +01:00
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
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
354a2e03ab Fix bug #6040 - Calling Samba print server with an aliased DNS-name fails.
Jeremy.
2009-01-15 10:29:34 -08:00
fe56659442 Remove a duplicated comment 2009-01-04 18:03:23 +01:00
0cc63c6416 Add open_socket_out_defer_send/recv 2009-01-04 16:42:40 +01:00
19b783cce9 Async wrapper for open_socket_out_send/recv 2009-01-04 16:42:40 +01:00
fafb9ecc61 open_socket_out is always used with SOCK_STREAM, remove argument "type" 2009-01-03 19:22:06 +01:00
afd70855b7 Make write_data use write_data_iov 2008-12-29 13:24:28 +01:00
82a152fcf9 Add write_data_iov 2008-12-29 13:24:27 +01:00
2f17be1f57 s3: Use DEBUGADD instead of DEBUG to avoid printing the header 2008-12-15 23:30:50 -08:00
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
22f566c39b Move set_sockaddr_port to libutil. 2008-10-23 21:08:13 +02:00
fe36fe8c3e Use common net utility code (address and sockaddr manipulation). 2008-10-23 20:41:15 +02:00
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
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
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
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
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
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
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
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
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
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
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
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