1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

329 Commits

Author SHA1 Message Date
Jelmer Vernooij
8a6b05d36d Add more options to popt_common and use them. Current ones are:
-V Version information
 -n Set netbios name
 -l Set directory to store log files in
 -d Set debuglevel
 -s Load specified configuration file
 -O Set socket options
(This used to be commit 1602d58949)
2002-11-02 16:16:15 +00:00
Jelmer Vernooij
6c589bfb76 Convert to popt
(This used to be commit 9ea7440ac4)
2002-11-02 00:44:19 +00:00
Jeremy Allison
5bf57880e7 Ensure we register the 1c name on the unicast subnet.
Jeremy.
(This used to be commit ca6146c2d3)
2002-10-08 18:24:12 +00:00
Andrew Tridgell
c1346cdca9 fixed 3 bugs in the wins server code related to precedence of ! and &
in C

please note that:
 if (! a & b)
is not the same as:
 if (! (a & b))
(This used to be commit ec6a098c2e)
2002-10-03 13:28:44 +00:00
Jeremy Allison
96cf2abf9d Patch from Andy Levine andyl@epicrealm.com who discovered that W2K DMB's
return empty NetServerEnum2 on port 445, but not on port 139.
Jeremy.
(This used to be commit a9112a1e4b)
2002-09-10 17:24:17 +00:00
Herb Lewis
f5a4487df5 fix for difference in strsep and strtok semantics
(This used to be commit 51e0a4adc7)
2002-08-22 10:33:21 +00:00
Herb Lewis
2d05704d0e fix irix compile errors - cannot initialize array in declaration statement
with non-const values - strsep not defined
(This used to be commit a5c59b2cd1)
2002-08-20 18:43:59 +00:00
Tim Potter
298f956eaf The unused variable was actually needed. The correct fix is to move
it inside an #ifdef HAVE_ADS to avoid the warning and breaking the
build.  (-:
(This used to be commit a8c4febdb7)
2002-08-15 22:03:22 +00:00
Tim Potter
14c7250ab4 Removed unused variable.
(This used to be commit 23f1b839e6)
2002-08-15 19:34:57 +00:00
Andrew Bartlett
dd5615c042 Make 'remote_machine' private to lib/substitute.c, and fix all the user to use
the new accessor functions.

Andrew Bartlett
(This used to be commit f393de2310)
2002-08-11 02:30:35 +00:00
Jim McDonough
6cfff280d8 Add AD version of samlogon replies for getdc. ATM it will only function
if you have an ADS DC.
(This used to be commit 059a352ebb)
2002-08-06 18:16:28 +00:00
Jim McDonough
60078160de Fix length on mailslots. Looks like it should have been 0x17, not decimal 17.
(This used to be commit 8e906a9481)
2002-08-02 17:44:02 +00:00
Andrew Tridgell
c76ab193dc this is an interim fix for nmbd not registering DOMAIN#1b with WINS
when a PDC. The fix does not iterate over all WINS tags, which it
should do, but after having looked at doing that it gets *very* messy
to do with our current code base.
(This used to be commit 434e5124db)
2002-07-28 07:15:42 +00:00
Andrew Tridgell
4b68935a51 make sure async dns nmbd child dies
samba-patches 898
(This used to be commit a954f72fe3)
2002-07-28 06:26:41 +00:00
Andrew Tridgell
ed9a219c87 fix minor nits in nmbd from adtam@cup.hp.com
samba-patches 959
(This used to be commit ef04261e25)
2002-07-28 06:19:14 +00:00
Andrew Bartlett
f9558e5819 I think this makes the debug statement clearer.
(but assumes that 'myip' is indeed our local IP...)

Andrew Bartlett
(This used to be commit bea31062a2)
2002-07-26 10:25:08 +00:00
Andrew Tridgell
7f42c53971 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.
(This used to be commit 3e843d3015)
2002-07-09 14:17:26 +00:00
Andrew Tridgell
d4c3fd3d0d fixed multi-homed re-registration of names when we are a WINS
server. We were rejecting them, leaving the name unregistered!
(This used to be commit 2dc539ed33)
2002-07-01 07:19:12 +00:00
Andrew Tridgell
cf634de37b don't start the async dns process unless we actually need it!
(ie. check for lp_dns_proxy())
(This used to be commit 84d3b09b85)
2002-07-01 07:15:13 +00:00
Andrew Tridgell
223ddc3f2d 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.
(This used to be commit 313f2c9ff7)
2002-06-27 14:37:17 +00:00
Andrew Tridgell
caeaa0acb0 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.
(This used to be commit e125f06058)
2002-06-26 12:17:11 +00:00
Andrew Tridgell
38bd5bf9eb 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 ...)
(This used to be commit 1324f0c185)
2002-06-26 08:58:03 +00:00
Andrew Tridgell
07f35f68e0 - 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).
(This used to be commit a049360d5b)
2002-06-26 06:44:37 +00:00
Andrew Tridgell
31cac044a3 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
(This used to be commit 612ae53132)
2002-06-19 00:21:38 +00:00
Gerald Carter
7b60e23040 compile warngin fixes merged from 2.2
(This used to be commit 29874f4b8f)
2002-06-17 15:33:13 +00:00
Gerald Carter
2bba2d15c6 merge from 2.2
(This used to be commit e671b7fe9d)
2002-05-28 14:49:00 +00:00
Jean-François Micouleau
3e0c6ded65 nmbd handle shutdown message.
J.F.
(This used to be commit c33459f701)
2002-03-29 13:58:32 +00:00
Jeremy Allison
63cbe1be9a Fix to stop PERMANENT_NAMES being added when nmbd starts up and WINS
server is down. Keep adding refreshible names instead.
Jeremy.
(This used to be commit f25fcd99fa)
2002-03-29 00:57:35 +00:00
Jeremy Allison
67d21b5a4b 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.
(This used to be commit 1c4a00dcc1)
2002-03-21 23:39:17 +00:00
Martin Pool
75722fa183 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
(This used to be commit 098905bea2)
2002-03-20 06:57:03 +00:00
Tim Potter
db4dd16d8d Removed unused static function.
(This used to be commit 472acd89b2)
2002-03-05 00:46:41 +00:00
Jeremy Allison
a93740935f Cause nmbd to take signal processing in-band, rather than in
signal handlers. THIS NEEDS TESTING !
Jeremy.
(This used to be commit 166d2a6144)
2002-03-01 02:57:52 +00:00
Jeremy Allison
69adbb0ce3 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.
(This used to be commit 3af16ade17)
2002-01-31 23:26:12 +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
Jean-François Micouleau
558e4cf0b8 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.
(This used to be commit b902e087d0)
2002-01-25 22:50:15 +00:00
Jean-François Micouleau
a2cff140cf remove unused variable
J.F.
(This used to be commit ca7665c6b3)
2002-01-25 17:03:36 +00:00
Jeremy Allison
efdb29d0e0 Ensure (C) message is output on startup.
Jeremy.
(This used to be commit 7d05175494)
2002-01-18 03:26:53 +00:00
Jeremy Allison
9d05373a76 Tidyup & code refactoring from Martin.Sheppard@csiro.au.
Jeremy.
(This used to be commit 85da18e46e)
2002-01-18 02:30:37 +00:00
Jeremy Allison
24bdb14564 Fix name register bug with non-existent wins server.
Jeremy.
(This used to be commit 4e41780c21)
2002-01-16 19:23:05 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Jeremy Allison
bb81e23e17 When running interactive we want to set our own process group for
signal management.
Jeremy.
(This used to be commit fffae94dd5)
2001-12-30 01:46:38 +00:00
Jeremy Allison
0d6a1c0998 Fixup -i interactive modes.
Jeremy.
(This used to be commit 9343b613d3)
2001-12-29 21:13:53 +00:00
Martin Pool
bf65820af2 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.
(This used to be commit 22e510ea0d)
2001-12-21 00:37:49 +00:00
Jeremy Allison
9ed10f83d7 Removed global debugf. Replaced with lp_set_logfile(name).
Fixed winbindd to finally stop leaving log. file droppings :-).
Jeremy.
(This used to be commit 0bea6cf79a)
2001-12-20 22:27:05 +00:00
Andrew Tridgell
a3e74d16d0 added -i option to nmbd, giving interactive mode (like winbindd)
(This used to be commit 1a30efdc2c)
2001-11-27 03:40:06 +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
79b34d1b11 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.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Martin Pool
8654a161c8 LMHOSTSFILE is now dynamically configured too.
(This used to be commit a779710fff)
2001-11-19 03:12:10 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Jeremy Allison
f5a5acec33 Fixed WINS re-registration bug. Don't ask..... :-(. It was in my code :-).
Jeremy.
(This used to be commit 129c640810)
2001-10-08 19:39:07 +00:00