Merge remote branch 'h-github/master' into win32-port2

* h-github/master: (64 commits)
  refix socket wrappers with rk_
  Patch from Secure Endpoints/Asanka Herath for windows support
  unset KRB5CCNAME
  its really just LIBADD more most of them
  correct quoting
  Use -lpthread for modern freebsd instead
  clean KRB5CCNAME and KRB5_CONFIG, require test to reset them
  more up ${env_setup}
  use PTHREADS_LIBADD for freebsd6 and newer
  add PTHREAD_LIBADD
  add PTHREAD_LIBADD
  add PTHREAD_LIBADD
  switch to PTHREADS_LIBADD
  log what the error string say too
  More debug logging
  sprinkle more 'echo "test failed"'
  sprinkle 'echo "test failed"'
  use calloc(), indent more prettier
  in sh, equal compare is really = for strings, not ==
  Check for duplicates, already loaded mechs
  ...

Conflicts (resolved):
	lib/krb5/auth_context.c
	lib/krb5/changepw.c
	lib/krb5/context.c
	lib/krb5/error_string.c
	lib/krb5/kuserok.c
	lib/krb5/libkrb5-exports.def.in
	lib/krb5/net_write.c
	lib/krb5/store_fd.c
	lib/krb5/test_cc.c
	lib/roken/strerror_r.c
This commit is contained in:
Asanka Herath
2009-12-21 13:44:00 -05:00
52 changed files with 529 additions and 272 deletions

View File

@@ -46,21 +46,45 @@ struct ntlm_buf {
};
#define NTLM_NEG_UNICODE 0x00000001
#define NTLM_NEG_OEM 0x00000002
#define NTLM_NEG_TARGET 0x00000004
#define NTLM_MBZ9 0x00000008
#define NTLM_NEG_SIGN 0x00000010
#define NTLM_NEG_SEAL 0x00000020
#define NTLM_NEG_DATAGRAM 0x00000040
#define NTLM_NEG_LM_KEY 0x00000080
#define NTLM_MBZ8 0x00000100
#define NTLM_NEG_NTLM 0x00000200
#define NTLM_NEG_NT_ONLY 0x00000400
#define NTLM_MBZ7 0x00000800 /* anon ? */
#define NTLM_SUPPLIED_DOMAIN 0x00001000
#define NTLM_SUPPLIED_WORKSTAION 0x00002000
#define NTLM_OEM_SUPPLIED_DOMAIN 0x00001000
#define NTLM_OEM_SUPPLIED_WORKSTAION 0x00002000
#define NTLM_MBZ6 0x00004000 /* local call ? */
#define NTLM_NEG_ALWAYS_SIGN 0x00008000
#define NTLM_NEG_NTLM2_SESSION 0x00080000
#define NTLM_TARGET_DOMAIN 0x00010000
#define NTLM_TARGET_SERVER 0x00020000
#define NTLM_TARGET_SHARE 0x00040000
#define NTLM_NEG_NTLM2_SESSION 0x00080000
#define NTLM_NEG_NTLM2 0x00080000
#define NTLM_NEG_IDENTIFY 0x00100000
#define NTLM_MBZ5 0x00200000
#define NTLM_NON_NT_SESSION_KEY 0x00400000
#define NTLM_NEG_TARGET_INFO 0x00800000
#define NTLM_MBZ4 0x01000000
#define NTLM_NEG_VERSION 0x02000000
#define NTLM_MBZ3 0x04000000
#define NTLM_MBZ2 0x08000000
#define NTLM_MBZ1 0x10000000
#define NTLM_ENC_128 0x20000000
#define NTLM_NEG_KEYEX 0x40000000
#define NTLM_NEGOTIATE_56 0x80000000
/**
* Struct for the NTLM target info, the strings is assumed to be in

View File

@@ -422,9 +422,9 @@ heim_ntlm_decode_type1(const struct ntlm_buf *buf, struct ntlm_type1 *data)
CHECK(krb5_ret_uint32(in, &type), 0);
CHECK(type, 1);
CHECK(krb5_ret_uint32(in, &data->flags), 0);
if (data->flags & NTLM_SUPPLIED_DOMAIN)
if (data->flags & NTLM_OEM_SUPPLIED_DOMAIN)
CHECK(ret_sec_buffer(in, &domain), 0);
if (data->flags & NTLM_SUPPLIED_WORKSTAION)
if (data->flags & NTLM_OEM_SUPPLIED_WORKSTAION)
CHECK(ret_sec_buffer(in, &hostname), 0);
#if 0
if (domain.offset > 32) {
@@ -432,9 +432,9 @@ heim_ntlm_decode_type1(const struct ntlm_buf *buf, struct ntlm_type1 *data)
CHECK(krb5_ret_uint32(in, &data->os[1]), 0);
}
#endif
if (data->flags & NTLM_SUPPLIED_DOMAIN)
if (data->flags & NTLM_OEM_SUPPLIED_DOMAIN)
CHECK(ret_string(in, 0, &domain, &data->domain), 0);
if (data->flags & NTLM_SUPPLIED_WORKSTAION)
if (data->flags & NTLM_OEM_SUPPLIED_WORKSTAION)
CHECK(ret_string(in, 0, &hostname, &data->hostname), 0);
out:
@@ -472,11 +472,11 @@ heim_ntlm_encode_type1(const struct ntlm_type1 *type1, struct ntlm_buf *data)
if (type1->domain) {
base += 8;
flags |= NTLM_SUPPLIED_DOMAIN;
flags |= NTLM_OEM_SUPPLIED_DOMAIN;
}
if (type1->hostname) {
base += 8;
flags |= NTLM_SUPPLIED_WORKSTAION;
flags |= NTLM_OEM_SUPPLIED_WORKSTAION;
}
if (type1->os[0])
base += 8;