summaryrefslogtreecommitdiffstats
path: root/source/libsmb/smbdes.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* r18047: More C++ stuffVolker Lendecke2007-10-101-3/+3
|
* r13407: Change the credentials code to be more like the Samba4 structure,Jeremy Allison2007-10-101-5/+31
| | | | | | | | makes fixes much easier to port. Fix the size of dc->sess_key to be 16 bytes, not 8 bytes - only store 8 bytes in the inter-smbd store in secrets.tdb though. Should fix some uses of the dc->sess_key where we where assuming we could read 16 bytes. Jeremy.
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2007-10-101-1/+1
| | | | | x86_64 box. Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-66/+12
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r7033: Call a spade a spade :-).Jeremy Allison2007-10-101-90/+84
| | | | Jeremy.
* r7031: Added encrypt/decrypt function for LSA secrets and trustedJeremy Allison2007-10-101-1/+1
| | | | | domain passwords on the wire. Jeremy.
* Add support for variable-length session keys in our client code.Andrew Bartlett2003-11-221-0/+40
| | | | | | | | | | | | | This means that we now support 'net rpc join' with KRB5 (des based) logins. Now, you need to hack 'net' to do that, but the principal is important... When we add kerberos to 'net rpc', it should be possible to still do user management and the like over RPC. (server-side support to follow shortly) Andrew Bartlett
* Make a number of the lookup tables 'const'. I'm told this assists in sharingAndrew Bartlett2002-03-231-9/+9
| | | | | | memory between users of shared libs. Andrew Bartlett
* Add a dash of const here and there...Andrew Bartlett2002-03-021-3/+3
|
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* This commit is number 4 of 4.Andrew Bartlett2001-10-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge of sam_pwd_hash() function from tng.Tim Potter2001-09-141-0/+17
|
* Add backend encryption support for NTLMv2.Andrew Bartlett2001-07-071-4/+4
| | | | | | | | | | | | The leg-work for this was done by the folks at samba-tng.org, I'm just bringing it accross to HEAD. The MD5 implementation is seperatly derived, and does not have the copyright problems that the one in TNG has. Also add const to a few places where it makes sence. Andrew Bartlett
* Fixed W2K SP2 joining a Samba PDC hosted domain.Jeremy Allison2001-06-201-1/+1
| | | | Jermey.
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-20/+3
|
* previous commit added an abstraction function that didn't even haveLuke Leighton1999-11-251-2/+2
| | | | | struct cli_state, uint16 fnum into the code: rpc_hnd_api_req(). modified cli_lsarpc.c to use this. the rest is const issues.
* BDC support.Matthew Chapman1999-07-221-0/+13
| | | | Algorithm based on previous work of Jeremy's.
* BDC support.Luke Leighton1999-07-211-1/+5
|
* const char* instead of char* for inputLuke Leighton1999-03-191-1/+1
|
* Implemented encryption algorithm used for a number of RPC buffers.Matthew Chapman1999-03-191-1/+1
| | | | | | | (actually, decryption only currently because I need to get some sleep). Basically another Microsoft twist on DES; the "master key" is the user's NT hash MD4'd and subsets of this are chosen as the 56-bit DES keys.
* Moved some code (NTLMSSPcalc) out of smbdes and inline for paranioaJeremy Allison1998-11-121-26/+0
| | | | | resons and my own piece of mind... Jeremy.
* Removed previously #ifdef 0 'ed code.Jeremy Allison1998-10-221-37/+0
| | | | Jeremy.
* libsmb/smbdes.c: #ifdef'ed out code prior to removal.Jeremy Allison1998-10-221-0/+5
| | | | | | | | | | | | | | | | | | rpc_client/cli_pipe.c: Inlined code removed from smbdes.c rpc_server/srv_samr.c: Fixed unused variable warning. rpc_server/srv_util.c: Inlined code removed from smbdes.c Luke - the above changes are the first part of the changes you and I discussed as being neccessary at the CIFS conference. *PLEASE REVIEW THESE CHANGES* - make sure I haven't broken any of the authenticated DCE/RPC code. smbd/nttrans.c: Fixed to allow NT5.0beta2 to use Samba shares with NT SMB support. smbd/open.c: Fixed mkdir when called from nttrans calls. smbd/server.c: Set correct size for strcpy of global_myworkgroup. Jeremy.
* Small tidyups for gcc in 'preen' mode....Jeremy Allison1998-10-171-0/+1
| | | | Jeremy.
* 16 changed to 8 by mistake in samoemhash.Luke Leighton1998-10-141-1/+1
|
* dce/rpcLuke Leighton1998-10-091-10/+16
|
* fixed bug pointed out by Herb.Andrew Tridgell1998-10-081-1/+1
|
* dce/rpcLuke Leighton1998-10-071-2/+53
|
* reduced the memory footprint a bit by changing some large static intAndrew Tridgell1998-08-171-9/+10
| | | | arrays to uchar
* This is the checkin that adds the security=domain functionality.Jeremy Allison1998-04-291-3/+3
| | | | | | | | | | | WARNING - so far this has only been tested against a Samba PDC (still waiting for IS to add me the machine accounts :-). Still missing is the code in smbpasswd that will add a machine account password and change it on the domain controller, but this is not hard, and I will check it in soon. Jeremy.
* Changing of machine passwords now works !!!!!!Jeremy Allison1998-04-171-0/+9
| | | | | | | | smbdes.c: Added cred_hash3. smbpasswd.c: Fixes for adding a machine account (needs more work). lib/rpc/server/srv_netlog.c: Turn on the machine password changing code by default (calls cred_hash3). Jeremy.
* Adding the same changes to HEAD as were added to BRANCH_1_9_18.Jeremy Allison1998-03-191-2/+8
| | | | | | | | | | | | | Changed smbpasswd to be client-server for a normal user, rather than accessing the private/smbpasswd file directly (it still accesses this file directly when run as root, so root can add users/change a users password without knowing the old password). A shakeout of this change is that smbpasswd can now be used to change a users password on a remote NT machine (yep - you heard that one right - we can now change a NT password from UNIX !!!!!). Jeremy.
* Added SamOEMChangePassword functionality.Jeremy Allison1998-03-181-0/+40
| | | | Jeremy.
* This is *not* a big change (although it looks like one).Jeremy Allison1998-01-221-1/+1
| | | | | | | This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy.
* charcnv.c: Added codepage 866 support onto the file system. PatchJeremy Allison1998-01-171-0/+6
| | | | | | | | | | | | | from Max Khon <max@iclub.nsu.ru>. chgpasswd.c: Allow old RAP change password to work with encrypted passwords. Samba can now allow Windows 95/NT clients to securely change the Lanman password ! (But not the NT hash - that gets lost). ipc.c: smbdes.c: smbpass.c: Support for the above. server.c: #ifdef'ed out fix for NT redirector bug. util.c: Fix NIS bug with server name. Jeremy.
* reply.c:Jeremy Allison1998-01-161-13/+13
| | | | | | | server.c: Test fix for NT worstation SMBmv oplock bug. smbdes.c: Addition of 'forward' parameter in preparation of allowing password change. Jeremy.
* fix some casting errors in smbencrypt and some multiply-defined errorsAndrew Tridgell1997-10-261-5/+0
| | | | | | in clientutil.c (Luke, you can't just copy a global variable declaration from one file to another, you need to declare one of them extern)
* Makefile :Luke Leighton1997-10-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding bits for new nt domain code byteorder.h : trying to get macros right, and not to crash on SUNOS5... client.c : added #ifdef NTDOMAIN, and created do_nt_login() function. don't want to have to recompile client.c unless absolutely necessary. credentials.c : moved deal_with_creds() [possibly inappropriately] into credentials.c ipc.c reply.c server.c uid.c : attempting to make (un)become_root() functions calleable from smbclient. this is a little tricky: smbclient might have to be another setuid root program, immediately setuid'ing to non-root, so that we can reset-uid to root to get at the smbpasswd file. or, have a secure pipe mechanism to smbd to grab smbpasswd entries. or the like. smbdes.c smbencrypt.c : created a function to generate lm and nt owf hashes. lsaparse.c ntclient.c smbparse.c : added nt client LSA_AUTH2 code. it works, too! pipenetlog.c pipentlsa.c pipesrvsvc.c : simplification. code-shuffling. getting that damn offset right for the opcode in RPC_HDR. smb.h : changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL. we might need to store the server times as well. proto.h : the usual.
* casting cleanupsAndrew Tridgell1997-10-201-6/+6
|
* move calls to smbhash() inside smbdes.c (for legal reasons)Andrew Tridgell1997-10-201-1/+18
|
* Makefile:Luke Leighton1997-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | added credentials.c to smbd credentials.c: using credential structures instead of char* password.c uid.c server.c: added sid and attr to user_struct. smbdes.c: smbhash and str_to_key make public instead of private. pipes.c smb.h: lsa structures, sub-functions. proto.h: usual.
* - change generate_challenge() to use md4 instead of desAndrew Tridgell1997-09-161-7/+45
| | | | | | | | | | | | | | | | | | | | | | | - move routines about a bit between smbencrypt.c and smbdes.c. Ensure that there is no entry point for normal DES operation - add the following comment: This code is NOT a complete DES implementation. It implements only the minimum necessary for SMB authentication, as used by all SMB products (including every copy of Microsoft Windows95 ever sold) In particular, it can only do a unchained forward DES pass. This means it is not possible to use this code for encryption/decryption of data, instead it is only useful as a "hash" algorithm. There is no entry point into this code that allows normal DES operation. I believe this means that this code does not come under ITAR regulations but this is NOT a legal opinion. If you are concerned about the applicability of ITAR regulations to this code then you should confirm it for yourself (and maybe let me know if you come up with a different answer to the one above)
* bug fix in the new des code.Andrew Tridgell1997-09-161-21/+13
| | | | | I had one of the sbox[] constants wrong, which interestingly gave a 20% chance of the whole algorithm failing.
* This is a written from scratch DES implementation. I couldn't find aAndrew Tridgell1997-09-141-0/+290
GPLd implementation so I decided to write one. This version only does DES ecb encryption and isn't very general, so it may in fact be exempt from ITAR regulations. ITAR regulations do not prohibit the distribution of code that can be used for authentication purposes only. This code has no decrypt function so it would be useless for a normal encryption application and thus may be ITAR exempt. It is also very slow, but we don't need it to be fast. It is a literal implementation from the standard and treats each bit as one byte to make the code easy to write.