uint32_t chal_flags, ntlmssp_command, unkn1 = 0, unkn2 = 0;
DATA_BLOB server_domain_blob;
DATA_BLOB challenge_blob;
- DATA_BLOB target_info = data_blob(NULL, 0);
+ DATA_BLOB target_info = {};
char *server_domain;
const char *chal_parse_string;
const char *chal_parse_string_short = NULL;
const char *auth_gen_string;
- DATA_BLOB lm_response = data_blob(NULL, 0);
- DATA_BLOB nt_response = data_blob(NULL, 0);
- DATA_BLOB session_key = data_blob(NULL, 0);
- DATA_BLOB lm_session_key = data_blob(NULL, 0);
- DATA_BLOB encrypted_session_key = data_blob(NULL, 0);
+ DATA_BLOB lm_response = {};
+ DATA_BLOB nt_response = {};
+ DATA_BLOB session_key = {};
+ DATA_BLOB lm_session_key = {};
+ DATA_BLOB encrypted_session_key = {};
NTSTATUS nt_status;
int flags = 0;
const char *user = NULL, *domain = NULL, *workstation = NULL;
DATA_BLOB user_session_key = state->user_session_key;
DATA_BLOB lm_session_key = state->lm_session_key;
NTSTATUS nt_status = NT_STATUS_OK;
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
struct auth_session_info *session_info = NULL;
TALLOC_FREE(state->user_info);
const DATA_BLOB *names_blob)
{
uint8_t client_chal[8];
- DATA_BLOB response = data_blob(NULL, 0);
+ DATA_BLOB response = {};
uint8_t long_date[8];
generate_random_buffer(client_chal, sizeof(client_chal));
const DATA_BLOB *in,
DATA_BLOB *out)
{
- DATA_BLOB rid_crypt_out = data_blob(NULL, 0);
+ DATA_BLOB rid_crypt_out = {};
DATA_BLOB confounder;
DATA_BLOB enc_buffer;
r->mechanism = LDAP_AUTH_MECH_SASL;
if (!asn1_read_OctetString_talloc(msg, data, &r->creds.SASL.mechanism)) goto prot_err;
if (asn1_peek_tag(data, ASN1_OCTET_STRING)) { /* optional */
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
if (!asn1_read_OctetString(data, msg, &tmp_blob)) goto prot_err;
r->creds.SASL.secblob = talloc(msg, DATA_BLOB);
if (!r->creds.SASL.secblob) {
if (!asn1_start_tag(data, tag)) goto prot_err;
if (!ldap_decode_response(msg, data, &r->response)) goto prot_err;
if (asn1_peek_tag(data, ASN1_CONTEXT_SIMPLE(7))) {
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
if (!asn1_read_ContextSimple(data, msg, 7, &tmp_blob)) goto prot_err;
r->SASL.secblob = talloc(msg, DATA_BLOB);
if (!r->SASL.secblob) {
case ASN1_APPLICATION(LDAP_TAG_ExtendedRequest): {
struct ldap_ExtendedRequest *r = &msg->r.ExtendedRequest;
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
msg->type = LDAP_TAG_ExtendedRequest;
if (!asn1_start_tag(data,tag)) goto prot_err;
case ASN1_APPLICATION(LDAP_TAG_ExtendedResponse): {
struct ldap_ExtendedResponse *r = &msg->r.ExtendedResponse;
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB tmp_blob = {};
msg->type = LDAP_TAG_ExtendedResponse;
if (!asn1_start_tag(data, tag)) goto prot_err;
char *buf, int length, void **private1)
{
DATA_BLOB in;
- DATA_BLOB out = data_blob(NULL, 0);
+ DATA_BLOB out = {};
char *out_base64 = NULL;
const char *reply_arg = NULL;
struct gensec_ntlm_state {
case GENSEC_KRB5_SERVER_START:
{
DATA_BLOB unwrapped_in;
- DATA_BLOB unwrapped_out = data_blob(NULL, 0);
+ DATA_BLOB unwrapped_out = {};
krb5_data inbuf, outbuf;
uint8_t tok_id[2];
struct keytab_container *keytab;
NTSTATUS nt_status;
krb5_error_code ret;
enum ndr_err_code ndr_err;
- DATA_BLOB zero_blob = data_blob(NULL, 0);
- DATA_BLOB tmp_blob = data_blob(NULL, 0);
+ DATA_BLOB zero_blob = {};
+ DATA_BLOB tmp_blob = {};
struct PAC_SIGNATURE_DATA *kdc_checksum = NULL;
struct PAC_SIGNATURE_DATA *srv_checksum = NULL;
uint32_t i;
struct auth_user_info_dc **user_info_dc)
{
NTSTATUS nt_status;
- DATA_BLOB user_sess_key = data_blob(NULL, 0);
- DATA_BLOB lm_sess_key = data_blob(NULL, 0);
+ DATA_BLOB user_sess_key = {};
+ DATA_BLOB lm_sess_key = {};
struct ldb_message *msg;
struct ldb_dn *domain_dn;
const char *sasl_mech = "GSS-SPNEGO";
NTSTATUS status;
TALLOC_CTX *tmp_ctx = NULL;
- DATA_BLOB input = data_blob(NULL, 0);
- DATA_BLOB output = data_blob(NULL, 0);
+ DATA_BLOB input = {};
+ DATA_BLOB output = {};
bool first = true;
int wrap_flags = 0;
uint32_t old_gensec_features;
struct composite_context *c = (struct composite_context *)req->async.private_data;
struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state);
struct smbcli_session *session = req->session;
- DATA_BLOB null_data_blob = data_blob(NULL, 0);
+ DATA_BLOB null_data_blob = {};
NTSTATUS session_key_err, nt_status;
struct smbcli_request *check_req = NULL;
const char *os = NULL;
*/
DATA_BLOB names_blob = NTLMv2_generate_names_blob(state, NULL, domain);
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
int flags = CLI_CRED_NTLM_AUTH;
if (session->options.lanman_auth) {
const char *attr_name)
{
NTSTATUS status;
- DATA_BLOB blob = data_blob(NULL, 0);
+ DATA_BLOB blob = {};
char *aname = talloc_asprintf(NULL, "%s%s", attr_prefix, attr_name);
if (aname == NULL) {
return NT_STATUS_NO_MEMORY;
TALLOC_CTX *mem_ctx, DATA_BLOB *auth_blob,
struct trustDomainPasswords *auth_struct)
{
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
enum ndr_err_code ndr_err;
NTSTATUS nt_status;
gnutls_cipher_hd_t cipher_hnd = NULL;
{
NTSTATUS nt_status;
DATA_BLOB new_password;
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
gnutls_cipher_hd_t cipher_hnd = NULL;
gnutls_datum_t _session_key;
struct auth_session_info *session_info =
/* The confounder is in the last 16 bytes of the buffer */
DATA_BLOB confounder = data_blob_const(&pwbuf->data[516], 16);
DATA_BLOB pw_data = data_blob_const(pwbuf->data, 516);
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
int rc;
bool encrypted;
{
struct samr_Password *d_lm_pwd_hash = NULL, *d_nt_pwd_hash = NULL;
uint8_t random_session_key[16] = { 0, };
- DATA_BLOB session_key = data_blob(NULL, 0);
+ DATA_BLOB session_key = {};
DATA_BLOB in, out;
NTSTATUS nt_status = NT_STATUS_OK;
int rc;
} else {
struct cli_credentials *server_credentials;
struct gensec_security *gensec_security;
- DATA_BLOB null_data_blob = data_blob(NULL, 0);
- DATA_BLOB blob = data_blob_null;
+ DATA_BLOB null_data_blob = {};
+ DATA_BLOB blob = {};
const char *oid;
NTSTATUS nt_status;
size_t size = 0;
int i;
uint8_t *p;
- DATA_BLOB blob = data_blob(NULL, 0);
+ DATA_BLOB blob = {};
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_notify);
SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, true, 0));
static NTSTATUS smb2srv_negprot_secblob(struct smb2srv_request *req, DATA_BLOB *_blob)
{
struct gensec_security *gensec_security;
- DATA_BLOB null_data_blob = data_blob(NULL, 0);
+ DATA_BLOB null_data_blob = {};
DATA_BLOB blob;
NTSTATUS nt_status;
struct cli_credentials *server_credentials;
{
bool pass = true;
NTSTATUS nt_status;
- DATA_BLOB ntlmv2_response = data_blob(NULL, 0);
- DATA_BLOB lmv2_response = data_blob(NULL, 0);
- DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
+ DATA_BLOB ntlmv2_response = {};
+ DATA_BLOB lmv2_response = {};
+ DATA_BLOB lmv2_session_key = {};
+ DATA_BLOB ntlmv2_session_key = {};
DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, TEST_MACHINE_NAME, samlogon_state->workgroup);
uint8_t lm_session_key[8];
{
bool pass = true;
NTSTATUS nt_status;
- DATA_BLOB ntlmv2_response = data_blob(NULL, 0);
- DATA_BLOB lmv2_response = data_blob(NULL, 0);
- DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
+ DATA_BLOB ntlmv2_response = {};
+ DATA_BLOB lmv2_response = {};
+ DATA_BLOB lmv2_session_key = {};
+ DATA_BLOB ntlmv2_session_key = {};
DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->netbios_name, samlogon_state->workgroup);
DATA_BLOB ntlm_response = data_blob_talloc(samlogon_state->mem_ctx, NULL, 24);
static bool test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_break break_which, char **error_string)
{
NTSTATUS nt_status;
- DATA_BLOB nt_response = data_blob(NULL, 0);
- DATA_BLOB lm_response = data_blob(NULL, 0);
+ DATA_BLOB nt_response = {};
+ DATA_BLOB lm_response = {};
char *password;
char *dospw;
smb_ucs2_t *unicodepw;