1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-16 09:57:47 +03:00

99 Commits

Author SHA1 Message Date
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
dd2048c418 Removed bogus SAFE_FREE() call of talloced return data from
winbindd_lookup_usergroups()
-
Tim Potter
1dd462844a Fixed some indentation. -
Jeremy Allison
20a4167599 Set type to NOTUSED if lookup fail.
Jeremy.
-
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.... ;-)
-
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
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.
-
Tim Potter
ebd46aebf9 Merge from 2.2. -
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
ed16aa88a4 Added free_domain_info() function.
Get list of trusted domains if we haven't fetched them yet.
-
Tim Potter
4eeb7bcd78 Added some extra fields to the auth_serversupplied_info structure.
To obtain the full group membership of a user (i.e nested groups on a
win2k native mode server) it is necessary to merge this list of groups
with the groups returned by winbindd when creating an nt access token.

This breaks winbindd linking while AB and I sync up our changes to the
authentication subsystem.
-
Tim Potter
da2c167660 Don't reference tallocated memory that has already been disposed of. The
cli_samr_query_userinfo function used to do this.
-
Tim Potter
d52cd1854f Fixed some memory leaks introduced by connection handling rewrite, as well
as one memory leak that has been there for ages!

Changed the way talloc is used in get{pw,gr}nam routines.
-
Tim Potter
46fe5a8fb9 Converted some more functions to create and dispose of a talloc context on a
per-call basis rather than per-connection.

Had a bit more of a reformatting fest.

Still need to run it through insure and handle downed connections.
-
Tim Potter
5fc97e72eb Some reformatting. -
Tim Potter
3e9a80d5be Converted a few winbind functions to use a talloc context that is destroyed
immediately after the call.
-
Tim Potter
4f12df9fc5 Removed some unused code from the recent cleanup. -
Tim Potter
dc4ca0e0bd Got the rest of the group functions working. Did some reformatting (man
what was I thinking with those 4 character tabs?)

We now pass our winbindd test suite again!

Still to do:

 - talloc_ctx on a per winbindd request basis not per connection
 - clean up old crap we don't use any more
 - test against multiple BDCs (I know this isn't going to work - group/user
   handles have to be made against the same DC the domain and basic handles
   are.
 - implement network and dc failure recovery
-
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.
-
Simo Sorce
03dc67788f move to SAFE_FREE() -
Andrew Tridgell
f59826c0c9 more static/dead fns -
Andrew Tridgell
1e9815105e kill a dead fn and make a local one static -
Andrew Tridgell
c04c67fec8 more warning fixes on solaris -
Andrew Tridgell
dcd6e735f7 the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work -
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS -
Tim Potter
11f72a78e3 Added another authentication interface to winbindd. The Challenge Response
Authentication Protocol (CRAP) takes a tuple of (username, random
challenge, encrypted lm password, encrypted nt password) where the
passwords are encrypted with the random challenge ala ntlmssp.
-
Tim Potter
36413784ae Merged across rewritten version of winbindd_kill_connections(). This now
works much better with trusted domains whose DCs cannot be reached.

I'm pretty impressed with how much faster winbindd is in HEAD rather than
TNG.  A lot fewer unecessary name lookups are performed and it feels a lot
zippier now.
-
Andrew Tridgell
c2c1f2027e the nss and pam modules in winbind don't have strchr_m() yet, so use
strchr() for the moment
-
Andrew Tridgell
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. -
Tim Potter
8e982941d8 Merge from appliance branch:
Don't call find_domain_from_name() from winbindd_kill_connections() as
you get stuck in an infinite loop!
-
Andrew Tridgell
dbb770ecc6 don't use c++ style comments -
Tim Potter
03b1cab9a8 Memory leak fixes from insure. -
Tim Potter
a92a0d061b Compile fixes for dynamic samr_query_userinfo() stuff. -
Tim Potter
014859b62b Fixes from nsswitch testsuite. Lots of stuff works much better now. (-: -
Tim Potter
a7728bfa52 Misc fixes to get winbindd working. We can now do a 'getent passwd'
and 'getent group' and have most things working.
-
Tim Potter
873e672b90 OK so I couldn't be as clever as I wanted to be with winbindd_glue.c
so all the glue functions are prefixed with wb_ to avoid conflicts with
the old rpc_client stuff which is still a dependency of smbd/nmbd.
-
Tim Potter
59f95416b6 Preliminary merge of winbind into HEAD. Note that this compiles and links
but I haven't actually run it yet so it probably doesn't work.  (-:
-
Tim Potter
f866c18f6b Moved winbind client functions from various odd locations to
nsswitch/wb_client.c

Merge of nsswitch/common.c rename to nsswitch/wb_common.c from TNG.
-
Andrew Tridgell
0189af5442 use "winbind separator" in tng as well -
Andrew Tridgell
5a617c013c treat a blank "password server =" line as a "*" if in domain security -
Andrew Tridgell
92109d7b3c more merging voodoo
this adds "#define OLD_NTDOMAIN 1" in lots of places. Don't panic -
this isn't permanent, it should go after another few merge steps have
been done
-
Andrew Tridgell
d178c00aae more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
-
Andrew Tridgell
3fb862531a brought the winbindd code into head
this does not yet compile, but I'm working on that.
-