1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-07 01:58:28 +03:00

366 Commits

Author SHA1 Message Date
Andrew Tridgell
a954f72fe3 make sure async dns nmbd child dies
samba-patches 898
-
Andrew Tridgell
ef04261e25 fix minor nits in nmbd from adtam@cup.hp.com
samba-patches 959
-
Andrew Bartlett
bea31062a2 I think this makes the debug statement clearer.
(but assumes that 'myip' is indeed our local IP...)

Andrew Bartlett
-
Andrew Tridgell
3e843d3015 the last WINS update broke self registration when we are a WINS
server. The real problem is all the special cases we had for when we
are a wins server as opposed to when we are using a 'real' wins
server.

This patch removes the special cases. We now accept non-broadcast
packets from ourselves and we use ourselves as a wins server when we
are one. This gets rid of the special cases and simplifies things
quite a bit.

It all seems to work, but there are bound to be problems found later.
-
Andrew Tridgell
2dc539ed33 fixed multi-homed re-registration of names when we are a WINS
server. We were rejecting them, leaving the name unregistered!
-
Andrew Tridgell
84d3b09b85 don't start the async dns process unless we actually need it!
(ie. check for lp_dns_proxy())
-
Andrew Tridgell
313f2c9ff7 The next phase in the WINS rewrite!
We now cope wiith multiple WINS groups and multiple failover servers
for release and refresh as well as registration. We also do the regitrations
in the same fashion as W2K does, where we don't try to register the next
IP in the list for a name until the WINS server has acked the previos IP.
This prevents us flooding the WINS server and also seems to make for much
more reliable multi-homed registration.

I also changed the dead WINS server code to mark pairs of IPs dead,
not individual IPs. The idea is that a WINS server might be dead from
the point of view of one of our interfaces, but not another, so we
need to keep talking to it on one while moving onto a failover WINS
server on the other interface. This copes much better with partial
LAN outages and weird routing tables.
-
Andrew Tridgell
e125f06058 This commit finally gives us multiple wins server groups. We now
accept an extended syntax for 'wins server' like this:

  wins server = group1:192.168.2.10 group2:192.168.3.99 group1:192.168.0.1

The tags before the IPs don't mean anything, they are just a way of
grouping IPs together. If you use the old syntax (ie. no ':') then
an implicit group name of '*' is used. In general I'd recommend people
use interface names for the group names, but it doesn't matter much.

When we register in nmbd we try to register all our IPs with each group
of WINS servers. We keep trying until all of them are registered with
every group, falling back to the failover WINS servers for each group
as we go.

When we do a WINS lookup we try each of the WINS servers for each group.
If a WINS server for a group gives a negative answer then we give up
on that group and move to the next group. If it times out then
we move to the next failover wins server in the group.

In either case, if a WINS server doesn't respond then we mark it dead
for 10 minutes, to prevent lengthy waits for dead servers.
-
Andrew Tridgell
1324f0c185 we never pass any userdata when doing name registrations on the
unicast subnet, so remove that parameter. That frees up userdata so I
can start using it to indicate which wins server tag we are
registering (more about wins 'tags' later ...)
-
Andrew Tridgell
a049360d5b - completely rewrote the wins_srv.c code. It is now much simpler, and
gives us a good grounding to properly support multiple wins servers
for different interfaces (which will be coming soon ...)

- fixed our wins registration failover code to actually do failover!
We were not trying to register with a secondary wins server at all
when the primary was down. We now fallback correctly.

- fixed the multi-homed name registration packets so that they work
even in a non-connected network (ie. when one of our interfaces is not
routable from the wins server. Yes, this really happens in the real
world).
-
Andrew Tridgell
612ae53132 when nmbd starts up it is possible that dhcp hasn't started the local
interfaces yet. Instead of giving up, nmbd will now wait for some
interfaces to appear
-
Gerald Carter
29874f4b8f compile warngin fixes merged from 2.2 -
Gerald Carter
e671b7fe9d merge from 2.2 -
Jean-François Micouleau
c33459f701 nmbd handle shutdown message.
J.F.
-
Jeremy Allison
f25fcd99fa Fix to stop PERMANENT_NAMES being added when nmbd starts up and WINS
server is down. Keep adding refreshible names instead.
Jeremy.
-
Jeremy Allison
1c4a00dcc1 Make winbindd_idmap tdb endian independent. This is very important for
sharing between machines with rsync.
Finally removed tdb_store_int/tdb_fetch_int.
Now only tdb_store_int32/tdb_fetch_int32 which are endian independent
are allowed.
Jeremy.
-
Martin Pool
098905bea2 Add assertions that kill() is never accidentally passed a non-positive
pid.  This follows a bug in rsync where it would accidentally
kill(-1), removing all the user's processes.  I can't see any way this
would directly happen in Samba, but having the assertions seems
beneficial.

http://cvs.samba.org/cgi-bin/cvsweb/rsync/util.c.diff?r1=1.108&r2=1.109&f=h
-
Tim Potter
472acd89b2 Removed unused static function. -
Jeremy Allison
166d2a6144 Cause nmbd to take signal processing in-band, rather than in
signal handlers. THIS NEEDS TESTING !
Jeremy.
-
Jeremy Allison
3af16ade17 Fix from Michael Steffens <michael_steffens@hp.com> to make signal
processing work correctly in winbindd. This is a really good patch
that gives full select semantics to the Samba modified select.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jean-François Micouleau
b902e087d0 rewrote nmbd's wins backend to use a tdb instead of a flat text file.
Changed the way the wins record are handled in memory. Now they are living
much longer with the different states: active, released and tombstone.
Also added a version ID, some wins flags and the wins owner ip address to
the namrec->data struct, and a function to process messages sent by the
wins replication daemon.

the initiate_wins_processing() function is not correct, I'll fix it later.

        J.F.
-
Jean-François Micouleau
ca7665c6b3 remove unused variable
J.F.
-
Jeremy Allison
7d05175494 Ensure (C) message is output on startup.
Jeremy.
-
Jeremy Allison
85da18e46e Tidyup & code refactoring from Martin.Sheppard@csiro.au.
Jeremy.
-
Jeremy Allison
4e41780c21 Fix name register bug with non-existent wins server.
Jeremy.
-
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
-
Jeremy Allison
fffae94dd5 When running interactive we want to set our own process group for
signal management.
Jeremy.
-
Jeremy Allison
9343b613d3 Fixup -i interactive modes.
Jeremy.
-
Martin Pool
22e510ea0d Add an output parameter to message_send_all that says how many
messages were sent, so you know how many replies to expect.

Const and doc religion.
-
Jeremy Allison
0bea6cf79a Removed global debugf. Replaced with lp_set_logfile(name).
Fixed winbindd to finally stop leaving log. file droppings :-).
Jeremy.
-
Andrew Tridgell
1a30efdc2c added -i option to nmbd, giving interactive mode (like winbindd) -
Tim Potter
778f5f77a6 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);
-
Tim Potter
8fc772c9e5 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
-
Martin Pool
a779710fff LMHOSTSFILE is now dynamically configured too. -
Martin Pool
79ec88f0da Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
-
Jeremy Allison
129c640810 Fixed WINS re-registration bug. Don't ask..... :-(. It was in my code :-).
Jeremy.
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Volker Lendecke
69a3277fc5 How often did I read the CVS commit message
"Always compile before commit" :-((

Volker
-
Volker Lendecke
50ea73426f From 2.2.
Volker
-
Simo Sorce
1446a1562b move to SAFE_FREE() -
Andrew Tridgell
fd24265c06 convert more code to use XFILE -
Andrew Tridgell
fe6679dffb convert more code to use XFILE -
Andrew Tridgell
f41c3bb80f declare dbf in one spot -
Andrew Tridgell
1af8bf34f1 replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems

I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
-
Andrew Tridgell
c26e0d3f27 got rid of USE_TDB_MMAP_FLAG as its not needed any more -
Herb Lewis
c105859304 merge profile data changes from 2.2 -
Tim Potter
b7cf14bf84 Send a MSG_SMB_SAM_REPL when a UAS/SAM change netlogon message is
received.
-
Christopher R. Hertel
5b975d3a9c Same as nmbd.c. These now test wins_srv_count() instead of lp_wins_server
to determine whether the 'wins server' parameter is set.
-
Christopher R. Hertel
0777ebc04b Instead of checking lp_wins_server() to see if a WINS server was specified,
nmbd now calls wins_srv_count().  This returns the number of WINS servers
specified in the 'wins server' parameter.  The return value will be zero if
'wins server' is not specified.

Quick change to make room for WINS failover.
-