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

75 Commits

Author SHA1 Message Date
Andrew Bartlett
897ef820a4 s3-lib Use common lib/socket code for get_interfaces() et al 2011-05-08 12:57:04 +02:00
Jeremy Allison
e131c94ac1 More const fixes for compiler warnings from the waf build. 2011-05-05 23:56:07 +02:00
Günther Deschner
1f6aecb5cf s3-interfaces: only include interfaces.h where needed.
Guenther
2011-03-16 16:56:46 +01:00
Michael Adam
aea3a8f501 s3:load_interfaces(): use function gfree_interfaces() that we have.
To reduce code duplication.

Michael
2009-11-18 22:19:18 +01:00
Volker Lendecke
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
Aravind Srinivasan
83cf98f113 Have nmbd check all available interfaces for WINS before failing
When nmbd is acting as WINS, it picks the first interface's IP as WINS
server's IP. If the first interface's IP is zero, we will just quit
(even though we might have other interfaces with valid IPs).

This patch makes nmbd look at all interfaces and pick the first interface
with a valid IP as the WINS server's IP.
2009-02-04 20:26: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
ce0ac322b4 Fix prototype for set_sockaddr_port. 2008-10-23 23:20:50 +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
Jeremy Allison
f23a6b7c93 Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address
reported by Ted Percival <ted@midg3t.net>.
Jeremy.
(This used to be commit ab06efccf3)
2008-08-19 17:30:30 -07:00
Jeremy Allison
12f0163e26 Remove worrying warning message when safe_strcpy tries to copy a pseaudo interface
name that's too long. Reported by James Kosin <JKosin@intcomgrp.com>.
Jeremy.
(This used to be commit 3a7542fd49)
2008-07-02 16:31:16 -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
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
ce77126e68 Fix access control code to be IPv6/v4 protocol independent.
Make unix_wild_match() talloc, not pstring based.
Next will be name resolution code, and client code.
Jeremy.
(This used to be commit f6a01b82c5)
2007-10-16 11:33:37 -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
Volker Lendecke
c9165b99e9 Fix one more place for IFF_LOOPBACK
(This used to be commit add1294562)
2007-10-14 19:00:49 +02:00
Volker Lendecke
3d89bad41f Fix a segfault with an unknown interface
"interfaces = foo" with "foo" not being a known interface segfaulted for me.
(This used to be commit 556c33702c)
2007-10-13 21:44:58 +02: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
Jeremy Allison
d75b175cf9 r25508: Reformatting.
Jeremy.
(This used to be commit b412ba6fb3)
2007-10-10 12:31:11 -05:00
Jeremy Allison
3fbd1ae54c r25472: Fix the interfaces code to detect IPv6 interfaces, using the
new standard getifaddrs() and freeifaddrs() interfaces. Currently
we only return IPv4 af_families. Needs fixing for binds to IPv6
but this has to be careful work.
Jeremy.
(This used to be commit 327875182c)
2007-10-10 12:31:06 -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
Günther Deschner
761f60f83a r21854: Add gfree_interfaces() to gfree_all().
Guenther
(This used to be commit eb34ebd9e7)
2007-10-10 12:18:38 -05:00
Volker Lendecke
1cf1e648fe r17334: Some C++ warnings
(This used to be commit 8ae7ed1f3c)
2007-10-10 11:38:26 -05:00
Jeremy Allison
d1014c1cdf r16582: Fix Klocwork #1997 and all generic class of problems
where we don't correctly check the return from memdup.
Jeremy.
(This used to be commit ce14daf51c)
2007-10-10 11:19:01 -05:00
Jim McDonough
92bbd3151d r5163: Fix bugzilla 2062:
turn off broadcast for all 390 NICs.
(This used to be commit d159a5013e)
2007-10-10 10:55:31 -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
Jeremy Allison
af5750d3ba r1248: Fix from Nick Wellnhofer <wellnhofer@aevum.de> to prevent
lp_interfaces() list from being corrupted.
Jeremy.
(This used to be commit c892545960)
2007-10-10 10:52:03 -05:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Gerald Carter
bd8e916cb5 merge from APPLIANCE_HEAD
(This used to be commit c60aa6c06f)
2001-11-28 21:51:11 +00:00
Tim Potter
585d0efbc6 Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:

	void zero_ip(struct in_adder *ip);
	BOOL is_zero_ip(struct in_addr ip);
(This used to be commit 778f5f77a6)
2001-11-26 03:11:44 +00:00
Tim Potter
d2b9acd003 Don't initialise static pointers to NULL.
(This used to be commit 039ea0a0b9)
2001-11-23 01:00:54 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
484a7c0341 move to SAFE_FREE()
(This used to be commit 60e907b7e8)
2001-09-17 02:19:44 +00:00
Andrew Tridgell
11ce0f4d2d a bunch of fixes from the sflight to seattle
in particular:
 - fixed NT status code for a bunch of ops
 - fixed handling of protocol levels in ms_fnmatch
(This used to be commit 3eba9606f7)
2001-08-20 05:15:26 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Simo Sorce
9b70d328cb - sorry, forgot to check a pointer
(This used to be commit 4e0299d4c0)
2001-07-03 00:54:55 +00:00
Simo Sorce
ef6c9d7425 "netbios aliases" and "interfaces" options change from P_STRING to P_LIST
(This used to be commit db36ed1d80)
2001-07-01 23:24:08 +00:00
Herb Lewis
a82df9c673 samba/source/nmbd/nmbd.c change remote_machine name to nmbd instead
of nmb so we write to same log file that
				was originally created as log.nmbd
samba/source/smbd/server.c	change remote_machine name to smbd instead
				of smb so we write to same log file that
				was originally created as log.smbd
samba/source/lib/interface.c	allow binding to all interface IP addresses
				even if on same subnet. This allows you to
				specify which IP's you want in interfaces
				line and use bind interfaces only
(This used to be commit 01dfd59712)
2001-02-15 19:50:34 +00:00
Jeremy Allison
3c330068ad Fix from John E. Malmberg <wb8tyw@qsl.net> for -1 return in interfaces scan.
Jeremy.
(This used to be commit 4d25a53c36)
2000-11-10 19:02:32 +00:00
Andrew Tridgell
814f37a5e3 we don't need fnmatch.c any more
(This used to be commit e23f43e7d3)
2000-04-30 11:15:27 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).

in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.

So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Andrew Tridgell
61b5fd6f32 bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7)
1998-08-31 03:11:42 +00:00
Andrew Tridgell
5a44ce9caa changed the format of the wins.dat file slightly.
It now has a line like this:

VERSION 1 251152

the first number is a version #define in nmbd_winsserver.c and will be
used if we ever have to change the format again.

The second number is a hash of the current interfaces setting. It is
used to detect the case where nmbd is restarted on a machine after the
IP of the machine has changed (or the interfaces list has changed in
any way). When that happens we need to discard the old wins.dat cache
or you end up with chaos. This has bitten quite a few people, they
find that when they move a machine it continues using the old IP for
some things for the next week until the wins entries time out!

I've checked, and the old nmbd can handle the new format, although it
does spit out a spurious error message about the VERSION line. So
users can safely run 2.0alpha then switch back to 1.9.18 without
problems.
(This used to be commit c4a8cdc60a)
1998-08-30 05:43:59 +00:00
Andrew Tridgell
64578c0589 merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417)
1998-07-29 03:08:05 +00:00