1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-21 12:23:50 +03:00
Commit Graph

182 Commits

Author SHA1 Message Date
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
Jeremy Allison
a3f7db3d30 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
2007-10-26 16:03:20 -07:00
Jeremy Allison
f109f82622 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.
2007-10-25 19:07:25 -07:00
Jeremy Allison
e6609cab73 Fix resolve name to resolve IPv6 addresses of link-local%ifaddr
Jeremy.
2007-10-25 18:28:36 -07:00
Jeremy Allison
9aa9ecd8cc When doing reverse lookups actually look up the name, not
just the numeric address (doh!) :-).
Jeremy.
2007-10-25 16:14:52 -07:00
Jeremy Allison
98e154c312 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.
2007-10-24 14:16:54 -07:00
Gerald (Jerry) Carter
620785df4e 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.
2007-10-19 13:09:26 -07:00
Jeremy Allison
4a56b697b6 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.
2007-10-15 16:11:48 -07:00
Jeremy Allison
a1166e9e65 Dummy formatting commit to check I've set up my home git
correctly.
2007-10-12 21:50:41 -07:00
Jeremy Allison
3403c6c330 Convert get_peer_addr() to IPv6. Only is_myname_or_ipaddr()
lefto to do then I can fix the lib/access.c functions.
Jeremy.
2007-10-12 13:38:04 -07:00
Jeremy Allison
baf1f52e34 Add const to the get_peer_addr() and get_socket_addr()
calls. Use the IPv6 varient for get_peer_addr().
Jeremy.
2007-10-11 15:36:13 -07:00
Jeremy Allison
3f6bd0e1ec 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.
2007-10-10 18:25:16 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Jeremy Allison
2827bbe0f8 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.
2007-10-10 12:31:14 -05:00
Jeremy Allison
5174acccb5 r25510: Now we're returning the port instead of using a global,
remember to use ntohs. Hopefully will fix the build farm.
Jeremy.
2007-10-10 12:31:11 -05:00
Jeremy Allison
18c6a2211d 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.
2007-10-10 12:31:09 -05:00
Jeremy Allison
2a8f3dd550 r25473: Reformatting only. Prepare for new ip functions.
Jeremy.
2007-10-10 12:31:06 -05:00
Volker Lendecke
5594af2b20 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
2007-10-10 12:28:53 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Jeremy Allison
bf0313629e r22926: Don't use <=0, use < 0 to allow keepalives to propagate up.
Jeremy.
2007-10-10 12:22:09 -05:00
Jeremy Allison
9204f1741b r22923: Fix runaway smbd now receive_smb_raw() returns a ssize_t not a BOOL.
Jeremy.
2007-10-10 12:22:08 -05:00
Jeremy Allison
a53268fb20 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.
2007-10-10 12:22:08 -05:00
Jeremy Allison
7979a5a350 r22181: Fix for EISCON in open_any_socket_out from William Jojo
for bug #3632.
Jeremy.
2007-10-10 12:19:19 -05:00
Jeremy Allison
ffa3a5c508 r21990: Stop messing with the signing engine just because
we're encrypted. This will make further changes and
spec much more clear.
Jeremy.
2007-10-10 12:18:57 -05:00
Jeremy Allison
1b828f051d 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.
2007-10-10 12:18:49 -05:00
Jeremy Allison
d3f3ced6c8 r21880: Make client and server calls into encryption code symetrical,
depending on encryption context pointer.
Jeremy.
2007-10-10 12:18:43 -05:00
Jeremy Allison
530ac29abf 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.
2007-10-10 12:18:42 -05:00
Jeremy Allison
5bfe638f21 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.
2007-10-10 12:18:40 -05:00
Jeremy Allison
c264a0aa4a r20148: Forgot to merge. Ensure open_any_socket_out()
is safe from signals.
Jeremy.
2007-10-10 12:16:27 -05:00
Jeremy Allison
e5787cf75b r15700: Make nmbd udp sockets non-blocking to prevent problem
with select returning true but no data being available.
Fix for bug #3779.
Jeremy.
2007-10-10 11:17:08 -05:00
Jeremy Allison
24aaa48677 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.
2007-10-10 11:17:06 -05:00
Jeremy Allison
1217ed392b r15030: On a performace hunt... Remove as many extraneous
memset's as possible.
Jeremy.
2007-10-10 11:15:58 -05:00
James Peach
2163e4b6b4 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.
2007-10-10 11:06:09 -05:00
Jeremy Allison
a9cd218eb6 r7591: Don't call getpeeraddr on a disconnected socket.
Jeremy.
2007-10-10 10:57:15 -05:00
Jeremy Allison
cbd7578e7c 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.
2007-10-10 10:57:13 -05:00
Jeremy Allison
052b4f8e28 r7318: Unify HEAD and 3.0 socket functions. Add HEAD functions here #ifdef'ed out.
Correct branch this time !
Jeremy.
2007-10-10 10:57:06 -05:00
Jeremy Allison
09c9a62aa5 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.
2007-10-10 10:57:01 -05:00
Jeremy Allison
7ad6fdc1ef r7034: Revert change in util_sock.c from derrell until this is
discussed more on samba-technical.
Jeremy.
2007-10-10 10:57:01 -05:00
Derrell Lipman
7b4d4f6109 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
2007-10-10 10:57:00 -05:00
Jeremy Allison
482f7e0e37 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.
2007-10-10 10:56:56 -05:00
Jeremy Allison
96f0e2d3fc r6553: Added Linux per-socket TCP settings patch from "Ed Boraas" <ed.boraas@concordia.ab.ca>.
Jeremy.
2007-10-10 10:56:45 -05:00
Volker Lendecke
7230cb87eb 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
2007-10-10 10:53:38 -05:00
Jeremy Allison
620f2e608f 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.
2007-10-10 10:53:32 -05:00
Volker Lendecke
84ac54aef2 r3843: If a connection to a DC is requested, open connections simultaeneously to all
DCs found. The first one to reply wins.

Volker
2007-10-10 10:53:20 -05:00
Jeremy Allison
4fd314243e r2978: Fix #1926 typo in debug. Found by Bill McGonigle <bill+samba@bfccomputing.com>.
Jeremy.
2007-10-10 10:52:58 -05:00
Volker Lendecke
5f482df169 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
2007-10-10 10:51:55 -05:00
Gerald Carter
79fed5f5a7 r487: fixing some compile issues with the IBM AIX compiler reoported on the ml -- now to watch the build farm some more 2007-10-10 10:51:26 -05:00
Andrew Tridgell
88278b24de r426: fixed bug noticed by wim.delvaux@adaptiveplanet.com in handling of timeout in socket connections 2007-10-10 10:51:23 -05:00
Andrew Bartlett
e27b5cbe75 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
-