diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-06-19 08:15:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:44 -0500 |
commit | bf598954f75bfd924b9aa22649975b372c74a49e (patch) | |
tree | 10395f5e51d75c68b2adb667dc00a1931a44705b /source4/lib | |
parent | bc2fd488f1ad6116ba71fe793cc4444b8cd3c7a2 (diff) | |
download | samba-bf598954f75bfd924b9aa22649975b372c74a49e.tar.gz samba-bf598954f75bfd924b9aa22649975b372c74a49e.tar.bz2 samba-bf598954f75bfd924b9aa22649975b372c74a49e.zip |
r1198: Merge the Samba 3.0 ntlm_auth, including the kerberos and SPENGO parts.
I have moved the SPNEGO and Kerberos code into libcli/auth, and intend
to refactor them into the same format as NTLMSSP.
Andrew Bartlett
(This used to be commit 58da78a7460d5d0a4abee7d7b84799c228e6bc0b)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/basic.mk | 3 | ||||
-rw-r--r-- | source4/lib/util_str.c | 16 |
2 files changed, 18 insertions, 1 deletions
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk index 754458fec1..ccd0935407 100644 --- a/source4/lib/basic.mk +++ b/source4/lib/basic.mk @@ -50,7 +50,8 @@ ADD_OBJ_FILES = \ lib/crypto/md5.o \ lib/crypto/hmacmd5.o \ lib/crypto/md4.o \ - lib/tdb_helper.o + lib/tdb_helper.o \ + lib/server_mutex.o REQUIRED_SUBSYSTEMS = \ LIBTDB CHARSET # End SUBSYSTEM LIBBASIC diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c index bb94d3fce6..70011cf80d 100644 --- a/source4/lib/util_str.c +++ b/source4/lib/util_str.c @@ -1252,6 +1252,22 @@ DATA_BLOB strhex_to_data_blob(const char *strhex) return ret_blob; } +/** + * Routine to print a buffer as HEX digits, into an allocated string. + */ + +void hex_encode(const unsigned char *buff_in, size_t len, char **out_hex_buffer) +{ + int i; + char *hex_buffer; + + *out_hex_buffer = smb_xmalloc((len*2)+1); + hex_buffer = *out_hex_buffer; + + for (i = 0; i < len; i++) + slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]); +} + /** Unescape a URL encoded string, in place. |