summaryrefslogtreecommitdiff
path: root/source4/auth
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r2857: this commit gets rid of smb_ucs2_t, wpstring and fpstring, plus lots ↵Andrew Tridgell1-0/+24
of associated functions. The motivation for this change was to avoid having to convert to/from ucs2 strings for so many operations. Doing that was slow, used many static buffers, and was also incorrect as it didn't cope properly with unicode codepoints above 65536 (which could not be represented correctly as smb_ucs2_t chars) The two core functions that allowed this change are next_codepoint() and push_codepoint(). These functions allow you to correctly walk a arbitrary multi-byte string a character at a time without converting the whole string to ucs2. While doing this cleanup I also fixed several ucs2 string handling bugs. See the commit for details. The following code (which counts the number of occuraces of 'c' in a string) shows how to use the new interface: size_t count_chars(const char *s, char c) { size_t count = 0; while (*s) { size_t size; codepoint_t c2 = next_codepoint(s, &size); if (c2 == c) count++; s += size; } return count; } (This used to be commit 814881f0e50019196b3aa9fbe4aeadbb98172040)
2007-10-10r2856: fixed a minor memory leak in the auth codeAndrew Tridgell1-50/+61
(This used to be commit 1b3c7d9cfa250d917a7fb96b315da9ed7d7a91d6)
2007-10-10r2798: get rid of a unnecessary staticAndrew Tridgell1-3/+5
(This used to be commit c3dfa7e8287811b4f54d58b45f5093521886b17e)
2007-10-10r2793: fixed the handling of primaryGroupID in auth_sam. There were two bugs,Andrew Tridgell1-2/+12
the first was it didn't pass primaryGroupID as an attributed it wanted, the second was it didn't cope with primaryGroupID not being present. (This used to be commit 8373bfcdeca13dcdce3081af420d8bb7d842ad18)
2007-10-10r2710: continue with the new style of providing a parent context wheneverAndrew Tridgell1-1/+1
possible to a structure creation routine. This makes for much easier global cleanup. (This used to be commit e14ee428ec357fab76a960387a9820a673786e27)
2007-10-10r2674: I have realised that talloc() should have its context marked const, asAndrew Tridgell1-2/+2
a const pointer really means that "the data pointed to by this pointer won't change", and that is certainly true of talloc(). The fact that some behind-the-scenes meta-data can change doesn't matter from the point of view of const. this fixes a number of const warnings caused by const data structures being passed as talloc contexts. That will no longer generate a warning. also changed the talloc leak reporting option from --leak-check to --leak-report, as all it does is generate a report on exit. A new --leak-report-full option has been added that shows the complete tree of memory allocations, which is is quite useful in tracking things down. NOTE: I find it quite useful to insert talloc_report_full(ptr, stderr) calls at strategic points in the code while debugging memory allocation problems, particularly before freeing a major context (such as the connection context). This allows you to see if that context has been accumulating too much data, such as per-request data, which should have been freed when the request finished. (This used to be commit c60ff99c3129c26a9204bac1c6e5fb386114a923)
2007-10-10r2669: convert make_user_info() and associated functions from malloc to tallocAndrew Tridgell1-50/+59
(This used to be commit 278cef77f083c002d17ecbbe18c20825a380eda3)
2007-10-10r2654: fixed some more server memory leaks. We are now down to a single leakAndrew Tridgell1-3/+15
of 16 bytes, caused by the 16 byte data_blob in the smb_signing code. (This used to be commit 2f1b788e09686e065d22f621f5c0c585192c6740)
2007-10-10r2650: fixed a memory leak in make_server_info()Andrew Tridgell5-8/+9
(This used to be commit 4aba6e7101041100f7d400abd5e7144b95528fc3)
2007-10-10r2648: - use a destructor on struct server_connection to simplify theAndrew Tridgell3-19/+15
connection termination cleanup, and to ensure that the event contexts are properly removed for every process model - gave auth_context the new talloc treatment, which removes another source of memory leaks. (This used to be commit 230e1cd777b0fba82dffcbd656cfa23c155d0560)
2007-10-10r2643: convert more of the auth subsyystem to the new talloc methods. ThisAndrew Tridgell3-30/+20
also fixes a memory leak found with --leak-check. (This used to be commit f19201ea274f0a542314c61c4af676197bf154ad)
2007-10-10r2621: - now that the client code is non-blocking, we no longer needAndrew Tridgell1-18/+0
write_data and read_data, which are inherently blocking operations - got rid of some old NBT keepalive routines that are not needed (This used to be commit e73b4ae4e500d3b7ee57e160e0f8b63c99b2542a)
2007-10-10r2543: Catch one more use of sub_get_remote_machine().Andrew Bartlett1-1/+2
Andrew Bartlett (This used to be commit d483d88674f1f130bc27c3de379753ae1799330e)
2007-10-10r2513: Avoid strupper/strlower when you can. This developers moduleAndrew Bartlett1-3/+1
certainly doesn't need it. Andrew Bartlett (This used to be commit 77d7c76c9bc7a4fa109056140a5f4107b4410838)
2007-10-10r2505: Remove unused function. If/when we implement plaintext authenticatonAndrew Bartlett1-56/+0
in Samba4, I want to redo this. Andrew Bartlett (This used to be commit 139cc702ac7ce0c6e3bfdfe37199299cc1bc53c2)
2007-10-10r2431: got rid of strnequal() in a couple of placesAndrew Tridgell1-1/+1
(This used to be commit a1b5880b2e548832eaf4a136aab1aead525c938f)
2007-10-10r2104: fixed typo that causes a segvAndrew Tridgell1-1/+1
(This used to be commit e37a4c1a63b914c46155d39c92f226c42a0393b7)
2007-10-10r2051: switched the samdb over to using the new destructor and referenceAndrew Tridgell1-13/+1
count features of talloc, instead of re-implementing both those features inside of samdb (which is what we did before). This makes samdb considerably simpler, and also fixes some bugs, as I found some error paths that didn't call samdb_close(). Those are now handled by the fact that a talloc_free() will auto-close and destroy the samdb context, using a destructor. (This used to be commit da60987a92266734c33b81ee217081abdc4330f3)
2007-10-10r1983: a completely new implementation of tallocAndrew Tridgell1-1/+1
This version does the following: 1) talloc_free(), talloc_realloc() and talloc_steal() lose their (redundent) first arguments 2) you can use _any_ talloc pointer as a talloc context to allocate more memory. This allows you to create complex data structures where the top level structure is the logical parent of the next level down, and those are the parents of the level below that. Then destroy either the lot with a single talloc_free() or destroy any sub-part with a talloc_free() of that part 3) you can name any pointer. Use talloc_named() which is just like talloc() but takes the printf style name argument as well as the parent context and the size. The whole thing ends up being a very simple piece of code, although some of the pointer walking gets hairy. So far, I'm just using the new talloc() like the old one. The next step is to actually take advantage of the new interface properly. Expect some new commits soon that simplify some common coding styles in samba4 by using the new talloc(). (This used to be commit e35bb094c52e550b3105dd1638d8d90de71d854f)
2007-10-10r1982: i is not initialised or usedAndrew Tridgell1-2/+1
(This used to be commit db4bc88f9aeaa59f08b9b447a8b2256c9c9c5fb0)
2007-10-10r1654: rename cli_ -> smbcli_Stefan Metzmacher2-50/+50
rename CLI_ -> SMBCLI_ metze (This used to be commit 8441750fd9427dd6fe477f27e603821b4026f038)
2007-10-10r1518: check for ldb_search giving -1 (indicating db corruption)Andrew Tridgell1-0/+3
(This used to be commit 9af821c4dfa47d68be5e062028331c80df64f82b)
2007-10-10r1498: (merge from 3.0)Andrew Bartlett1-1/+1
Rework our random number generation system. On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork(). For other systems, we now only re-seed after a fork, and on startup. No need to do it per-operation. This removes the 'need_reseed' parameter from generate_random_buffer(). This also requires that we start the secrets subsystem, as that is where the reseed value is stored, for systems without /dev/urandom. In order to aviod identical streams in forked children, the random state is re-initialised after the fork(), at the same point were we do that to the tdbs. Andrew Bartlett (This used to be commit b97d3cb2efd68310b1aea8a3ac40a64979c8cdae)
2007-10-10r1486: commit the start of the generic server infastructureStefan Metzmacher1-0/+5
the idea is to have services as modules (smb, dcerpc, swat, ...) the process_model don't know about the service it self anymore. TODO: - the smbsrv should use the smbsrv_send function - the service subsystem init should be done like for other modules - we need to have a generic socket subsystem, which handle stream, datagram, and virtuell other sockets( e.g. for the ntvfs_ipc module to connect to the dcerpc server , or for smb or dcerpc or whatever to connect to a server wide auth service) - and other fixes... NOTE: process model pthread seems to be broken( but also before this patch!) metze (This used to be commit bbe5e00715ca4013ff0dbc345aa97adc6b5c2458)
2007-10-10r1461: ntlm_check.c is a server-side peice of code, so it belongs in AUTH.Andrew Bartlett2-1/+449
Andrew Bartlett (This used to be commit 67ac9600664e93aa2fe9426127313b57ddaec2cf)
2007-10-10r1335: NT_STATUS_INTERNAL_DB_CORRUPTIONStefan Metzmacher1-2/+2
should cause DEBUG(0,(...)); metze (This used to be commit 80851e67783a9c3c8bdd7f2b52e0b46dd7b18d05)
2007-10-10r1334: remove unused stuffStefan Metzmacher1-11/+0
metze (This used to be commit 7a8786269b4f9e4962b51dd734171adf04021c15)
2007-10-10r1294: A nice, large, commit...Andrew Bartlett5-252/+24
This implements gensec for Samba's server side, and brings gensec up to the standards of a full subsystem. This means that use of the subsystem is by gensec_* functions, not function pointers in structures (this is internal). This causes changes in all the existing gensec users. Our RPC server no longer contains it's own generalised security scheme, and now calls gensec directly. Gensec has also taken over the role of auth/auth_ntlmssp.c An important part of gensec, is the output of the 'session_info' struct. This is now reference counted, so that we can correctly free it when a pipe is closed, no matter if it was inherited, or created by per-pipe authentication. The schannel code is reworked, to be in the same file for client and server. ntlm_auth is reworked to use gensec. The major problem with this code is the way it relies on subsystem auto-initialisation. The primary reason for this commit now.is to allow these problems to be looked at, and fixed. There are problems with the new code: - I've tested it with smbtorture, but currently don't have VMware and valgrind working (this I'll fix soon). - The SPNEGO code is client-only at this point. - We still do not do kerberos. Andrew Bartlett (This used to be commit 07fd885fd488fd1051eacc905a2d4962f8a018ec)
2007-10-10r1292: Add const to the subsystem/module registration code.Andrew Bartlett1-2/+9
Add some 'multi init' code, until we get a better set of infrustructure. Andrew Bartlett (This used to be commit 982422b2d286335378531ae9523e74192340af3c)
2007-10-10r1151: fixed fill-in of force_password_change field in auth_samAndrew Tridgell1-1/+1
(This used to be commit 9135f14540ded30892dc1f944aec1e8979a476e1)
2007-10-10r1146: initially zero server infoAndrew Tridgell1-0/+1
(This used to be commit c1aeaf97b39e1769bd43b21225094bb5128eaab4)
2007-10-10r1143: fixed spelling of sAMAccountNameAndrew Tridgell1-1/+1
(This used to be commit aadfbcee76a9181a540620f3b0827a3268b63a0e)
2007-10-10r1142: I think this should fix the interactive logins for tridge - don't takeAndrew Bartlett1-4/+4
sizeof() a pointer... Andrew Bartlett (This used to be commit c1019e6df6aa4fcce7dc2ccbd404a4254ab5d1fb)
2007-10-10r1138: allow for a user in no groupsAndrew Tridgell1-1/+2
(This used to be commit f9c1e12594e58b7e663ca099929eab8867b82a0c)
2007-10-10r1136: - added IDL for netr_LogonGetDomainInfo()Andrew Tridgell2-0/+6
- added workstation to auth_session_info in rpc servers - added session key fetch hook in crypto backends in dcesrv - store and fetch seed as well as a session key in schannel ldb - when a client uses schannel to setup a netlogon pipe connection we also need to setup the credentials from the schannel negotiation so credentials chaining works - added server side netr_LogonGetDomainInfo() call (This used to be commit a35459387de3b6a422c5af6f658338fc7e4314b0)
2007-10-10r1078: the dxesrv_crypto_* implementations should now explicit setStefan Metzmacher1-1/+15
the dce_conn->auth_state.session_info ( the ntlmssp one works fine, but the schannel one isn't implemented yet) this is also set by the ntvfs_ipc backend on the endpoint connect. metze (This used to be commit ad3dd1789e9f124493519cb4731d9f5a563fd051)
2007-10-10r1067: fix compiler warningsStefan Metzmacher2-2/+2
metze (This used to be commit e5d338821e590c49947a18a5d5c361122571988d)
2007-10-10r1063: userdom_struct dies!Andrew Bartlett2-5/+0
(Cleanup unused header definitions) Andrew Bartlett (This used to be commit 5941873f558c2af6ab5ef64e468acc8fab96ac01)
2007-10-10r1058: The start of work on the SamLogon call for NETLOGON.Andrew Bartlett5-109/+149
This starts to store information about the user in the server_info struct - like the account name, the full name etc. Also, continue to make the names of the structure elements in the logon reply more consistant with those in the SAMR pipe. Andrew Bartlett (This used to be commit 3ccd96bd945e0fd95e42c69ad8ff07055af2e62b)
2007-10-10r1028: More consistancy fixes, which should also fix the build.Andrew Bartlett1-2/+2
Andrew Bartlett (This used to be commit 0d2ae66d3a82134d86084f63c05214e03dfcb48b)
2007-10-10r1027: More rename:Andrew Bartlett1-48/+48
pwd -> password (should fix the build). Andrew Bartlett (This used to be commit f9280f956eef19ad1a39e120cb3ed0e3982fe7d5)
2007-10-10r1026: Spelling.Tim Potter1-1/+1
(This used to be commit b7fe73613acf5423b77fd91c56849351bf386960)
2007-10-10r1025: Rename (across the samr and netlogon pipes, so far)Andrew Bartlett1-2/+3
pwd -> password passwd -> password username -> account_name Also work on consistant structure feild names between these two pipes, and fix up some callers to use samr_Password for the netlogon credential code. Andrew Bartlett (This used to be commit 4e35418c2776f7b79be5b358ffd077754685d1ac)
2007-10-10r1023: Prepare the auth subsystem interfaces for netlogon SamLogon to use.Andrew Bartlett1-8/+20
Andrew Bartlett (This used to be commit b5fa2baaa9e110aa93107b13744e1fc5a64adbb5)
2007-10-10r1021: Because auth_serversupplied_info is not reference counted, this mayAndrew Bartlett1-0/+2
only be called once per authentication. Andrew Bartlett (This used to be commit 9a5de8de952a4e5c3eadccf42d034fa7cfd55171)
2007-10-10r1020: Add an (untested, until the other end is hooked in) method forAndrew Bartlett1-0/+28
obtaining the session_info from an NTLMSSP authenticated user. Andrew Bartlett (This used to be commit 7961f1a18d67a6a0cf2c61bcc1c3b42ed06176f7)
2007-10-10r1019: Push the auth subsystem away from using typedef, and over to the 'allAndrew Bartlett6-86/+117
goodness and light' struct ;-) Break apart the auth subsystem's return strucutres, into the parts that a netlogon call cares about, and the parts that are for a local session. This is the 'struct session_info' and it will almost completly replace the current information stored on a vuid, but be generic to all login methods (RPC over TCP, for example). Andrew Bartlett (This used to be commit d199697014d9562f9439a30b950fda798c5ef419)
2007-10-10r1001: in samba4 we don't(shouldn't) use typedef's anymore...Stefan Metzmacher2-11/+11
metze (This used to be commit ac5f6f7e511a730448012c8a709887827aea2281)
2007-10-10r995: - renamed many of our crypto routines to use the industry standardAndrew Tridgell1-2/+2
names rather than our crazy naming scheme. So DES is now called des_crypt() rather than smbhash() - added the code from the solution of the ADS crypto challenge that allows Samba to correctly handle a 128 bit session key in all of the netr_ServerAuthenticateX() varients. A huge thanks to Luke Howard from PADL for solving this one! - restructured the server side rpc authentication to allow for other than NTLMSSP sign and seal. This commit just adds the structure, the next commit will add schannel server side support. - added 128 bit session key support to our client side code, and testing against w2k3 with smbtorture. Works well. (This used to be commit 729b2f41c924a0b435d44a14209e6dacc2304cee)
2007-10-10r961: convert 'uchar' to 'uint8_t'Stefan Metzmacher3-14/+14
metze (This used to be commit 9f914e4af99e18b469d4cf9d8b1514a2bd28ddec)