summaryrefslogtreecommitdiffstats
path: root/source3/auth
Commit message (Collapse)AuthorAgeFilesLines
* added cli_net_auth_3 client code.Jean-François Micouleau2002-08-301-1/+2
| | | | | | | | | | | changed cli_nt_setup_creds() to call cli_net_auth_2 or cli_net_auth_3 based on a switch. pass also the negociation flags all the way. all the places calling cli_nt_setup_creds() are still using cli_net_aut2(), it's just for future use and for rpcclient. in the future we will be able to call auth_2 or auth_3 as we want. J.F. (This used to be commit 4d38caca40f98d0584fefb9d66424a3db5b5789e)
* We don't need the RTLD_GLOBAL.Andrew Bartlett2002-08-291-1/+1
| | | | (This used to be commit 0d562b81bfd176111a1046560c39b03d986f90ec)
* Updates!Andrew Bartlett2002-08-261-1/+4
| | | | | | | | | | | | - Don't print an uninitialised buffer in service.c - Change some charcnv.c functions to take smb_ucs2_t ** instead of void ** - Update NTLMv2 code to use dynamic buffers - Update experimental SMB signing code - still more work to do - Move sys_getgrouplist() to SAFE_FREE() and do a DEBUG() on initgroups() failure. Andrew Bartlett (This used to be commit de1964f7fa855022258a84556b266100b917444b)
* Try to support non-root-mode systems without getgrouplist().Andrew Bartlett2002-08-262-8/+10
| | | | | Andrew Bartlett (This used to be commit 17096315a0f30f946ddecb79708604a111c37011)
* Spelling fixes.Tim Potter2002-08-221-4/+4
| | | | (This used to be commit 24fa84bda49a3a77fbc092652a0b6b132f06ff7c)
* Cope with non-unix accounts - we just won't get the groups for those users.Andrew Bartlett2002-08-211-2/+4
| | | | | Andrew Bartlett (This used to be commit 7cad7814555645aa3bee95fb48fbd694e6a9e313)
* Based orginally by work by Kai, this patch moves our NT_TOKEN generation intoAndrew Bartlett2002-08-205-107/+408
| | | | | | | | | | | | | | | | our authenticaion code - removing some of the duplication from the current code. This also gets us *much* closer to supporting a real SAM backend, becouse the SAM can give us the right info then. This also changes our service.c code, so that we do a VUID (rather than uid) cache on the connection struct, and do full NT ACL/NT_TOKEN checks (or cached equivilant) on every packet, for the same r or rw mode the whole share was open for. Andrew Bartlett (This used to be commit d8122cee059fc7098bfa7e42e638a9958b3ac902)
* fix typo auth/auth_server.cJelmer Vernooij2002-08-191-1/+1
| | | | | remove unused 'max packet' and 'packet size' options (This used to be commit 6a787a695db65688916464a9b0e2a9024b131eee)
* Make 'remote_machine' private to lib/substitute.c, and fix all the user to useAndrew Bartlett2002-08-111-3/+2
| | | | | | | the new accessor functions. Andrew Bartlett (This used to be commit f393de2310e997d05674eb7f1268655373e03647)
* This fixes a number of ADS problems, particularly with netbioslessAndrew Tridgell2002-08-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setups. - split up the ads structure into logical pieces. This makes it much easier to keep things like the authentication realm and the server realm separate (they can be different). - allow ads callers to specify that no sasl bind should be performed (used by "net ads info" for example) - fix an error with handing ADS_ERROR_SYSTEM() when errno is 0 - completely rewrote the code for finding the LDAP server. Now try DNS methods first, and try all DNS servers returned from the SRV DNS query, sorted by closeness to our interfaces (using the same sort code as we use in replies from WINS servers). This allows us to cope with ADS DCs that are down, and ensures we don't pick one that is on the other side of the country unless absolutely necessary. - recognise dnsRecords as binary when displaying them - cope with the realm not being configured in smb.conf (work it out from the LDAP server) - look at the trustDirection when looking up trusted domains and don't include trusts that trust our domains but we don't trust theirs. - use LDAP to query the alternate (netbios) name for a realm, and make sure that both and long and short forms of the name are accepted by winbindd. Use the short form by default for listing users/groups. - rescan the list of trusted domains every 5 minutes in case new trust relationships are added while winbindd is running - include transient trust relationships (ie. C trusts B, B trusts A, so C trusts A) in winbindd. - don't do a gratuituous node status lookup when finding an ADS DC (we don't need it and it could fail) - remove unused sid_to_distinguished_name function - make sure we find the allternate name of our primary domain when operating with a netbiosless ADS DC (using LDAP to do the lookup) - fixed the rpc trusted domain enumeration to support up to approx 2000 trusted domains (the old limit was 3) - use the IP for the remote_machine (%m) macro when the client doesn't supply us with a name via a netbios session request (eg. port 445) - if the client uses SPNEGO then use the machine name from the SPNEGO auth packet for remote_machine (%m) macro - add new 'net ads workgroup' command to find the netbios workgroup name for a realm (This used to be commit e358d7b24c86a46d8c361b9e32a25d4f71a6dc00)
* Let everybody enjoy my new toy - make it the default!Andrew Bartlett2002-07-311-2/+2
| | | | | | | | | | | | Authenticaions will now attempt to use winbind, and only fall back to 'ntdomain' (the old security=domain) code if that fails (for any reason, including wrong password). I'll fix up the authenticaion code to better handle the different types of failures in the near future. Andrew Bartlett (This used to be commit 78f0d4337bd263d26d7b349eaf8148e863c62f69)
* Winbind updates!Andrew Bartlett2002-07-311-21/+49
| | | | | | | | | | | | | | | | | This updates the 'winbind' authentication module and winbind's 'PAM' (actually netlogon) code to allow smbd to cache connections to the DC. This is particulary relevent when we need mutex locks already - there is no parallelism to be gained anyway. The winbind code authenticates the user, and if successful, passes back the 'info3' struct describing the user. smbd then interprets that in exactly the same way as an 'ntdomain' logon. Also, add parinoia to winbind about null termination. Andrew Bartlett (This used to be commit 167f122b670d4ef67d78e6f79a2bae3f6e8d67df)
* the ads_connect() here doesn't need to actually succeed, as its onlyAndrew Tridgell2002-07-311-3/+1
| | | | | needed to find the DC IP. Just don't check its return value! (This used to be commit ab144cd8af1622894d446ce48dde99babeb30bd6)
* Fix the build for now..Jim McDonough2002-07-301-1/+1
| | | | | Tridge, please look at this. Did you mean to take out the last parm? (This used to be commit f70886df942e8b37fecb503b2d87f39f19c9bdab)
* net ads info now reports the IP of the LDAP server as well as its name - ↵Andrew Tridgell2002-07-301-4/+6
| | | | | | very useful in scripts (This used to be commit fc0d5479b575c1f495b9251413eed18ec1e37e02)
* a couple more minor tweaks. This now allows us to operate in ADS modeAndrew Tridgell2002-07-301-4/+3
| | | | | | without any 'realm =' or 'ads server =' options at all, as long as DNS is working right. (This used to be commit d3fecdd04241ed7b9248e52415693cd54a1faecf)
* 2nd try at a fix for netbiosless connections to a ADS DC. This alsoAndrew Tridgell2002-07-301-31/+90
| | | | | | make the code a fair bit cleaner as it splits up the ADS and RPC cases, which really are very different. (This used to be commit 5a11c432afebe84b17820396476f48a6a6f6411b)
* removed a gratuitous standard_sub_basic() on the 'password server'Andrew Tridgell2002-07-301-2/+0
| | | | | field. This has got to be pointless. (This used to be commit fd02adab54b66a19c1b81b8ae91e66713691b060)
* - if we are in ADS mode then avoid an expensive netbios lookup to findAndrew Tridgell2002-07-301-7/+16
| | | | | | | | | the servers netbios name when we don't need it. This also fixes ADS mode when the DC has netbios disabled. - if the password server is specified as an IP then actually use that IP, don't do a lookup for the servers name :) (This used to be commit 72042e94ef0f6841afcfa48eafb9809545860725)
* found nasty bug in intl/lang_tdb.c tdb structure was not tested to not be ↵Simo Sorce2002-07-281-7/+7
| | | | | | | | | | | | | null before close this one fixes swat not working with browsers that set more then one language. along the way implemented language priority in web/neg_lang.c with bubble sort also changet str_list_make to be able to use a different separator string Simo. (This used to be commit 69765e4faa8aaae74c97afc917891fc72d80703d)
* Renamed all the new_cli_netlogon_* functions to cli_netlogon_*Tim Potter2002-07-211-1/+1
| | | | | as they're no longer new! (This used to be commit 277f6bbb9a63541a473a80a7994e9bde5c6f22dc)
* Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had aAndrew Bartlett2002-07-201-1/+1
| | | | | | | | | distinction between uchar and char). Lots of const etc. Andrew Bartlett (This used to be commit 8196ee908e10db2119e480fe1b0a71b31a16febc)
* Add support for a weird behaviour apparently used by Win9X pass-throughAndrew Bartlett2002-07-201-2/+17
| | | | | | | | | | | authentication - we can have an NT hash in the LM hash feild. (I need to double-check this fix with tpot, who discovered it). Also remove silly casts back and forth between uchar and char. Andrew Bartlett (This used to be commit 07e2b36311f91d7a20865a2ccc94716772e53fd7)
* NT_STATUS_UNSUCCESSFUL just gets clients confused - move to NO_LOGON_SERVERSAndrew Bartlett2002-07-201-11/+11
| | | | | | | | | | | becouse thats what Win2k gives when the PDC is down. Some of these might better go to other errors, but the Win2k text message for 'unsuccessful' is not particularly useful. (A device attached to the system is not functioning...) Andrew Bartlett (This used to be commit 656f1d68e8579f1bd0a7118caf9e0373d5980a69)
* Make it clear that the debug comment is the same as the command being testedAndrew Bartlett2002-07-091-1/+1
| | | | | | | for failure. Andrew Bartlett (This used to be commit 6e22f39df8c386781a4f51207a3ccd9c94d151f1)
* Address the string_sub problem by changing len = 0 to mean "no expand".Jeremy Allison2002-07-023-3/+3
| | | | | | | Went through and checked all string_subs I could to ensure they're being used correctly. Jeremy. (This used to be commit 17cae0d683be404be69554cd0e84117bdcc56c87)
* Update cli_full_connection() to take a 'flags' paramater, and try to get aAndrew Bartlett2002-06-251-1/+1
| | | | | | | few more places to use it. Andrew Bartlett (This used to be commit 23689b0746d5ab030d8693abf71dd2e80ec1d7c7)
* Try to get security=domain at least slightly working.Andrew Bartlett2002-06-242-8/+13
| | | | | | | | | | | | | | The previous code both had basic logic flaws in it, and some subtle issues regarding the Win2k info3 response. I've tested this against Samba (it looks like that was missed last time due to the 'called name' corruption - which broke my testsuite) and accomidated what I've seen from a info3 printout jmcd gave me. I'll get this tested fully as soon as I get my VMware going again. Andrew Bartlett (This used to be commit 87eba4c811293d2428bfb9bc36de22e66dce7f8b)
* This patch does 2 things:Andrew Bartlett2002-06-153-96/+225
| | | | | | | | | | | | | | | | It extends the 'server mutex' to conver security=server, becouse the connection race condition exists here too, and while people *should* use security=domain, some sites don't.... (This probably should be done in 2.2 as well). Also, start to actually extract and use the information that the remote server returns in the info3 struct. The server mutex code is now in a new file. Andrew Bartlett (This used to be commit 9b0dabdf4ec3bb45879caae76e03b57ccdad8b4b)
* Add another 'trivial' built in authentication module - this one is aAndrew Bartlett2002-06-151-0/+50
| | | | | | | | | | | deveopers hack to always send a fixed challange, for the benifit of tutorials and packet sniffing etc. Enabling this module removes all security, so its a --enable-developer option. Andrew Bartlett (This used to be commit 622e6b64dfb0a2c53d2c9dbd7b8ff438492eaf02)
* It appears that to match NT we should not use the 'samstrict' behaviour,Andrew Bartlett2002-06-151-3/+5
| | | | | and that local accounts are perfectly fine. (This used to be commit 9fe8da6dd1b7fecfee0a2778fec0b7dd0fd40bfb)
* moved lp_list_* functions away from param/loadparm.c, put int lib/util_str.cSimo Sorce2002-06-141-10/+10
| | | | | | and renamed to str_list_* as it is a better name. Elrond should be satisfied now :) (This used to be commit 4ae260adb9505384fcccfb4c9929cb60a45f2e84)
* Spelling.Tim Potter2002-06-121-1/+1
| | | | (This used to be commit bfd8a33c68a3747cbad21667d7515aebd61ec537)
* Spelling fixes.Tim Potter2002-06-121-1/+1
| | | | (This used to be commit de18c785ab9a253cc8bf8d7e4066de0133225c6c)
* More cleanup work preparing for SMB signing.Jeremy Allison2002-06-011-3/+3
| | | | | Jeremy. (This used to be commit 3c05f7c06fc8c45307ea75128b160a5945fc5197)
* Spelling fixes.Tim Potter2002-05-281-7/+7
| | | | (This used to be commit 3d0f4acad2f0c57d0a255e90e5f674ba582251e2)
* Clean up a few unused functions, add a bit of static etc.Andrew Bartlett2002-05-251-28/+0
| | | | | | | | | | | | | | | Importantly: The removal of the silly 'delete user script' behaviour when secuity=domain. I have left the name the same - as it still does the (previously documented, but not in smb.conf(5)) sane behaviour of deleting users on request. When we decide what to do with the 'add user' functionality, we might rename it. Andrew Bartlett (This used to be commit cdcfe3671eb7570e15649b77f708e6579055e7bc)
* Name the authentication modules, and therfore fix up both the build farmAndrew Bartlett2002-05-244-0/+6
| | | | | | | | | and secuirty=server. I *love* automated testing... Andrew Bartlett (This used to be commit c92f4f4d72ffd307ca2d4d792b5e4154f1b85b91)
* Remove the password length paramater from cli_full_connection - it reallyAndrew Bartlett2002-05-241-1/+1
| | | | | | | | | didn't make any sense, and its was always just strlen(password) anyway. This fixes it to be strlen(password)+1 Andrew Bartlett (This used to be commit c205b18bd6b9b69200ff3db55f2c641631d4ab40)
* Move the authenticaion subsystem over to the same 'module:options' syntaxAndrew Bartlett2002-05-248-38/+106
| | | | | | | | | | | that the passdb code now uses. Similarly, move the 'pluggable' stuff over from passdb as well, allowing runtime loading of new authenticaion modules. (NOTE: The interfaces here can *and do* change - module writers are not assured source-level compatibilty, and certainly not binary compatibility). (This used to be commit 3897cf5e048f50be91ae434f636affc6d539d0d1)
* Nobody uses this function, and there really doesn't seem much point toAndrew Bartlett2002-05-221-20/+0
| | | | | | | it, so we may as well reduce the complexity. Andrew Bartlett (This used to be commit 31e074cea50111a150db220603c3cfccaaf4339c)
* Cleanups!Andrew Bartlett2002-05-223-44/+30
| | | | | | | | | | | Make some code static, add some const to the PAM code, and make the plaintext password code actually function - particulary without the requirement to modify the 'struct passwd' (which it assumed was made up of fstrings) This kills some particularly ugly code in lib/util_pw.c Andrew Bartlett (This used to be commit 302dad4990ba5194f072e435465d9adaa089ae06)
* typo day :-(Simo Sorce2002-05-211-1/+1
| | | | (This used to be commit 5b3b65aafe38e767e9b7206ffe6d7c89edb267ba)
* typo, sorrySimo Sorce2002-05-2111-11/+11
| | | | (This used to be commit d222bc8c4b620095a21ba327940d4750d5dee753)
* debug classizedSimo Sorce2002-05-2112-0/+36
| | | | (This used to be commit ae5d24873ad0fb3df970cc9912e18e6a5067ae2d)
* Ensure auth requests from the same machine are completely serialized.Jeremy Allison2002-04-221-5/+40
| | | | | | NT4.x DC's require this. Jeremy. (This used to be commit d162b6285d549370a24a926ab1c46cef7e7f630a)
* Partly based on the work by mimir (Rafal SzczesniakAndrew Bartlett2002-04-141-1/+1
| | | | | | | | | | | | | | | <mimir@diament.ists.pwr.wroc.pl>) this patch allows samba to correctly enumerate its trusted domains - by exaimining the keys in the secrets.tdb file. This patch has been tested with both NT4 and rpcclient/wbinfo, and adds some extra functionality to talloc and rpc_parse to allow it to deal with already unicode strings. Finally, this cleans up some const warnings that were in net_rpc.c by pushing another dash of const into the rpc client code. Andrew Bartlett (This used to be commit 0bdd94cb992b40942aaf2e5e0efd2868b4686296)
* Spelling.Tim Potter2002-04-071-1/+1
| | | | (This used to be commit 423985ed569ac9692f3cb5872a15c74f983121b6)
* Moved debug messages for grabbing/releasing mutex.Jeremy Allison2002-03-271-2/+0
| | | | | Jeremy. (This used to be commit e144c174eafc18f236c848b8f3a2c6382796f5a9)
* Don't hold the mutex for more than 20 seconds.Jeremy Allison2002-03-261-2/+4
| | | | | Jeremy. (This used to be commit 1b9f1a368f2f37700cef357ab4bbc0389ec06378)