1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

185 Commits

Author SHA1 Message Date
Andrew Tridgell
789833b44e put sid_to_name behind the winbindd backend interface
I spent quite a while trying to work out how to make this call
via ldap and failed. I then found that MS servers seem use rpc
for sid_to_name, and it works even when in native mode, I ended
up just implementing it via rpc
-
Andrew Tridgell
816e40a51a added name_to_sid to the backend -
Andrew Tridgell
88241cab98 added a basic ADS backend to winbind. More work needed, but at
least basic operations work
-
Andrew Tridgell
aee19090d3 fixed the nsswitch initgroups code
added a nsstest test program that directly tests all the nss
interfaces using dlopen()
-
Andrew Tridgell
e4ccc602ba split winbindd_enum_dom_groups into the new backend structure
also created winbindd_rpc.c which contains the functions that
have been converted to the new structure. There will soon be
a winbindd_ads.c for the ldap backend
-
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
-
Jeremy Allison
fceba7dea5 Added negative caching to group lookups.
Jeremy.
-
Jeremy Allison
4013ae87a1 Added negative caching to the user pw lookup by name and by uid.
Jeremy.
-
Jeremy Allison
014b0973a3 nsswitch/winbindd_group.c nsswitch/winbindd_user.c: formatting fixups.
smbd/open.c: Fix "delete on close" for directories.
Jeremy.
-
Andrew Tridgell
b599947348 don't die with a FPE if there are no DCs -
Tim Potter
4ab9ca31a0 Another merge from appliance-head: in [ug]id_to_sid don't call the
winbind function if the id is obviously going to be local.  Cleanup
of winbind [ug]id parameter handling.
-
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
dd2048c418 Removed bogus SAFE_FREE() call of talloced return data from
winbindd_lookup_usergroups()
-
Tim Potter
1dd462844a Fixed some indentation. -
Andrew Bartlett
8d31eae52a This is another rather major change to the samba authenticaion
subystem.

The particular aim is to modularized the interface - so that we
can have arbitrary password back-ends.

This code adds one such back-end, a 'winbind' module to authenticate
against the winbind_auth_crap functionality.  While fully-functional
this code is mainly useful as a demonstration, because we don't get
back the info3 as we would for direct ntdomain authentication.

This commit introduced the new 'auth methods' parameter, in the
spirit of the 'auth order' discussed on the lists.  It is renamed
because not all the methods may be consulted, even if previous
methods fail - they may not have a suitable challenge for example.

Also, we have a 'local' authentication method, for old-style
'unix if plaintext, sam if encrypted' authentication and a
'guest' module to handle guest logins in a single place.

While this current design is not ideal, I feel that it does
provide a better infrastructure than the current design, and can
be built upon.

The following parameters have changed:
 - use rhosts =

  This has been replaced by the 'rhosts' authentication method,
 and can be specified like 'auth methods = guest rhosts'

 - hosts equiv =

  This needs both this parameter and an 'auth methods' entry
  to be effective.  (auth methods = guest hostsequiv ....)

 - plaintext to smbpasswd =

  This is replaced by specifying 'sam' rather than 'local'
  in the auth methods.

The security = parameter is unchanged, and now provides defaults
for the 'auth methods' parameter.

The available auth methods are:

guest
rhosts
hostsequiv
sam (passdb direct hash access)
unix (PAM, crypt() etc)
local (the combination of the above, based on encryption)
smbserver (old security=server)
ntdomain (old security=domain)
winbind (use winbind to cache DC connections)


Assistance in testing, or the production of new and interesting
authentication modules is always appreciated.

Andrew Bartlett
-
Jeremy Allison
a58d0f91f9 Fixed delete on close bug. Added core dump code to winbindd.
Jeremy.
-
Jeremy Allison
20a4167599 Set type to NOTUSED if lookup fail.
Jeremy.
-
Tim Potter
72060a6f5a Got rid of that stupid parse_domain_user() warning when compiling
winbindd.
-
Martin Pool
61dba52a54 Finish 1.45 by removing redundant sid->string conversion in
winbindd_lookup_sid_by_name.  Also if the lookup fails then clobber
the output parameters rather than leaving them looking potentially
valid.

Add doxygen.
-
Martin Pool
1393c7c4ed I think you were passing the name of the SID, rather than the DOM_SID
pointer itself.  (Whatever that is.... ;-)
-
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.
-
Tim Potter
8f01a8b078 Fixed check machine account function. -
Jeremy Allison
9f8c644abc Got positive and negative name caching working correctly with lookupname/lookupsid.
There was a bug in cli_lsa_lookup_name/lookup_sid where NT_STATUS_NONE_MAPPED was
being mapped to NT_STATUS_OK, and also the *wrong* number of entries mapped
was being returned. The correct field is mapped_count, *NOT* num_entries.
Jeremy.
-
Jeremy Allison
7883a2288a Fixed +ve caching. Still problems with -ve caching.
Jeremy.
-
Jeremy Allison
d039d4fa50 Fixed caching of lookupname/lookupsid. Error in check of success !
Jeremy.
-
Jeremy Allison
d3f5d5a4ac Added debugs to track down sequence lookup problems.
Jeremy.
-
Jeremy Allison
54c968913d W2K doesn't seem to respond to *#0 names in node status. Ensure name
lookup uses password server parameter when looking for PDCs.
Jeremy.
-
Jeremy Allison
b16bb21d37 Added transparent +ve caching for lookupname/lookupsid. -ve caching can
be easily added (a one liner) once we know the correct error codes returned
by a W2K DC.
All other winbindd calls should go through a similar transparent caching layer
(and will soon).
Jeremy.
-
Jeremy Allison
1f6cc536b2 Preparing to implement +ve and -ve caching for lookupname/lookupsid calls.
Jeremy.
-
Tim Potter
ebd46aebf9 Merge from 2.2. -
Martin Pool
79ec88f0da Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
-
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
3ac32af838 Jeremy, I'm not sure what you were trying to do with the process activity
loop in winbindd but it didn't work.
-
Tim Potter
ed16aa88a4 Added free_domain_info() function.
Get list of trusted domains if we haven't fetched them yet.
-
Tim Potter
1a9a361591 Added free_domain_info() function. -
Tim Potter
e07bcfcccd Cache positive and negative name domain controller lookups.
Cache negative connection attempt lookups.

Fixed loginc bug in connection_ok()
-
Tim Potter
1876632100 Get list of trusted domains if we haven't fetched them yet. -
Tim Potter
a7ef2d20b1 Fixed display of uninitialised buffer in debug.
Get list of trusted domains if we haven't fetched them yet.
-
Tim Potter
1212591095 Bit of a cleanup of signal handling code.
Ignore the SIGUSR1 signal before we install a handler for it as glibc (?)
seems to just print out "User defined signal 1" and exit if no handler
is installed.
-
Jeremy Allison
a55a63a4ca Fix detection of RedHat 7.2.
Remove unused old file.
Test 42 byte reply to SMBntcreate (W2K does this).
Jeremy.
-
Jeremy Allison
a9f7974cb8 Make signal handling safer (handle EINTR on read/write/accept), don't
call slprintf within a signal handler.
Jeremy.
-
Jeremy Allison
22e323ca47 Got ready to implement Martin's idea, but request doesn't have a length
field.... well, now at least the code is there when it does :-).
Jeremy.
-
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.
-
Martin Pool
8952f8763e #ifdef'd out suggestion for tim on making the winbindd protocol more
robust.
-
Jeremy Allison
804f232398 Added needed debugs...
Jeremy.
-
Jeremy Allison
86b7cf7f85 Fix winbind client code so that winbind calls are not made if the
requested name does not have a winbind separator character. This
makes the intent explicit. Tim, contact me if this is not what
you indended.
Jeremy.
-
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.
-