1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

35 Commits

Author SHA1 Message Date
Andrew Bartlett
c552910477 I just noticed that I never added my copyright when I messed with this
previously.  Fix that.

Andrew Bartlett
-
Andrew Bartlett
23689b0746 Update cli_full_connection() to take a 'flags' paramater, and try to get a
few more places to use it.

Andrew Bartlett
-
Simo Sorce
897e64d2e0 more debug classess activated -
Andrew Bartlett
c205b18bd6 Remove the password length paramater from cli_full_connection - it really
didn't make any sense, and its was always just strlen(password) anyway.

This fixes it to be strlen(password)+1

Andrew Bartlett
-
Jeremy Allison
5de792e7e9 Fixed the handle leak in the connection management code (this code is crap
and should be rewritten, just not now... :-).
Jeremy.
-
Andrew Bartlett
8e705dd921 Various winbind updates:
- pam_winbind updates from vance, fixing a typo and making some the options
  work properly.

- Extra parinoia in the winbind connection loop

- Allow pam_winbind to compile on HP-UX (Don Mcall, more work to do).

- Fix up configure.in to use the same method for building the test .so
  as the Makefile uses.

Andrew Bartlett
-
Andrew Bartlett
f4f23fad60 Fix a double-free bug in wbinfo -t's call in winbindd.
I forgot to clean this up when netlogon move across to the connection cache
arrangement.

Also add some smb_panics to the connection_ok() code to try to catch this kind
of thing better in future.

Andrew Bartlett
-
Andrew Bartlett
ef68b28fa0 Allow us to see the difference between these two errors. (We need to chase
down some bugs with it...).

Andrew Bartlett
-
Tim Potter
1f007d3ed4 Renamed get_nt_error_msg() to nt_errstr(). -
Andrew Tridgell
967cb3ed0c always make winbindd try for the PDC first before trying for a BDC
this prevents propogation delays in the SAM between the PDC and BDCs
-
Andrew Bartlett
ac8c24a9a8 Allow Samba to trust NT4 Domains.
This commit builds on the auth subsystem to give Samba support for trusting NT4
domains.  It is off by default, but is enabled by adding 'trustdomain' to the
'auth methods' smb.conf paramater.

Tested against NT4 only - there are still some issues with the join code for
Win2k servers (spnego stuff).

The main work TODO involves enumerating the trusted domains (including the RPC
calls to match), and getting winbind to run on the PDC correctly.

Similarly, work remains on getting NT4 to trust Samba domains.

Andrew Bartlett
-
Jeremy Allison
8ed49fe0df Ensure that winbindd and smbd both use identical logic to find dc's.
Fix bug where zeroip addresses were being checked.
Jeremy.
-
Andrew Bartlett
92cbefdf27 Winbind cleanup.
This patch fixes the segfaults I introduced in the previous conneciton caching
patch.  It cleans up the connection cache a *lot* - in particular it adds
significant robustness to the operation.

If a the DC goes down, we no longer fail the next operation - the code checks
if the connection died during one of its own operations on the socket, and
restarts the conneciton as required.

There is still a memory leak in here somewhere - but this code also cleans up a
number of these.

Also added is the abilty to sepecify the domain of the 'get around restrict anonymous'
user that winbind uses.

Andrew Bartlett
-
Andrew Bartlett
49d3e47666 A few small winbind updates:
Add a connection cache to the netlogon pipe.  This makes a *massive* difference
to the time-per-auth.  Also fix up *some* of the memory leaks in other
connection caches.

Add some debugging messages for the is_connected() code.  I'm thinking we
should get a client implementation of SMBecho and call it here - as it would
allow us to always know the DC is around before we start.

Down the debug level for some of the pam_winbind code - I'll probably down it
further when I'm finished debugging.

Andrew Bartlett
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Tim Potter
1f7172b48e Removed dodgy init of local variable. -
Tim Potter
fc7ed1b4a8 Much more useful handling of backup domain controllers in winbindd. Honour
the "password server" smb.conf parameter when choosing a DC to connect to.

Due to the origin of the code in cm_get_dc_name() it wouldn't try
additional DCs if the first DC didn't work.  This would wedge winbindd if you
had "password server = foo1, foo2" and foo1 was down.
-
Simo Sorce
6b123adda9 fixes (asprintf) from 2.2 -
Andrew Bartlett
4609edcac3 Further rpc_client removal, this time from winbindd.
Also removed the dependency on auth_util.o, which makes things nicer.

Finally, this kills off the NECESSARY_BECAUSE_SAMBA_DEPENDENCIES_ARE_SO_BROKEN_OBJ
makefile variable - becouse Samba dependencies are starting to be sane again!

Andrew Bartlett
-
Tim Potter
1217ef28a6 Modify winbindd to use authenticated user info from secrets.tdb when making
IPC$ connections to domain controllers.
-
Andrew Tridgell
0216b0fca1 The beginnings of alternative backends for winbindd
This just splits off the dispinfo call behind a methods structure.
I'll split off a few more functions soon, then we will be ready for
LDAP replacement methods
-
Tim Potter
4215048f7b I think the lookup_pdc_name() should be called lookup_dc_name() and the
name_status_find() call here should look up a #1c name instead of #1d.
This fixes some bugs currently with BDC authentication in winbindd and in
smbd as you can't query the #1d name with the ip address of a BDC.

Who is Uncle Tom Cobbley anyway?
-
Tim Potter
6446d2acd5 Some reformatting.
M-x tabify
-
Andrew Tridgell
b599947348 don't die with a FPE if there are no DCs -
Tim Potter
8f01a8b078 Fixed check machine account function. -
Jeremy Allison
5e8df83ba9 Tidyup formatting a bit (spaces->tabs) whilst reading new code to understand
connection caching. Getting ready for back-merge to 2.2.3.
Jeremy.
-
Tim Potter
77c287e946 Caching user, group and domain sam handles was a stupid idea.
Now we just keep a record of the open pipes.
-
Tim Potter
e07bcfcccd Cache positive and negative name domain controller lookups.
Cache negative connection attempt lookups.

Fixed loginc bug in connection_ok()
-
Tim Potter
caef54e400 Random connection robustness related fixes. Display some debugs about
the currently open connections when winbindd receives a USR1 signal.

Hmm - I've just realised this will conflict with the messaging code
but we don't use that yet.
-
Tim Potter
d85aa1ce83 Use cli_nt_login_network() instead of domain_client_validate() to perform
pam authentication.  This allows us to link in less other crap.

Authenticating with a challenge/response doesn't seem to work though - we
always get back NT_STATUS_WRONG_PASSWORD.
-
Volker Lendecke
fd1d0064b3 Don't force winbind to use non-local DC's.
Volker
-
Tim Potter
4f4dace577 Added some connection checking code. Doesn't work yet though. -
Tim Potter
63731d4a00 Implemented sam group handle stuff. getent group now works. -
Tim Potter
4f8ea87787 More work on winbindd connection rewrite:
- implemented some of the sam related connection manager routines
 - fill in group id and gecos fields for getpwnam/getpwuid routines
 - convert querydispinfo to cm
 - getent passwd now works

Now for the group related routines...
-
Tim Potter
c369cf5af7 This is the start of a bit of a rewrite of winbindd's connection handling.
I've wrapped up all the decisions about managing, making and closing
connections into a connection manager in nsswitch/winbindd_cm.c.

It's rather incomplete at the moment - only querying basic user info works
at the moment (i.e finger -m DOMAIN/user) and everything else is broken.

Jeremy, please take a look and I'll start moving across the rest of
winbindd to this new system.
-