1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

135 Commits

Author SHA1 Message Date
Jeremy Allison
a45c91ec6a Ensure we use the correct socklen_t values for bind() for
Solaris.
Jeremy.
(This used to be commit 638579d75a)
2007-11-02 14:22:19 -07:00
Jeremy Allison
e075b3692b Fix Solaris by ensuring we use the IPv4 or IPv6 length
in any getnameinfo calls.
Jeremy
(This used to be commit 4d7badb0c4)
2007-11-02 10:25:34 -07:00
Jeremy Allison
c3250149e1 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.
(This used to be commit 11c03b75dd)
2007-10-30 16:22:24 -07:00
Jeremy Allison
d4307679b9 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.
(This used to be commit 2e92418a13)
2007-10-27 20:29:36 -07:00
Jeremy Allison
fc91aa6988 Move the horrible hack for link local addresses out of namequery.c
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 a3f7db3d30)
2007-10-26 16:03:20 -07:00
Jeremy Allison
e054affb7b Fix bug in writing names into gencache
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 f109f82622)
2007-10-25 19:07:25 -07:00
Jeremy Allison
6128d116b3 Fix resolve name to resolve IPv6 addresses of link-local%ifaddr
Jeremy.
(This used to be commit e6609cab73)
2007-10-25 18:28:36 -07:00
Jeremy Allison
d58398bd23 When doing reverse lookups actually look up the name, not
just the numeric address (doh!) :-).
Jeremy.
(This used to be commit 9aa9ecd8cc)
2007-10-25 16:14:52 -07:00
Jeremy Allison
f88b7a076b This is a large patch (sorry). Migrate from struct in_addr
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 98e154c312)
2007-10-24 14:16:54 -07:00
Gerald (Jerry) Carter
80b7bcb5fb Add test for "struct in6_addr" to the HAVE_IPV6 configure test.
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 620785df4e)
2007-10-19 13:09:26 -07:00
Jeremy Allison
666f50b01f Move to protocol independent code in most of lib/util_sock.c
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 4a56b697b6)
2007-10-15 16:11:48 -07:00
Jeremy Allison
6c8225445b Dummy formatting commit to check I've set up my home git
correctly.
(This used to be commit a1166e9e65)
2007-10-12 21:50:41 -07:00
Jeremy Allison
e9cf3a8ca2 Convert get_peer_addr() to IPv6. Only is_myname_or_ipaddr()
lefto to do then I can fix the lib/access.c functions.
Jeremy.
(This used to be commit 3403c6c330)
2007-10-12 13:38:04 -07:00
Jeremy Allison
cb5436bcc3 Add const to the get_peer_addr() and get_socket_addr()
calls. Use the IPv6 varient for get_peer_addr().
Jeremy.
(This used to be commit baf1f52e34)
2007-10-11 15:36:13 -07:00
Jeremy Allison
8e54530b52 Add start of IPv6 implementation. Currently most of this is avoiding
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 3f6bd0e1ec)
2007-10-10 18:25:16 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
Jeremy Allison
f7055aef17 r25565: Fix unintended consequence change for IPv6 noticed
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 2827bbe0f8)
2007-10-10 12:31:14 -05:00
Jeremy Allison
3dbb3d4c26 r25510: Now we're returning the port instead of using a global,
remember to use ntohs. Hopefully will fix the build farm.
Jeremy.
(This used to be commit 5174acccb5)
2007-10-10 12:31:11 -05:00
Jeremy Allison
0d87820380 r25492: Start adding IPv6 compatible code to lib/util_sock.c and deal with
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 18c6a2211d)
2007-10-10 12:31:09 -05:00
Jeremy Allison
31adfe3446 r25473: Reformatting only. Prepare for new ip functions.
Jeremy.
(This used to be commit 2a8f3dd550)
2007-10-10 12:31:06 -05:00
Volker Lendecke
cc6a41017c r23997: Check in the infrastructure for getting rid of the global 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 5594af2b20)
2007-10-10 12:28:53 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
05ee952d10 r22926: Don't use <=0, use < 0 to allow keepalives to propagate up.
Jeremy.
(This used to be commit bf0313629e)
2007-10-10 12:22:09 -05:00
Jeremy Allison
51101a9450 r22923: Fix runaway smbd now receive_smb_raw() returns a ssize_t not a BOOL.
Jeremy.
(This used to be commit 9204f1741b)
2007-10-10 12:22:08 -05:00
Jeremy Allison
32106b2395 r22920: Add in the UNIX capability for 24-bit readX, as discussed
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 a53268fb20)
2007-10-10 12:22:08 -05:00
Jeremy Allison
a6fa4b4e56 r22181: Fix for EISCON in open_any_socket_out from William Jojo
for bug #3632.
Jeremy.
(This used to be commit 7979a5a350)
2007-10-10 12:19:19 -05:00
Jeremy Allison
34dac35e48 r21990: Stop messing with the signing engine just because
we're encrypted. This will make further changes and
spec much more clear.
Jeremy.
(This used to be commit ffa3a5c508)
2007-10-10 12:18:57 -05:00
Jeremy Allison
8c395be5e5 r21922: Fixed the build by rather horrid means. I really need
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 1b828f051d)
2007-10-10 12:18:49 -05:00
Jeremy Allison
7ccf45684a r21880: Make client and server calls into encryption code symetrical,
depending on encryption context pointer.
Jeremy.
(This used to be commit d3f3ced6c8)
2007-10-10 12:18:43 -05:00
Jeremy Allison
c48b610b51 r21876: Start adding in the seal implementation - prototype code
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 530ac29abf)
2007-10-10 12:18:42 -05:00
Jeremy Allison
ecd496f066 r21865: Add in the stubs for SMB transport encryption. Will flesh
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 5bfe638f21)
2007-10-10 12:18:40 -05:00
Jeremy Allison
050534827f r20148: Forgot to merge. Ensure open_any_socket_out()
is safe from signals.
Jeremy.
(This used to be commit c264a0aa4a)
2007-10-10 12:16:27 -05:00
Jeremy Allison
0648638fef r15700: Make nmbd udp sockets non-blocking to prevent problem
with select returning true but no data being available.
Fix for bug #3779.
Jeremy.
(This used to be commit e5787cf75b)
2007-10-10 11:17:08 -05:00
Jeremy Allison
f895fcf109 r15672: Fix for bug #3783. winbindd_cm.c calls open_any_socket_out()
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 24aaa48677)
2007-10-10 11:17:06 -05:00
Jeremy Allison
fc13f28417 r15030: On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.
(This used to be commit 1217ed392b)
2007-10-10 11:15:58 -05:00
James Peach
d67b72a0f2 r12953: Support the TCP_FASTACK socket option if it is available. Note that this will
not acutally help, but it is good to be complete.
(This used to be commit 2163e4b6b4)
2007-10-10 11:06:09 -05:00
Jeremy Allison
2efcdb2fb8 r7591: Don't call getpeeraddr on a disconnected socket.
Jeremy.
(This used to be commit a9cd218eb6)
2007-10-10 10:57:15 -05:00
Jeremy Allison
33a4c0b5a1 r7554: Refactor very messy code in util_sock.c Remove 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 cbd7578e7c)
2007-10-10 10:57:13 -05:00
Jeremy Allison
06ae1e805e r7318: Unify HEAD and 3.0 socket functions. Add HEAD functions here #ifdef'ed out.
Correct branch this time !
Jeremy.
(This used to be commit 052b4f8e28)
2007-10-10 10:57:06 -05:00
Jeremy Allison
96f179752d r7039: Ensure we always call read_socket_with_timeout() when
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 09c9a62aa5)
2007-10-10 10:57:01 -05:00
Jeremy Allison
c3df3e3a08 r7034: Revert change in util_sock.c from derrell until this is
discussed more on samba-technical.
Jeremy.
(This used to be commit 7ad6fdc1ef)
2007-10-10 10:57:01 -05:00
Derrell Lipman
54aee75980 r7025: 1 if not all data is available at the time we go to read a packet, retry
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 7b4d4f6109)
2007-10-10 10:57:00 -05:00
Jeremy Allison
fe0ce8dd8e r6890: Refactor printing interface to take offset into job. Fixes bug
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 482f7e0e37)
2007-10-10 10:56:56 -05:00
Jeremy Allison
8bcfb51f91 r6553: Added Linux per-socket TCP settings patch from "Ed Boraas" <ed.boraas@concordia.ab.ca>.
Jeremy.
(This used to be commit 96f0e2d3fc)
2007-10-10 10:56:45 -05:00
Volker Lendecke
786b6c5e28 r4217: Fix open_any_socket_out.
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 7230cb87eb)
2007-10-10 10:53:38 -05:00
Jeremy Allison
acf9d61421 r4088: Get medieval on our ass about malloc.... :-). Take control of all our 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 620f2e608f)
2007-10-10 10:53:32 -05:00
Volker Lendecke
24d3605d99 r3843: If a connection to a DC is requested, open connections simultaeneously to all
DCs found. The first one to reply wins.

Volker
(This used to be commit 84ac54aef2)
2007-10-10 10:53:20 -05:00
Jeremy Allison
6ae9b63f01 r2978: Fix #1926 typo in debug. Found by Bill McGonigle <bill+samba@bfccomputing.com>.
Jeremy.
(This used to be commit 4fd314243e)
2007-10-10 10:52:58 -05:00
Volker Lendecke
76ca0f6f3f r1104: get_called_name is used in the printing subsystem. In case of multi-homed
servers we need to make sure that the clients are given back the IP address
they connected to.

Volker
(This used to be commit 5f482df169)
2007-10-10 10:51:55 -05:00