summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smbencrypt.c
Commit message (Collapse)AuthorAgeFilesLines
* crypto: add decrypt_drsuapi_blob from samba4.Günther Deschner2008-06-241-0/+114
| | | | Guenther
* Memory leak fixes from Chere Zhou <czhou@isilon.com>.Jeremy Allison2008-05-271-0/+1
| | | | Jeremy.
* Cleanup size_t return values in callers of convert_string_allocateTim Prouty2008-05-201-6/+6
| | | | | This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure.
* Remove the "pwd" struct from rpc_pipe_clientVolker Lendecke2008-04-211-7/+3
| | | | | The only user of this was decrypt_trustdom_secret, and this only needs the NT hash anyway.
* Check for buffer in decode_wkssvc_join_password_buffer.Günther Deschner2008-03-281-1/+10
| | | | Guenther
* libsmb: Do not upper-case target name on NTLMv2 hash generationKai Blin2008-01-151-1/+1
| | | | | | | | This makes our NTLMv2 hash generation compatible to the Davenport example and fixes a bug when ntlm_auth is called with a non-upper-case --domain parameter and client ntlmv2 auth = yes Jerry, please consider for 3.2.0
* Do not pass emtpy wkssvc_PasswordBuffers to rpc functions.Günther Deschner2008-01-041-6/+14
| | | | Guenther
* Make decode_wkssvc_join_password_buffer() return WERRORs.Günther Deschner2007-12-121-5/+14
| | | | Guenther
* Add decode_wkssvc_join_password_buffer().Günther Deschner2007-12-031-0/+29
| | | | Guenther
* Make encode_wkssvc_join_password_buffer() non-static.Günther Deschner2007-11-301-4/+4
| | | | Guenther
* Merge encode_wkssvc_join_password_buffer() from samba4.Günther Deschner2007-11-301-0/+36
| | | | Guenther
* Remove all pstrings from smbd/chgpasswd.c.Jeremy Allison2007-11-121-11/+25
| | | | Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-10/+10
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The nextVolker Lendecke2007-10-101-1/+2
| | | | | | checkin will pull this up to srvstr_get_path. At that point we can get more independent of the inbuf, the base_ptr in pull_string will only be used to satisfy UCS2 alignment constraints.
* r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; andVolker Lendecke2007-10-101-2/+2
| | | | replace all data_blob(NULL, 0) calls.
* r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher2007-10-101-25/+25
| | | | | | | | which matches what samba4 has. also fix all the callers to prevent compiler warnings metze
* r18966: this bug affects Samba3 too. I'm actually surprised nobody hasAndrew Tridgell2007-10-101-0/+6
| | | | | | reported that Samba3 on Solaris Sparc with the native compiler can't join Windows domains. If it worked we were just lucky. I suspect it just didn't work.
* r17612: Modify NTLMSSP session code so that it doesn't storeJeremy Allison2007-10-101-18/+50
| | | | | | | | | | | a copy of the plaintext password, only the NT and LM hashes (all it needs). Fix smbencrypt to expose hash verions of plaintext function. Andrew Bartlett, you might want to look at this for gensec. This should make it easier for winbindd to store cached credentials without having to store plaintext passwords in an NTLM-only environment (non krb5). Jeremy.
* r13553: Fix all our warnings at -O6 on an x86_64 box.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r13396: Add in userinfo26, re-enable userinfo25 - took the knowledgeJeremy Allison2007-10-101-0/+19
| | | | | | from Samba4 on how to decode the 532 byte password buffers. Getting closer to passing samba4 RPC-SCHANNEL test. Jeremy.
* r12713: Remove use of uint8_t -> uint8.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2007-10-101-12/+12
| | | | | x86_64 box. Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-28/+2
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r7391: - Added client-support for various lsa_query_trust_dom_info-calls and aGünther Deschner2007-10-101-0/+66
| | | | | | | | | | | | | | | | | | | | | | rpcclient-tester for some info-levels. Jerry, I tried to adopt to prs_pointer() where possible and to not interfere with your work for usrmgr. - Add "net rpc trustdom vampire"-tool. This allows to retrieve Interdomain Trust(ed)-Relationships from NT4-Servers including cleartext-passwords (still stored in the local secrets.tdb). The net-hook was done in cooperation with Lars Mueller <lmuelle@suse.de>. To vampire trusted domains simply call: net rpc trustdom vampire -S nt4dc -Uadmin%pass Guenther
* r7033: Call a spade a spade :-).Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r7031: Added encrypt/decrypt function for LSA secrets and trustedJeremy Allison2007-10-101-0/+29
| | | | | domain passwords on the wire. Jeremy.
* r5961: final round of compiler warning fixes based on feedback from Jason MaderGerald Carter2007-10-101-1/+1
|
* r1661: Changed the password history format so that each history entryJeremy Allison2007-10-101-0/+20
| | | | | | | consists of a 16 byte salt, followed by the 16 byte MD5 hash of the concatination of the salt plus the NThash of the historical password. Allows these to be exposed in LDAP without security issues. Jeremy.
* r1492: Rework our random number generation system.Andrew Bartlett2007-10-101-3/+3
| | | | | | | | | | 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(). Andrew Bartlett
* r176: Improve our fallback code for password changes - this would be betterAndrew Bartlett2007-10-101-3/+9
| | | | | | | | | | | | | | with more correct NTLMSSP support in client and server, but it will do for now. Also implement LANMAN password only in the classical session setup code, but #ifdef'ed out. In Samba4, I'll make this run-time so we can torture it. Lanman passwords over 14 dos characters long could be considered 'invalid' (they are truncated) - so SMBencrypt now returns 'False' if it generates such a password. Andrew Bartlett
* r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session ↵Andrew Bartlett2007-10-101-4/+4
| | | | | | | key could be anything, and may not be based on anything 'NT'. This is also what microsoft calls it.
* Based on the detective work of Jianliang Lu <j.lu@tiesse.com>, allow yetAndrew Bartlett2004-03-271-3/+7
| | | | | | | | | | | | | another NTLMv2 combination. We should allow the NTLMv2 response to be calculated with either the domain as supplied, or the domain in UPPER case (as we always did in the past). As a client, we always UPPER case it (as per the spec), but we also make sure to UPPER case the domain, when we send it. This should give us maximum compatability. Andrew Bartlett
* Remove unused utility function.Andrew Bartlett2004-02-081-13/+0
| | | | Andrew Bartlett
* This adds client-side support for the unicode/SAMR password change scheme.Andrew Bartlett2004-01-261-33/+35
| | | | | | | | | | As well as avoiding DOS charset issues, this scheme returns useful error codes, that we can map back via the pam interface. This patch also cleans up the interfaces used for password buffers, to avoid duplication of code. Andrew Bartlett
* Make sure we correctly generate the lm session key.Gerald Carter2003-12-171-0/+20
| | | | | | | | | This fixes a problem joining a Samba domain from a vanilla win2k client that doesn't set the NTLMSSP_NEGOTIATE_NTLM2 flag. Reported on samba ml as "decode_pw: incorrect password length" when handling a samr_set_userinfo(23 or 24) RPC.
* Changes all over the shop, but all towards:Andrew Bartlett2003-11-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - NTLM2 support in the server - KEY_EXCH support in the server - variable length session keys. In detail: - NTLM2 is an extension of NTLMv1, that is compatible with existing domain controllers (unlike NTLMv2, which requires a DC upgrade). * This is known as 'NTLMv2 session security' * (This is not yet implemented on the RPC pipes however, so there may well still be issues for PDC setups, particuarly around password changes. We do not fully understand the sign/seal implications of NTLM2 on RPC pipes.) This requires modifications to our authentication subsystem, as we must handle the 'challege' input into the challenge-response algorithm being changed. This also needs to be turned off for 'security=server', which does not support this. - KEY_EXCH is another 'security' mechanism, whereby the session key actually used by the server is sent by the client, rather than being the shared-secret directly or indirectly. - As both these methods change the session key, the auth subsystem needed to be changed, to 'override' session keys provided by the backend. - There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure. This should help the SPNEGO implementation. - The 'names blob' in NTLMSSP is always in unicode - never in ascii. Don't make an ascii version ever. - The other big change is to allow variable length session keys. We have always assumed that session keys are 16 bytes long - and padded to this length if shorter. However, Kerberos session keys are 8 bytes long, when the krb5 login uses DES. * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. * - Add better DEBUG() messages to ntlm_auth, warning administrators of misconfigurations that prevent access to the privileged pipe. This should help reduce some of the 'it just doesn't work' issues. - Fix data_blob_talloc() to behave the same way data_blob() does when passed a NULL data pointer. (just allocate) REMEMBER to make clean after this commit - I have changed plenty of data structures...
* get rid of more compiler warningsHerb Lewis2003-08-151-1/+1
|
* Change Samba to always use extended security for it's guest logins, (ie,Andrew Bartlett2003-08-141-1/+1
| | | | | | | | | | | NTLMSSP with "" username, NULL password), and add --machine-pass (-P) to all of Samba's clients. When connecting to an Active Directory DC, you must initiate the CIFS level session setup with Kerberos, not a guest login. If you don't, your machine account is demoted to NT4. Andrew Bartlett
* Jeremy requested that I get my NTLMSSP patch into CVS. He didn't requestAndrew Bartlett2003-07-141-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the schannel code, but I've included that anyway. :-) This patch revives the client-side NTLMSSP support for RPC named pipes in Samba, and cleans up the client and server schannel code. The use of the new code is enabled by the 'sign', 'seal' and 'schannel' commands in rpcclient. The aim was to prove that our separate NTLMSSP client library actually implements NTLMSSP signing and sealing as per Microsoft's NTLMv1 implementation, in the hope that knowing this will assist us in correctly implementing NTLMSSP signing for SMB packets. (Still not yet functional) This patch replaces the NTLMSSP implementation in rpc_client/cli_pipe.c with calls to libsmb/ntlmssp.c. In the process, we have gained the ability to use the more secure NT password, and the ability to sign-only, instead of having to seal the pipe connection. (Previously we were limited to sealing, and could only use the LM-password derived key). Our new client-side NTLMSSP code also needed alteration to cope with our comparatively simple server-side implementation. A future step is to replace it with calls to the same NTLMSSP library. Also included in this patch is the schannel 'sign only' patch I submitted to the team earlier. While not enabled (and not functional, at this stage) the work in this patch makes the code paths *much* easier to follow. I have also included similar hooks in rpccleint to allow the use of schannel on *any* pipe. rpcclient now defaults to not using schannel (or any other extra per-pipe authenticiation) for any connection. The 'schannel' command enables schannel for all pipes until disabled. This code is also much more secure than the previous code, as changes to our cli_pipe routines ensure that the authentication footer cannot be removed by an attacker, and more error states are correctly handled. (The same needs to be done to our server) Andrew Bartlett
* Finally get NTLMv2 working on the client!Andrew Bartlett2003-05-091-28/+84
| | | | | | | | | | | | | | | | | | With big thanks to tpot for the ethereal disector, and for the base code behind this, we now fully support NTLMv2 as a client. In particular, we support it with direct domain logons (tested with ntlm_auth --diagnostics), with 'old style' session setups, and with NTLMSSP. In fact, for NTLMSSP we recycle one of the parts of the server's reply directly... (we might need to parse for unicode issues later). In particular, a Win2k domain controller now supplies us with a session key for this password, which means that doman joins, and non-spnego SMB signing are now supported with NTLMv2! Andrew Bartlett
* Allow the NTLMv2 functions to spit out both possible varients on the sessionAndrew Bartlett2003-05-051-11/+23
| | | | | | | | key, so we can test it in ntlm_auth. I suspect the 'lm' version doesn't exist, but it's easy to change back. Andrew Bartlett
* Merge from HEAD:Andrew Bartlett2003-03-181-99/+1
| | | | | | | | | | | | | | A much better SMB signing module, that allows for mulitple signing algorithms and correctly backs down from signing when the server cannot sign the reply. This also attempts to enable SMB signing on NTLMSSP connections, but I don't know what NTLMSSP flags to set yet. This would allow 'client use signing' to be set by default, for server compatability. (A seperate option value should be provided for mandetory signing, which would not back down). Andrew Bartlett
* Merge from HEAD client-side authentication changes:Andrew Bartlett2003-02-241-7/+104
| | | | | | | | | | - new kerberos code, allowing the account to change it's own password without special SD settings required - NTLMSSP client code, now seperated from cliconnect.c - NTLMv2 client code - SMB signing fixes Andrew Bartlett
* Merge from HEAD:Andrew Bartlett2003-01-141-10/+11
| | | | | | | | - remove useless #else - signed/unsigned fixes - use an fstring for LM hash buffer. Andrew Bartlett
* Fixed some simple typos, including one that would cause the wrong valueChristopher R. Hertel2003-01-031-2/+2
| | | | to be printed in a DEBUG() message.
* sync'ing up for 3.0alpha20 releaseGerald Carter2002-09-251-14/+46
|
* sync 3.0 branch with headJelmer Vernooij2002-08-171-8/+8
|
* updated the 3.0 branch from the head branch - ready for alpha18Andrew Tridgell2002-07-151-44/+87
|