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
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.
-
Jeremy Allison
ee5e7ca547 Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
-
Tim Potter
c80641b6f3 Removed unneeded extern. -
Andrew Bartlett
f70fb819b2 This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
	- Fully malloc'ed structures.
	  - Massive rework of the code so that all structures are made and destroyed
	    using malloc and free, rather than hanging around on the stack.
	- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
	   to be declared 'invalid' without the chance that people might get ROOT by
	   default.

	- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
	  appropriate place (probably domain_client_validate.c) in the future. They
	  don't belong in session setups.

	- Massive introduction of DATA_BLOB structures, particularly for passwords.

	- Use NTLMSSP flags to tell the backend what its getting, rather than magic
	  lenghths.

	- Fix winbind back up again, but tpot is redoing this soon anyway.

	- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
-
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.
-
Volker Lendecke
fd1d0064b3 Don't force winbind to use non-local DC's.
Volker
-
Andrew Bartlett
c95f5aeb93 This commit is number 4 of 4.
In particular this commit focuses on:

Actually adding the 'const' to the passdb interface, and the flow-on changes.

Also kill off the 'disp_info' stuff, as its no longer used.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes introduces a large dose of 'const' to the Samba tree.
There are a number of good reasons to do this:

	- I want to allow the SAM_ACCOUNT structure to move from wasteful
	pstrings and fstrings to  allocated strings.  We can't do that if
	people are modifying these outputs, as they may well make
	assumptions about getting pstrings and fstrings

	- I want --with-pam_smbpass to compile with a slightly sane
	volume of warnings, currently its  pretty bad, even in 2.2
	where is compiles at all.

	- Tridge assures me that he no longer opposes 'const religion'
	based on the ability to  #define const the problem away.

	- Changed Get_Pwnam(x,y) into two variants (so that the const
	parameter can work correctly): - Get_Pwnam(const x) and
	Get_Pwnam_Modify(x).

	- Reworked smbd/chgpasswd.c to work with these mods, passing
	around a 'struct passwd' rather  than the modified username

---

This finishes this line of commits off, your tree should now compile again :-)

Andrew Bartlett
-
Tim Potter
49d4723826 Hey where did those 4 character tabs come from? -
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
4f4dace577 Added some connection checking code. Doesn't work yet though. -
Tim Potter
d50005d4c1 Fix for fussy Solaris compiler. -
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
c6338d7eae Pass domain structure around in cache code rather than the domain name. -
Tim Potter
295dd2a581 Resurrected sam sequence number code.
Pass domain structure around in cache code rather than the domain name.

Some misc reformatting to make things look prettier.
-
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
d30939a091 fix some possible memleaks and not tested reallocs spotted by Andreas Moroder -
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Simo Sorce
03dc67788f move to SAFE_FREE() -
Tim Potter
d34fd8ec07 Some patches to authentication:
- the usersupplied_info now contains a smb_username (as it comes across on
   the wire) and a unix_username (after being passed through mapping
   functions)

 - when doing security={server,domain} use the smb_username, otherwise use
   the unix_username
-
Andrew Tridgell
fe6679dffb convert more code to use XFILE -
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
66698d6b84 fixed a bunch of compilation errors on Solaris, mostly people getting NSS_STATUS and WINBINDD error codes mixed up -
Andrew Tridgell
c65e8db7ae don't do pointer arithmetic on void* (some compilers can't do it) -
Andrew Tridgell
dcd6e735f7 the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work -
Gerald Carter
3e8ccb4202 merge from 2.2 -
Gerald Carter
2af0a65e4c merge from APPLIANCE_TNG -
Gerald Carter
aff66993e4 merge from APPLIANCE_TNG -
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS -
Herb Lewis
0768991d04 get rid of compiler warnings -
Tim Potter
b4e79ab34b Make domain_client_validate return a status code instead of a boolean. -
Tim Potter
19cd6a1dc4 Added copyright for me and AB. -
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.
-