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

345 Commits

Author SHA1 Message Date
Andrew Tridgell
7de670cd15 added very basic ads connection cacheing -
Andrew Tridgell
60b5d4432a plugged most of the memory leaks -
Andrew Tridgell
fad564c177 added the last winbindd/ads backend function
winbindd is now fully functional with a native mode w2k server

now for the memory leaks and speed ...
-
Andrew Tridgell
7d44aa3915 finally worked out how to do ldap lookups by binary blobs, so I can
now do searches on SID. This allows me to do a true ldap sid_to_name()
function

one one function to go!
-
Jeremy Allison
9563de2ef8 Fixed parse_domain_user to be bool.
Jeremy.
-
Jeremy Allison
9b7182a9da Correct message on wbinfo fail to open config file.
Jeremy.
-
Andrew Tridgell
43edeaca9f added lookup_groups() to the ads backend
winbindd/ADS can now do initgroups()
-
Andrew Tridgell
689f45d207 moved lookup_usergroups() into the backend structure -
Andrew Tridgell
088f4cc5be added a query_user backend
fixed a winbindd crash when the group membership can't be looked up
-
Andrew Tridgell
80010d80f9 changed query_dispinfo to query_user_list -
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. -