summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-06-08 15:48:40 +1000
committerJeremy Allison <jra@samba.org>2013-06-19 21:32:36 +0200
commitfc13489c91e790ff8952aff1e7db1e6189894e30 (patch)
treeb36ce2a6e54a0141fecdc2b0561050259bb19c2c /source4
parent5c4772ec1d562a4547391e1dd4956c43e3d635a7 (diff)
downloadsamba-fc13489c91e790ff8952aff1e7db1e6189894e30.tar.gz
samba-fc13489c91e790ff8952aff1e7db1e6189894e30.tar.bz2
samba-fc13489c91e790ff8952aff1e7db1e6189894e30.zip
build: Build with system md5.h on OpenIndiana
This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c2
-rw-r--r--source4/libcli/raw/smb_signing.c4
-rw-r--r--source4/libnet/libnet_passwd.c4
-rw-r--r--source4/ntp_signd/ntp_signd.c2
-rw-r--r--source4/rpc_server/samr/samr_password.c2
-rw-r--r--source4/torture/ntp/ntp_signd.c2
-rw-r--r--source4/torture/rpc/samba3rpc.c2
-rw-r--r--source4/torture/rpc/samlogon.c2
-rw-r--r--source4/torture/rpc/samr.c8
9 files changed, 14 insertions, 14 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index e9c2bca2dc..7974169499 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -1368,7 +1368,7 @@ static int setup_primary_wdigest(struct setup_password_fields_io *io,
}
for (i=0; i < ARRAY_SIZE(wdigest); i++) {
- struct MD5Context md5;
+ MD5_CTX md5;
MD5Init(&md5);
if (wdigest[i].nt4dom) {
MD5Update(&md5, wdigest[i].nt4dom->data, wdigest[i].nt4dom->length);
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index 5d2f928747..405efab618 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -81,7 +81,7 @@ bool signing_good(struct smb_signing_context *sign_info,
void sign_outgoing_message(struct smb_request_buffer *out, DATA_BLOB *mac_key, unsigned int seq_num)
{
uint8_t calc_md5_mac[16];
- struct MD5Context md5_ctx;
+ MD5_CTX md5_ctx;
/*
* Firstly put the sequence number into the first 4 bytes.
@@ -116,7 +116,7 @@ bool check_signed_incoming_message(struct smb_request_buffer *in, DATA_BLOB *mac
uint8_t calc_md5_mac[16];
uint8_t *server_sent_mac;
uint8_t sequence_buf[8];
- struct MD5Context md5_ctx;
+ MD5_CTX md5_ctx;
const size_t offset_end_of_sig = (HDR_SS_FIELD + 8);
int i;
const int sign_range = 0;
diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c
index e1094f2057..861d746fd1 100644
--- a/source4/libnet/libnet_passwd.c
+++ b/source4/libnet/libnet_passwd.c
@@ -274,7 +274,7 @@ static NTSTATUS libnet_SetPassword_samr_handle_26(struct libnet_context *ctx, TA
DATA_BLOB session_key;
DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16);
uint8_t confounder[16];
- struct MD5Context md5;
+ MD5_CTX md5;
if (r->samr_handle.in.info21) {
return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -330,7 +330,7 @@ static NTSTATUS libnet_SetPassword_samr_handle_25(struct libnet_context *ctx, TA
DATA_BLOB session_key;
DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16);
uint8_t confounder[16];
- struct MD5Context md5;
+ MD5_CTX md5;
if (!r->samr_handle.in.info21) {
return NT_STATUS_INVALID_PARAMETER_MIX;
diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c
index d1d8483ad7..53c34edab7 100644
--- a/source4/ntp_signd/ntp_signd.c
+++ b/source4/ntp_signd/ntp_signd.c
@@ -109,7 +109,7 @@ static NTSTATUS ntp_signd_process(struct ntp_signd_connection *ntp_signd_conn,
enum ndr_err_code ndr_err;
struct ldb_result *res;
const char *attrs[] = { "unicodePwd", "userAccountControl", "cn", NULL };
- struct MD5Context ctx;
+ MD5_CTX ctx;
struct samr_Password *nt_hash;
uint32_t user_account_control;
int ret;
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index 5caf4b9e97..2d9c48abd7 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -566,7 +566,7 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
DATA_BLOB new_password;
DATA_BLOB co_session_key;
DATA_BLOB session_key = data_blob(NULL, 0);
- struct MD5Context ctx;
+ MD5_CTX ctx;
nt_status = dcesrv_fetch_session_key(dce_call->conn, &session_key);
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source4/torture/ntp/ntp_signd.c b/source4/torture/ntp/ntp_signd.c
index ce49d4fb85..89eb1a0022 100644
--- a/source4/torture/ntp/ntp_signd.c
+++ b/source4/torture/ntp/ntp_signd.c
@@ -78,7 +78,7 @@ static bool test_ntp_signd(struct torture_context *tctx,
char *unix_address;
int sys_errno;
- struct MD5Context ctx;
+ MD5_CTX ctx;
uint8_t sig[16];
enum ndr_err_code ndr_err;
bool ok;
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index f7c76743aa..9443d5e848 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -780,7 +780,7 @@ static bool join3(struct torture_context *tctx,
DATA_BLOB session_key;
DATA_BLOB confounded_session_key = data_blob_talloc(
mem_ctx, NULL, 16);
- struct MD5Context ctx;
+ MD5_CTX ctx;
uint8_t confounder[16];
ZERO_STRUCT(u_info);
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index bd85c229ac..4861038305 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -1083,7 +1083,7 @@ static bool test_ntlm2(struct samlogon_state *samlogon_state, char **error_strin
uint8_t session_nonce_hash[16];
uint8_t client_chall[8];
- struct MD5Context md5_session_nonce_ctx;
+ MD5_CTX md5_session_nonce_ctx;
HMACMD5Context hmac_ctx;
ZERO_STRUCT(user_session_key);
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 6a4f653f2c..a0a5f1a686 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -781,7 +781,7 @@ static bool test_SetUserPassEx(struct dcerpc_pipe *p, struct torture_context *tc
uint8_t confounder[16];
char *newpass;
struct dcerpc_binding_handle *b = p->binding_handle;
- struct MD5Context ctx;
+ MD5_CTX ctx;
struct samr_GetUserPwInfo pwp;
struct samr_PwInfo info;
int policy_min_pw_len = 0;
@@ -872,7 +872,7 @@ static bool test_SetUserPass_25(struct dcerpc_pipe *p, struct torture_context *t
bool ret = true;
DATA_BLOB session_key;
DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16);
- struct MD5Context ctx;
+ MD5_CTX ctx;
uint8_t confounder[16];
char *newpass;
struct dcerpc_binding_handle *b = p->binding_handle;
@@ -1162,7 +1162,7 @@ static bool test_SetUserPass_level_ex(struct dcerpc_pipe *p,
bool ret = true;
DATA_BLOB session_key;
DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16);
- struct MD5Context ctx;
+ MD5_CTX ctx;
uint8_t confounder[16];
char *newpass;
struct dcerpc_binding_handle *b = p->binding_handle;
@@ -2563,7 +2563,7 @@ bool test_ChangePasswordRandomBytes(struct dcerpc_pipe *p, struct torture_contex
DATA_BLOB session_key;
DATA_BLOB confounded_session_key = data_blob_talloc(tctx, NULL, 16);
uint8_t confounder[16];
- struct MD5Context ctx;
+ MD5_CTX ctx;
bool ret = true;
struct lsa_String server, account;