mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3: Remove use of iconv_convenience.
This commit is contained in:
parent
f9ca9e46ad
commit
b8268cf7b0
@ -36,10 +36,10 @@ do { \
|
||||
return NT_STATUS_OK; \
|
||||
} while(0);
|
||||
|
||||
#define NTLMSSP_PUSH_MESSAGE(type, blob, mem_ctx, ic, r) \
|
||||
#define NTLMSSP_PUSH_MESSAGE(type, blob, mem_ctx, r) \
|
||||
do { \
|
||||
enum ndr_err_code __ndr_err; \
|
||||
__ndr_err = ndr_push_struct_blob(blob, mem_ctx, ic, r, \
|
||||
__ndr_err = ndr_push_struct_blob(blob, mem_ctx, r, \
|
||||
(ndr_push_flags_fn_t)ndr_push_ ##type); \
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(__ndr_err)) { \
|
||||
return ndr_map_error2ntstatus(__ndr_err); \
|
||||
@ -52,7 +52,6 @@ do { \
|
||||
* Pull NTLMSSP NEGOTIATE_MESSAGE struct from a blob
|
||||
* @param blob The plain packet blob
|
||||
* @param mem_ctx A talloc context
|
||||
* @param ic Iconv convenience structure
|
||||
* @param r Pointer to a NTLMSSP NEGOTIATE_MESSAGE structure
|
||||
*/
|
||||
|
||||
@ -67,7 +66,6 @@ NTSTATUS ntlmssp_pull_NEGOTIATE_MESSAGE(const DATA_BLOB *blob,
|
||||
* Pull NTLMSSP CHALLENGE_MESSAGE struct from a blob
|
||||
* @param blob The plain packet blob
|
||||
* @param mem_ctx A talloc context
|
||||
* @param ic Iconv convenience structure
|
||||
* @param r Pointer to a NTLMSSP CHALLENGE_MESSAGE structure
|
||||
*/
|
||||
|
||||
@ -82,7 +80,6 @@ NTSTATUS ntlmssp_pull_CHALLENGE_MESSAGE(const DATA_BLOB *blob,
|
||||
* Pull NTLMSSP AUTHENTICATE_MESSAGE struct from a blob
|
||||
* @param blob The plain packet blob
|
||||
* @param mem_ctx A talloc context
|
||||
* @param ic Iconv convenience structure
|
||||
* @param r Pointer to a NTLMSSP AUTHENTICATE_MESSAGE structure
|
||||
*/
|
||||
|
||||
@ -97,7 +94,6 @@ NTSTATUS ntlmssp_pull_AUTHENTICATE_MESSAGE(const DATA_BLOB *blob,
|
||||
* Push NTLMSSP NEGOTIATE_MESSAGE struct into a blob
|
||||
* @param blob The plain packet blob
|
||||
* @param mem_ctx A talloc context
|
||||
* @param ic Iconv convenience structure
|
||||
* @param r Pointer to a NTLMSSP NEGOTIATE_MESSAGE structure
|
||||
*/
|
||||
|
||||
@ -112,7 +108,6 @@ NTSTATUS ntlmssp_push_NEGOTIATE_MESSAGE(DATA_BLOB *blob,
|
||||
* Push NTLMSSP CHALLENGE_MESSAGE struct into a blob
|
||||
* @param blob The plain packet blob
|
||||
* @param mem_ctx A talloc context
|
||||
* @param ic Iconv convenience structure
|
||||
* @param r Pointer to a NTLMSSP CHALLENGE_MESSAGE structure
|
||||
*/
|
||||
|
||||
@ -127,7 +122,6 @@ NTSTATUS ntlmssp_push_CHALLENGE_MESSAGE(DATA_BLOB *blob,
|
||||
* Push NTLMSSP AUTHENTICATE_MESSAGE struct into a blob
|
||||
* @param blob The plain packet blob
|
||||
* @param mem_ctx A talloc context
|
||||
* @param ic Iconv convenience structure
|
||||
* @param r Pointer to a NTLMSSP AUTHENTICATE_MESSAGE structure
|
||||
*/
|
||||
|
||||
|
@ -160,7 +160,7 @@ sub ParseFunction($$)
|
||||
pidl "\treturn false;";
|
||||
pidl "}";
|
||||
pidl "";
|
||||
pidl "pull = ndr_pull_init_blob(&blob, r, NULL);";
|
||||
pidl "pull = ndr_pull_init_blob(&blob, r);";
|
||||
pidl "if (pull == NULL) {";
|
||||
pidl "\ttalloc_free(r);";
|
||||
pidl "\treturn false;";
|
||||
@ -196,7 +196,7 @@ sub ParseFunction($$)
|
||||
pidl "\tNDR_PRINT_OUT_DEBUG($fn->{NAME}, r);";
|
||||
pidl "}";
|
||||
pidl "";
|
||||
pidl "push = ndr_push_init_ctx(r, NULL);";
|
||||
pidl "push = ndr_push_init_ctx(r);";
|
||||
pidl "if (push == NULL) {";
|
||||
pidl "\ttalloc_free(r);";
|
||||
pidl "\treturn false;";
|
||||
|
@ -691,7 +691,7 @@ struct eventlog_Record_tdb *evlog_pull_record_tdb(TALLOC_CTX *mem_ctx,
|
||||
|
||||
blob = data_blob_const(data.dptr, data.dsize);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, r,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, r,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_eventlog_Record_tdb);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -741,7 +741,7 @@ struct EVENTLOGRECORD *evlog_pull_record(TALLOC_CTX *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
r->Length = r->Length2 = ndr_size_EVENTLOGRECORD(r, NULL, 0);
|
||||
r->Length = r->Length2 = ndr_size_EVENTLOGRECORD(r, 0);
|
||||
|
||||
return r;
|
||||
}
|
||||
@ -785,7 +785,7 @@ NTSTATUS evlog_push_record_tdb(TALLOC_CTX *mem_ctx,
|
||||
/* read */
|
||||
r->record_number = tdb_fetch_int32(tdb, EVT_NEXT_RECORD);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, r,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, r,
|
||||
(ndr_push_flags_fn_t)ndr_push_eventlog_Record_tdb);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
tdb_unlock_bystring(tdb, EVT_NEXT_RECORD);
|
||||
@ -1007,7 +1007,7 @@ NTSTATUS evlog_convert_tdb_to_evt(TALLOC_CTX *mem_ctx,
|
||||
goto done;
|
||||
}
|
||||
|
||||
endoffset += ndr_size_EVENTLOGRECORD(&e, NULL, 0);
|
||||
endoffset += ndr_size_EVENTLOGRECORD(&e, 0);
|
||||
|
||||
ADD_TO_ARRAY(mem_ctx, struct EVENTLOGRECORD, e, &evt.records, &num_records);
|
||||
count++;
|
||||
@ -1034,7 +1034,7 @@ NTSTATUS evlog_convert_tdb_to_evt(TALLOC_CTX *mem_ctx,
|
||||
NDR_PRINT_DEBUG(EVENTLOGEOF, &evt.eof);
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, &evt,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &evt,
|
||||
(ndr_push_flags_fn_t)ndr_push_EVENTLOG_EVT_FILE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -201,7 +201,7 @@ static NTSTATUS messaging_tdb_fetch(TDB_CONTEXT *msg_tdb,
|
||||
blob = data_blob_const(data.dptr, data.dsize);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, result, NULL, result,
|
||||
&blob, result, result,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_messaging_array);
|
||||
|
||||
SAFE_FREE(data.dptr);
|
||||
@ -243,8 +243,7 @@ static NTSTATUS messaging_tdb_store(TDB_CONTEXT *msg_tdb,
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, mem_ctx, NULL, array,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, array,
|
||||
(ndr_push_flags_fn_t)ndr_push_messaging_array);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -206,11 +206,11 @@ SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
|
||||
}
|
||||
|
||||
if (dst->owner_sid != NULL) {
|
||||
offset += ndr_size_dom_sid(dst->owner_sid, NULL, 0);
|
||||
offset += ndr_size_dom_sid(dst->owner_sid, 0);
|
||||
}
|
||||
|
||||
if (dst->group_sid != NULL) {
|
||||
offset += ndr_size_dom_sid(dst->group_sid, NULL, 0);
|
||||
offset += ndr_size_dom_sid(dst->group_sid, 0);
|
||||
}
|
||||
|
||||
*sd_size = (size_t)offset;
|
||||
@ -249,7 +249,7 @@ NTSTATUS marshall_sec_desc(TALLOC_CTX *mem_ctx,
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, mem_ctx, NULL, secdesc,
|
||||
&blob, mem_ctx, secdesc,
|
||||
(ndr_push_flags_fn_t)ndr_push_security_descriptor);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -275,7 +275,7 @@ NTSTATUS marshall_sec_desc_buf(TALLOC_CTX *mem_ctx,
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, mem_ctx, NULL, secdesc_buf,
|
||||
&blob, mem_ctx, secdesc_buf,
|
||||
(ndr_push_flags_fn_t)ndr_push_sec_desc_buf);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -310,8 +310,7 @@ NTSTATUS unmarshall_sec_desc(TALLOC_CTX *mem_ctx, uint8 *data, size_t len,
|
||||
|
||||
blob = data_blob_const(data, len);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, result, NULL, result,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, result, result,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -347,8 +346,7 @@ NTSTATUS unmarshall_sec_desc_buf(TALLOC_CTX *mem_ctx, uint8_t *data, size_t len,
|
||||
|
||||
blob = data_blob_const(data, len);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, result, NULL, result,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, result, result,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_sec_desc_buf);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -303,7 +303,7 @@ SEC_DESC *get_share_security( TALLOC_CTX *ctx, const char *servicename,
|
||||
}
|
||||
|
||||
if (psd) {
|
||||
*psize = ndr_size_security_descriptor(psd, NULL, 0);
|
||||
*psize = ndr_size_security_descriptor(psd, 0);
|
||||
} else {
|
||||
return get_share_security_default(ctx, psize,
|
||||
GENERIC_ALL_ACCESS);
|
||||
|
@ -110,7 +110,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
|
||||
|
||||
blob = data_blob_const(data, length);
|
||||
|
||||
if (!pull_reg_multi_sz(mem_ctx, NULL, &blob, &vals)) {
|
||||
if (!pull_reg_multi_sz(mem_ctx, &blob, &vals)) {
|
||||
err = WERR_NOMEM;
|
||||
goto error;
|
||||
}
|
||||
@ -156,7 +156,7 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
case REG_SZ:
|
||||
case REG_EXPAND_SZ: {
|
||||
if (!push_reg_sz(mem_ctx, NULL, presult, value->v.sz.str))
|
||||
if (!push_reg_sz(mem_ctx, presult, value->v.sz.str))
|
||||
{
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
@ -178,7 +178,7 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
array[i] = NULL;
|
||||
|
||||
if (!push_reg_multi_sz(mem_ctx, NULL, presult, array)) {
|
||||
if (!push_reg_multi_sz(mem_ctx, presult, array)) {
|
||||
talloc_free(array);
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ bool sid_linearize(char *outbuf, size_t len, const DOM_SID *sid)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (len < ndr_size_dom_sid(sid, NULL, 0))
|
||||
if (len < ndr_size_dom_sid(sid, 0))
|
||||
return False;
|
||||
|
||||
SCVAL(outbuf,0,sid->sid_rev_num);
|
||||
@ -538,7 +538,7 @@ char *sid_binstring(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
|
||||
{
|
||||
uint8_t *buf;
|
||||
char *s;
|
||||
int len = ndr_size_dom_sid(sid, NULL, 0);
|
||||
int len = ndr_size_dom_sid(sid, 0);
|
||||
buf = talloc_array(mem_ctx, uint8_t, len);
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
@ -557,7 +557,7 @@ char *sid_binstring(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
|
||||
char *sid_binstring_hex(const DOM_SID *sid)
|
||||
{
|
||||
char *buf, *s;
|
||||
int len = ndr_size_dom_sid(sid, NULL, 0);
|
||||
int len = ndr_size_dom_sid(sid, 0);
|
||||
buf = (char *)SMB_MALLOC(len);
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
@ -112,8 +112,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(pac_data_blob, pac_data,
|
||||
NULL, pac_data,
|
||||
ndr_err = ndr_pull_struct_blob(pac_data_blob, pac_data, pac_data,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_PAC_DATA);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -128,8 +127,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(pac_data_blob, pac_data_raw,
|
||||
NULL, pac_data_raw,
|
||||
ndr_err = ndr_pull_struct_blob(pac_data_blob, pac_data_raw, pac_data_raw,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_PAC_DATA_RAW);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -209,8 +207,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
/* Find and zero out the signatures, as required by the signing algorithm */
|
||||
|
||||
/* We find the data blobs above, now we parse them to get at the exact portion we should zero */
|
||||
ndr_err = ndr_pull_struct_blob(kdc_sig_blob, kdc_sig_wipe,
|
||||
NULL, kdc_sig_wipe,
|
||||
ndr_err = ndr_pull_struct_blob(kdc_sig_blob, kdc_sig_wipe, kdc_sig_wipe,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -219,8 +216,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
return status;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(srv_sig_blob, srv_sig_wipe,
|
||||
NULL, srv_sig_wipe,
|
||||
ndr_err = ndr_pull_struct_blob(srv_sig_blob, srv_sig_wipe, srv_sig_wipe,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_PAC_SIGNATURE_DATA);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -234,8 +230,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
memset(srv_sig_wipe->signature.data, '\0', srv_sig_wipe->signature.length);
|
||||
|
||||
/* and reencode, back into the same place it came from */
|
||||
ndr_err = ndr_push_struct_blob(kdc_sig_blob, pac_data_raw,
|
||||
NULL, kdc_sig_wipe,
|
||||
ndr_err = ndr_push_struct_blob(kdc_sig_blob, pac_data_raw, kdc_sig_wipe,
|
||||
(ndr_push_flags_fn_t)ndr_push_PAC_SIGNATURE_DATA);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -243,8 +238,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
nt_errstr(status)));
|
||||
return status;
|
||||
}
|
||||
ndr_err = ndr_push_struct_blob(srv_sig_blob, pac_data_raw,
|
||||
NULL, srv_sig_wipe,
|
||||
ndr_err = ndr_push_struct_blob(srv_sig_blob, pac_data_raw, srv_sig_wipe,
|
||||
(ndr_push_flags_fn_t)ndr_push_PAC_SIGNATURE_DATA);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -255,7 +249,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
|
||||
|
||||
/* push out the whole structure, but now with zero'ed signatures */
|
||||
ndr_err = ndr_push_struct_blob(&modified_pac_blob, pac_data_raw,
|
||||
NULL, pac_data_raw,
|
||||
pac_data_raw,
|
||||
(ndr_push_flags_fn_t)ndr_push_PAC_DATA_RAW);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -92,7 +92,7 @@ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx,
|
||||
io.in.version = nt_version;
|
||||
io.in.map_response = false;
|
||||
|
||||
status = cldap_netlogon(cldap, NULL, reply, &io);
|
||||
status = cldap_netlogon(cldap, reply, &io);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(2,("cldap_netlogon() failed: %s\n", nt_errstr(status)));
|
||||
goto failed;
|
||||
|
@ -90,9 +90,8 @@ kerb_prompter(krb5_context ctx, void *data,
|
||||
|
||||
data_blob_free(&edata);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob_all(&unwrapped_edata, mem_ctx, NULL,
|
||||
&parsed_edata,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_KRB5_EDATA_NTSTATUS);
|
||||
ndr_err = ndr_pull_struct_blob_all(&unwrapped_edata, mem_ctx,
|
||||
&parsed_edata, (ndr_pull_flags_fn_t)ndr_pull_KRB5_EDATA_NTSTATUS);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
data_blob_free(&unwrapped_edata);
|
||||
TALLOC_FREE(mem_ctx);
|
||||
|
@ -52,8 +52,7 @@ static NTSTATUS keytab_startup(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
|
||||
enum ndr_err_code ndr_err;
|
||||
old_utdv = talloc(mem_ctx, struct replUpToDateVectorBlob);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&entry->password, old_utdv,
|
||||
NULL, old_utdv,
|
||||
ndr_err = ndr_pull_struct_blob(&entry->password, old_utdv, old_utdv,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -91,7 +90,7 @@ static NTSTATUS keytab_finish(struct dssync_context *ctx, TALLOC_CTX *mem_ctx,
|
||||
NDR_PRINT_DEBUG(replUpToDateVectorBlob, new_utdv);
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, new_utdv,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, new_utdv,
|
||||
(ndr_push_flags_fn_t)ndr_push_replUpToDateVectorBlob);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -146,7 +145,7 @@ static NTSTATUS parse_supplemental_credentials(TALLOC_CTX *mem_ctx,
|
||||
bool newer_keys = false;
|
||||
uint32_t j;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob_all(blob, mem_ctx, NULL, &scb,
|
||||
ndr_err = ndr_pull_struct_blob_all(blob, mem_ctx, &scb,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_supplementalCredentialsBlob);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -203,7 +202,7 @@ static NTSTATUS parse_supplemental_credentials(TALLOC_CTX *mem_ctx,
|
||||
status = NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
ndr_err = ndr_pull_struct_blob(&scpk_blob, mem_ctx, NULL, pkb,
|
||||
ndr_err = ndr_pull_struct_blob(&scpk_blob, mem_ctx, pkb,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -396,7 +396,7 @@ NTSTATUS pull_netr_AcctLockStr(TALLOC_CTX *mem_ctx,
|
||||
|
||||
blob = data_blob_const(r->array, r->length);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, str,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, str,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -182,7 +182,7 @@ bool send_getdc_request(TALLOC_CTX *mem_ctx,
|
||||
NDR_PRINT_DEBUG(nbt_netlogon_packet, &packet);
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, &packet,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &packet,
|
||||
(ndr_push_flags_fn_t)ndr_push_nbt_netlogon_packet);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return false;
|
||||
@ -250,7 +250,7 @@ bool receive_getdc_response(TALLOC_CTX *mem_ctx,
|
||||
blob.data += 4;
|
||||
blob.length -= 4;
|
||||
|
||||
ndr_err = ndr_pull_union_blob_all(&blob, mem_ctx, NULL, &p, DGRAM_SMB,
|
||||
ndr_err = ndr_pull_union_blob_all(&blob, mem_ctx, &p, DGRAM_SMB,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_dgram_smb_packet);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0,("failed to parse packet\n"));
|
||||
@ -270,7 +270,7 @@ bool receive_getdc_response(TALLOC_CTX *mem_ctx,
|
||||
|
||||
ZERO_STRUCT(r);
|
||||
|
||||
status = pull_netlogon_samlogon_response(&blob, mem_ctx, NULL, &r);
|
||||
status = pull_netlogon_samlogon_response(&blob, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ bool cli_get_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
|
||||
SIVAL(params, 8,0x00000000);
|
||||
SIVAL(params,12,0x00000024);
|
||||
|
||||
sid_len = ndr_size_dom_sid(&pqt->sid, NULL, 0);
|
||||
sid_len = ndr_size_dom_sid(&pqt->sid, 0);
|
||||
data_len = sid_len+8;
|
||||
SIVAL(data, 0, 0x00000000);
|
||||
SIVAL(data, 4, sid_len);
|
||||
@ -207,7 +207,7 @@ bool cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_STRUC
|
||||
|
||||
SSVAL(params,0,quota_fnum);
|
||||
|
||||
sid_len = ndr_size_dom_sid(&pqt->sid, NULL, 0);
|
||||
sid_len = ndr_size_dom_sid(&pqt->sid, 0);
|
||||
SIVAL(data,0,0);
|
||||
SIVAL(data,4,sid_len);
|
||||
SBIG_UINT(data, 8,(uint64_t)0);
|
||||
|
@ -191,7 +191,7 @@ static NTSTATUS store_cldap_reply(TALLOC_CTX *mem_ctx,
|
||||
r->sockaddr.sockaddr_family = 2; /* AF_INET */
|
||||
r->sockaddr.pdc_ip = talloc_strdup(mem_ctx, addr);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, r,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, r,
|
||||
(ndr_push_flags_fn_t)ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return ndr_map_error2ntstatus(ndr_err);
|
||||
@ -342,7 +342,7 @@ static NTSTATUS dsgetdcname_cache_fetch(TALLOC_CTX *mem_ctx,
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, &r,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &r,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX);
|
||||
|
||||
data_blob_free(&blob);
|
||||
|
@ -469,7 +469,6 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
if (NT_STATUS_IS_OK(ntlmssp_pull_NEGOTIATE_MESSAGE(&request,
|
||||
ntlmssp_state,
|
||||
NULL,
|
||||
&negotiate)))
|
||||
{
|
||||
NDR_PRINT_DEBUG(NEGOTIATE_MESSAGE, &negotiate);
|
||||
@ -541,7 +540,6 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
if (NT_STATUS_IS_OK(ntlmssp_pull_CHALLENGE_MESSAGE(reply,
|
||||
ntlmssp_state,
|
||||
NULL,
|
||||
&challenge)))
|
||||
{
|
||||
NDR_PRINT_DEBUG(CHALLENGE_MESSAGE, &challenge);
|
||||
@ -645,7 +643,6 @@ static NTSTATUS ntlmssp_server_auth(struct ntlmssp_state *ntlmssp_state,
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
if (NT_STATUS_IS_OK(ntlmssp_pull_AUTHENTICATE_MESSAGE(&request,
|
||||
ntlmssp_state,
|
||||
NULL,
|
||||
&authenticate)))
|
||||
{
|
||||
NDR_PRINT_DEBUG(AUTHENTICATE_MESSAGE, &authenticate);
|
||||
@ -935,7 +932,6 @@ static NTSTATUS ntlmssp_client_initial(struct ntlmssp_state *ntlmssp_state,
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
if (NT_STATUS_IS_OK(ntlmssp_pull_NEGOTIATE_MESSAGE(next_request,
|
||||
ntlmssp_state,
|
||||
NULL,
|
||||
&negotiate)))
|
||||
{
|
||||
NDR_PRINT_DEBUG(NEGOTIATE_MESSAGE, &negotiate);
|
||||
@ -1040,7 +1036,6 @@ noccache:
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
if (NT_STATUS_IS_OK(ntlmssp_pull_CHALLENGE_MESSAGE(&reply,
|
||||
ntlmssp_state,
|
||||
NULL,
|
||||
&challenge)))
|
||||
{
|
||||
NDR_PRINT_DEBUG(CHALLENGE_MESSAGE, &challenge);
|
||||
@ -1229,7 +1224,6 @@ noccache:
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
if (NT_STATUS_IS_OK(ntlmssp_pull_AUTHENTICATE_MESSAGE(next_request,
|
||||
ntlmssp_state,
|
||||
NULL,
|
||||
&authenticate)))
|
||||
{
|
||||
NDR_PRINT_DEBUG(AUTHENTICATE_MESSAGE, &authenticate);
|
||||
|
@ -178,7 +178,7 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
|
||||
NDR_PRINT_DEBUG(netsamlogoncache_entry, &r);
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, &r,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &r,
|
||||
(ndr_push_flags_fn_t)ndr_push_netsamlogoncache_entry);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0,("netsamlogon_cache_store: failed to push entry to cache\n"));
|
||||
@ -234,7 +234,7 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const DOM_SID *
|
||||
|
||||
blob = data_blob_const(data.dptr, data.dsize);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, &r,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &r,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_netsamlogoncache_entry);
|
||||
|
||||
if (DEBUGLEVEL >= 10) {
|
||||
|
@ -77,7 +77,7 @@ static NTSTATUS parse_acl_blob(const DATA_BLOB *pblob,
|
||||
enum ndr_err_code ndr_err;
|
||||
size_t sd_size;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(pblob, ctx, NULL, &xacl,
|
||||
ndr_err = ndr_pull_struct_blob(pblob, ctx, &xacl,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_xattr_NTACL);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -144,7 +144,7 @@ static NTSTATUS create_acl_blob(const struct security_descriptor *psd,
|
||||
memcpy(&xacl.info.sd_hs3->hash[0], hash, XATTR_SD_HASH_SIZE);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
pblob, ctx, NULL, &xacl,
|
||||
pblob, ctx, &xacl,
|
||||
(ndr_push_flags_fn_t)ndr_push_xattr_NTACL);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -47,8 +47,7 @@ static NTSTATUS xattr_tdb_pull_attrs(TALLOC_CTX *mem_ctx,
|
||||
|
||||
blob = data_blob_const(data->dptr, data->dsize);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, result, NULL, result,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, result, result,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_tdb_xattrs);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -73,8 +72,7 @@ static NTSTATUS xattr_tdb_push_attrs(TALLOC_CTX *mem_ctx,
|
||||
DATA_BLOB blob;
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, mem_ctx, NULL, attribs,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, attribs,
|
||||
(ndr_push_flags_fn_t)ndr_push_tdb_xattrs);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -183,7 +183,7 @@ static void nmbd_proxy_logon(struct nmbd_proxy_logon_context *ctx,
|
||||
state->p = p;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, state, NULL, &state->req,
|
||||
&blob, state, &state->req,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_nbt_netlogon_packet);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
NTSTATUS status = ndr_map_error2ntstatus(ndr_err);
|
||||
@ -269,7 +269,7 @@ static void nmbd_proxy_logon_done(struct tevent_req *subreq)
|
||||
NTSTATUS status;
|
||||
DATA_BLOB response = data_blob_null;
|
||||
|
||||
status = cldap_netlogon_recv(subreq, NULL, state, &state->io);
|
||||
status = cldap_netlogon_recv(subreq, state, &state->io);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("failed to recv cldap netlogon call: %s\n",
|
||||
nt_errstr(status)));
|
||||
@ -277,7 +277,7 @@ static void nmbd_proxy_logon_done(struct tevent_req *subreq)
|
||||
return;
|
||||
}
|
||||
|
||||
status = push_netlogon_samlogon_response(&response, state, NULL,
|
||||
status = push_netlogon_samlogon_response(&response, state,
|
||||
&state->io.out.netlogon);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(0,("failed to push netlogon_samlogon_response: %s\n",
|
||||
|
@ -1024,7 +1024,7 @@ static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
|
||||
|
||||
memcpy(psid, cache_value.data, MIN(sizeof(*psid), cache_value.length));
|
||||
SMB_ASSERT(cache_value.length >= offsetof(struct dom_sid, id_auth));
|
||||
SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, NULL, 0));
|
||||
SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, 0));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1038,7 +1038,7 @@ static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
|
||||
DATA_BLOB cache_value;
|
||||
|
||||
if (!memcache_lookup(NULL, SID_UID_CACHE,
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
|
||||
&cache_value)) {
|
||||
return false;
|
||||
}
|
||||
@ -1056,11 +1056,11 @@ static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
|
||||
void store_uid_sid_cache(const DOM_SID *psid, uid_t uid)
|
||||
{
|
||||
memcache_add(NULL, SID_UID_CACHE,
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
|
||||
data_blob_const(&uid, sizeof(uid)));
|
||||
memcache_add(NULL, UID_SID_CACHE,
|
||||
data_blob_const(&uid, sizeof(uid)),
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)));
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, 0)));
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
@ -1079,7 +1079,7 @@ static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
|
||||
|
||||
memcpy(psid, cache_value.data, MIN(sizeof(*psid), cache_value.length));
|
||||
SMB_ASSERT(cache_value.length >= offsetof(struct dom_sid, id_auth));
|
||||
SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, NULL, 0));
|
||||
SMB_ASSERT(cache_value.length == ndr_size_dom_sid(psid, 0));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1093,7 +1093,7 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
|
||||
DATA_BLOB cache_value;
|
||||
|
||||
if (!memcache_lookup(NULL, SID_GID_CACHE,
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
|
||||
&cache_value)) {
|
||||
return false;
|
||||
}
|
||||
@ -1111,11 +1111,11 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
|
||||
void store_gid_sid_cache(const DOM_SID *psid, gid_t gid)
|
||||
{
|
||||
memcache_add(NULL, SID_GID_CACHE,
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
|
||||
data_blob_const(&gid, sizeof(gid)));
|
||||
memcache_add(NULL, GID_SID_CACHE,
|
||||
data_blob_const(&gid, sizeof(gid)),
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)));
|
||||
data_blob_const(psid, ndr_size_dom_sid(psid, 0)));
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
|
@ -498,7 +498,7 @@ bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
|
||||
}
|
||||
|
||||
/* unpack trusted domain password */
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), NULL, &pass,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &pass,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_TRUSTED_DOM_PASS);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return false;
|
||||
@ -557,7 +557,7 @@ bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
|
||||
/* domain sid */
|
||||
sid_copy(&pass.domain_sid, sid);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), NULL, &pass,
|
||||
ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), &pass,
|
||||
(ndr_push_flags_fn_t)ndr_push_TRUSTED_DOM_PASS);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return false;
|
||||
@ -789,7 +789,7 @@ static int list_trusted_domain(struct db_record *rec, void *private_data)
|
||||
|
||||
blob = data_blob_const(rec->value.dptr, rec->value.dsize);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), NULL, &pass,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &pass,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_TRUSTED_DOM_PASS);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return false;
|
||||
|
@ -412,7 +412,7 @@ static int sec_desc_upg_fn( TDB_CONTEXT *the_tdb, TDB_DATA key,
|
||||
|
||||
/* store it back */
|
||||
|
||||
sd_size = ndr_size_security_descriptor(sd_store->sd, NULL, 0)
|
||||
sd_size = ndr_size_security_descriptor(sd_store->sd, 0)
|
||||
+ sizeof(SEC_DESC_BUF);
|
||||
|
||||
status = marshall_sec_desc_buf(ctx, sd_store, &data.dptr, &data.dsize);
|
||||
@ -3526,7 +3526,7 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
|
||||
case REG_SZ:
|
||||
blob = data_blob_const(regval_data_p(guid_val),
|
||||
regval_size(guid_val));
|
||||
pull_reg_sz(talloc_tos(), NULL, &blob, (const char **)&guid_str);
|
||||
pull_reg_sz(talloc_tos(), &blob, (const char **)&guid_str);
|
||||
ret = NT_STATUS_IS_OK(GUID_from_string( guid_str, guid ));
|
||||
talloc_free(guid_str);
|
||||
break;
|
||||
@ -4584,7 +4584,7 @@ static bool convert_driver_init(TALLOC_CTX *mem_ctx, NT_DEVICEMODE *nt_devmode,
|
||||
|
||||
blob = data_blob_const(data, data_len);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, &devmode,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &devmode,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_spoolss_DeviceMode);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(10,("convert_driver_init: error parsing spoolss_DeviceMode\n"));
|
||||
|
@ -442,7 +442,7 @@ WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
|
||||
return err;
|
||||
}
|
||||
|
||||
*secdescsize = ndr_size_security_descriptor(secdesc, NULL, 0);
|
||||
*secdescsize = ndr_size_security_descriptor(secdesc, 0);
|
||||
TALLOC_FREE(mem_ctx);
|
||||
|
||||
*last_changed_time = 0;
|
||||
|
@ -425,7 +425,7 @@ static void fill_in_printer_values(NT_PRINTER_INFO_LEVEL_2 *info2, struct regval
|
||||
DATA_BLOB blob;
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, values, NULL, devmode,
|
||||
ndr_err = ndr_push_struct_blob(&blob, values, devmode,
|
||||
(ndr_push_flags_fn_t)ndr_push_spoolss_DeviceMode);
|
||||
|
||||
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -579,7 +579,7 @@ static int find_valuename_index( const char *valuename )
|
||||
static void pull_reg_sz_fstring(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, fstring s)
|
||||
{
|
||||
const char *str;
|
||||
pull_reg_sz(mem_ctx, NULL, blob, &str);
|
||||
pull_reg_sz(mem_ctx, blob, &str);
|
||||
fstrcpy(s, str);
|
||||
}
|
||||
|
||||
@ -929,7 +929,7 @@ static void fill_in_driver_values(const struct spoolss_DriverInfo8 *r,
|
||||
break;
|
||||
}
|
||||
|
||||
push_reg_sz(talloc_tos(), NULL, &data, filename);
|
||||
push_reg_sz(talloc_tos(), &data, filename);
|
||||
memcpy( buffer+buffer_size, (char*)data.data, data.length);
|
||||
|
||||
buffer_size += (length + 1)*sizeof(uint16);
|
||||
|
@ -117,7 +117,7 @@ bool eventlog_init_keys(void)
|
||||
sizeof(uint32));
|
||||
|
||||
regval_ctr_addvalue_sz(values, "PrimaryModule", *elogs);
|
||||
push_reg_sz(talloc_tos(), NULL, &data, *elogs);
|
||||
push_reg_sz(talloc_tos(), &data, *elogs);
|
||||
|
||||
regval_ctr_addvalue(values, "Sources", REG_MULTI_SZ,
|
||||
(char *)data.data,
|
||||
@ -129,7 +129,7 @@ bool eventlog_init_keys(void)
|
||||
if (!evtfilepath) {
|
||||
TALLOC_FREE(values);
|
||||
}
|
||||
push_reg_sz(talloc_tos(), NULL, &data, evtfilepath);
|
||||
push_reg_sz(talloc_tos(), &data, evtfilepath);
|
||||
regval_ctr_addvalue(values, "File", REG_EXPAND_SZ, (char *)data.data,
|
||||
data.length);
|
||||
regdb_store_values(evtlogpath, values);
|
||||
@ -162,7 +162,7 @@ bool eventlog_init_keys(void)
|
||||
REG_DWORD,
|
||||
( char * ) &uiCategoryCount,
|
||||
sizeof( uint32 ) );
|
||||
push_reg_sz(talloc_tos(), NULL, &data,
|
||||
push_reg_sz(talloc_tos(), &data,
|
||||
"%SystemRoot%\\system32\\eventlog.dll");
|
||||
|
||||
regval_ctr_addvalue( values, "CategoryMessageFile",
|
||||
@ -259,7 +259,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
|
||||
dump_data( 1, rval->data_p, rval->size );
|
||||
|
||||
blob = data_blob_const(rval->data_p, rval->size);
|
||||
if (!pull_reg_multi_sz(talloc_tos(), NULL, &blob, &wrklist)) {
|
||||
if (!pull_reg_multi_sz(talloc_tos(), &blob, &wrklist)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
|
||||
memcpy( wp, wrklist, sizeof( char * ) * numsources );
|
||||
*( wp + numsources ) = ( char * ) sourcename;
|
||||
*( wp + numsources + 1 ) = NULL;
|
||||
if (!push_reg_multi_sz(ctx, NULL, &blob, wp)) {
|
||||
if (!push_reg_multi_sz(ctx, &blob, wp)) {
|
||||
return false;
|
||||
}
|
||||
dump_data( 1, blob.data, blob.length);
|
||||
|
@ -498,7 +498,7 @@ int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char
|
||||
{
|
||||
DATA_BLOB blob;
|
||||
|
||||
if (!push_reg_sz(ctr, NULL, &blob, data)) {
|
||||
if (!push_reg_sz(ctr, &blob, data)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const
|
||||
{
|
||||
DATA_BLOB blob;
|
||||
|
||||
if (!push_reg_multi_sz(ctr, NULL, &blob, data)) {
|
||||
if (!push_reg_multi_sz(ctr, &blob, data)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -608,7 +608,7 @@ const char *regval_sz(struct regval_blob *val)
|
||||
const char *data = NULL;
|
||||
DATA_BLOB blob = data_blob_const(regval_data_p(val), regval_size(val));
|
||||
|
||||
pull_reg_sz(talloc_tos(), NULL, &blob, &data);
|
||||
pull_reg_sz(talloc_tos(), &blob, &data);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ static uint32 _reg_perfcount_multi_sz_from_tdb(TDB_CONTEXT *tdb,
|
||||
buffer_size = 0;
|
||||
return buffer_size;
|
||||
}
|
||||
push_reg_sz(talloc_tos(), NULL, &name_index, (const char *)kbuf.dptr);
|
||||
push_reg_sz(talloc_tos(), &name_index, (const char *)kbuf.dptr);
|
||||
memcpy(buf1+buffer_size, (char *)name_index.data, working_size);
|
||||
buffer_size += working_size;
|
||||
/* Now encode the actual name */
|
||||
@ -197,7 +197,7 @@ static uint32 _reg_perfcount_multi_sz_from_tdb(TDB_CONTEXT *tdb,
|
||||
memset(temp, 0, sizeof(temp));
|
||||
memcpy(temp, dbuf.dptr, dbuf.dsize);
|
||||
SAFE_FREE(dbuf.dptr);
|
||||
push_reg_sz(talloc_tos(), NULL, &name, temp);
|
||||
push_reg_sz(talloc_tos(), &name, temp);
|
||||
memcpy(buf1+buffer_size, (char *)name.data, working_size);
|
||||
buffer_size += working_size;
|
||||
|
||||
|
@ -1576,7 +1576,7 @@ static uint32 sk_record_data_size( SEC_DESC * sd )
|
||||
|
||||
/* the record size is sizeof(hdr) + name + static members + data_size_field */
|
||||
|
||||
size = sizeof(uint32)*5 + ndr_size_security_descriptor(sd, NULL, 0) + sizeof(uint32);
|
||||
size = sizeof(uint32)*5 + ndr_size_security_descriptor(sd, 0) + sizeof(uint32);
|
||||
|
||||
/* multiple of 8 */
|
||||
size_mod8 = size & 0xfffffff8;
|
||||
@ -1806,7 +1806,7 @@ static int hashrec_cmp( REGF_HASH_REC *h1, REGF_HASH_REC *h2 )
|
||||
nk->sec_desc->ref_count = 0;
|
||||
|
||||
/* size value must be self-inclusive */
|
||||
nk->sec_desc->size = ndr_size_security_descriptor(sec_desc, NULL, 0)
|
||||
nk->sec_desc->size = ndr_size_security_descriptor(sec_desc, 0)
|
||||
+ sizeof(uint32);
|
||||
|
||||
DLIST_ADD_END( file->sec_desc_list, nk->sec_desc, REGF_SK_REC *);
|
||||
|
@ -1786,7 +1786,7 @@ static NTSTATUS create_schannel_auth_rpc_bind_req( struct rpc_pipe_client *cli,
|
||||
r.oem_netbios_domain.a = cli->auth->domain;
|
||||
r.oem_netbios_computer.a = global_myname();
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), NULL, &r,
|
||||
ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), &r,
|
||||
(ndr_push_flags_fn_t)ndr_push_NL_AUTH_MESSAGE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0,("Failed to marshall NL_AUTH_MESSAGE.\n"));
|
||||
|
@ -65,7 +65,7 @@ WERROR pull_spoolss_PrinterData(TALLOC_CTX *mem_ctx,
|
||||
enum winreg_Type type)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
ndr_err = ndr_pull_union_blob(blob, mem_ctx, NULL, data, type,
|
||||
ndr_err = ndr_pull_union_blob(blob, mem_ctx, data, type,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_spoolss_PrinterData);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return WERR_GENERAL_FAILURE;
|
||||
@ -81,7 +81,7 @@ WERROR push_spoolss_PrinterData(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
|
||||
union spoolss_PrinterData *data)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
ndr_err = ndr_push_union_blob(blob, mem_ctx, NULL, data, type,
|
||||
ndr_err = ndr_push_union_blob(blob, mem_ctx, data, type,
|
||||
(ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return WERR_GENERAL_FAILURE;
|
||||
|
@ -64,7 +64,7 @@ struct tevent_req *cli_do_rpc_ndr_send(TALLOC_CTX *mem_ctx,
|
||||
state->call->name, NDR_IN, r);
|
||||
}
|
||||
|
||||
push = ndr_push_init_ctx(talloc_tos(), NULL);
|
||||
push = ndr_push_init_ctx(talloc_tos());
|
||||
if (tevent_req_nomem(push, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
@ -131,7 +131,7 @@ NTSTATUS cli_do_rpc_ndr_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
pull = ndr_pull_init_blob(&blob, mem_ctx, NULL);
|
||||
pull = ndr_pull_init_blob(&blob, mem_ctx);
|
||||
if (pull == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ NTSTATUS _eventlog_ReadEventLogW(pipes_struct *p,
|
||||
break;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL, e,
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, e,
|
||||
(ndr_push_flags_fn_t)ndr_push_EVENTLOGRECORD);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return ndr_map_error2ntstatus(ndr_err);
|
||||
@ -648,7 +648,7 @@ NTSTATUS _eventlog_GetLogInformation(pipes_struct *p,
|
||||
/* FIXME: this should be retrieved from the handle */
|
||||
f.full = false;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL, &f,
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &f,
|
||||
(ndr_push_flags_fn_t)ndr_push_EVENTLOG_FULL_INFORMATION);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -419,7 +419,7 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
|
||||
}
|
||||
}
|
||||
|
||||
if (!push_reg_multi_sz(trusted_domains, NULL, &blob, trusted_domains)) {
|
||||
if (!push_reg_multi_sz(trusted_domains, &blob, trusted_domains)) {
|
||||
TALLOC_FREE(trusted_domains);
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
@ -726,8 +726,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
|
||||
|
||||
/* Store off the state so we can continue after client disconnect. */
|
||||
become_root();
|
||||
status = schannel_save_creds_state(p->mem_ctx,
|
||||
NULL, lp_private_dir(), creds);
|
||||
status = schannel_save_creds_state(p->mem_ctx, lp_private_dir(), creds);
|
||||
unbecome_root();
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -820,12 +819,9 @@ static NTSTATUS netr_creds_server_step_check(pipes_struct *p,
|
||||
}
|
||||
}
|
||||
|
||||
status = schannel_check_creds_state(mem_ctx, NULL,
|
||||
lp_private_dir(),
|
||||
computer_name,
|
||||
received_authenticator,
|
||||
return_authenticator,
|
||||
creds_out);
|
||||
status = schannel_check_creds_state(mem_ctx, lp_private_dir(),
|
||||
computer_name, received_authenticator,
|
||||
return_authenticator, creds_out);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -1396,8 +1392,7 @@ NTSTATUS _netr_LogonSamLogonEx(pipes_struct *p,
|
||||
struct netlogon_creds_CredentialState *creds = NULL;
|
||||
|
||||
become_root();
|
||||
status = schannel_get_creds_state(p->mem_ctx,
|
||||
NULL, lp_private_dir(),
|
||||
status = schannel_get_creds_state(p->mem_ctx, lp_private_dir(),
|
||||
r->in.computer_name, &creds);
|
||||
unbecome_root();
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
|
@ -103,7 +103,7 @@ WERROR _PNP_GetDeviceList(pipes_struct *p,
|
||||
|
||||
multi_sz[0] = devicepath;
|
||||
|
||||
if (!push_reg_multi_sz(multi_sz, NULL, &blob, multi_sz)) {
|
||||
if (!push_reg_multi_sz(multi_sz, &blob, multi_sz)) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
|
@ -1453,7 +1453,7 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
|
||||
blob = data_blob_const(prs_data_p(rpc_in_p) + prs_offset(rpc_in_p),
|
||||
prs_data_size(rpc_in_p));
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), NULL, &neg,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &neg,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_NL_AUTH_MESSAGE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0,("pipe_schannel_auth_bind: Could not unmarshal SCHANNEL auth neg\n"));
|
||||
@ -1476,9 +1476,8 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
|
||||
*/
|
||||
|
||||
become_root();
|
||||
status = schannel_get_creds_state(p, NULL, lp_private_dir(),
|
||||
neg.oem_netbios_computer.a,
|
||||
&creds);
|
||||
status = schannel_get_creds_state(p, lp_private_dir(),
|
||||
neg.oem_netbios_computer.a, &creds);
|
||||
unbecome_root();
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -1539,7 +1538,7 @@ static bool pipe_schannel_auth_bind(pipes_struct *p, prs_struct *rpc_in_p,
|
||||
* this has any meaning
|
||||
* here - gd */
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), NULL, &reply,
|
||||
ndr_err = ndr_push_struct_blob(&blob, talloc_tos(), &reply,
|
||||
(ndr_push_flags_fn_t)ndr_push_NL_AUTH_MESSAGE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0,("Failed to marshall NL_AUTH_MESSAGE.\n"));
|
||||
|
@ -1049,8 +1049,7 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
||||
req.level = 1;
|
||||
req.info.info1 = *info3;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&req_blob, talloc_tos(), NULL, &req,
|
||||
ndr_err = ndr_push_struct_blob(&req_blob, talloc_tos(), &req,
|
||||
(ndr_push_flags_fn_t)ndr_push_named_pipe_auth_req);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -1080,8 +1079,7 @@ static struct np_proxy_state *make_external_rpc_pipe_p(TALLOC_CTX *mem_ctx,
|
||||
DEBUG(10,("name_pipe_auth_rep(client)[%u]\n", (uint32_t)rep_blob.length));
|
||||
dump_data(10, rep_blob.data, rep_blob.length);
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&rep_blob, talloc_tos(), NULL, &rep,
|
||||
ndr_err = ndr_pull_struct_blob(&rep_blob, talloc_tos(), &rep,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_named_pipe_auth_rep);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -33,14 +33,14 @@
|
||||
#include "registry.h"
|
||||
|
||||
/* macros stolen from s4 spoolss server */
|
||||
#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
|
||||
((info)?ndr_size_##fn(info, level, ic, 0):0)
|
||||
#define SPOOLSS_BUFFER_UNION(fn,info,level) \
|
||||
((info)?ndr_size_##fn(info, level, 0):0)
|
||||
|
||||
#define SPOOLSS_BUFFER_UNION_ARRAY(mem_ctx,fn,ic,info,level,count) \
|
||||
((info)?ndr_size_##fn##_info(mem_ctx, ic, level, count, info):0)
|
||||
#define SPOOLSS_BUFFER_UNION_ARRAY(mem_ctx,fn,info,level,count) \
|
||||
((info)?ndr_size_##fn##_info(mem_ctx, level, count, info):0)
|
||||
|
||||
#define SPOOLSS_BUFFER_ARRAY(mem_ctx,fn,ic,info,count) \
|
||||
((info)?ndr_size_##fn##_info(mem_ctx, ic, count, info):0)
|
||||
#define SPOOLSS_BUFFER_ARRAY(mem_ctx,fn,info,count) \
|
||||
((info)?ndr_size_##fn##_info(mem_ctx, count, info):0)
|
||||
|
||||
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= *r->out.needed)?val_true:val_false)
|
||||
|
||||
@ -2253,7 +2253,7 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX *mem_ctx,
|
||||
os.build = 2195; /* build */
|
||||
os.extra_string = ""; /* leave extra string empty */
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, &os,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, &os,
|
||||
(ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return WERR_GENERAL_FAILURE;
|
||||
@ -4335,7 +4335,7 @@ WERROR _spoolss_EnumPrinters(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumPrinters, NULL,
|
||||
spoolss_EnumPrinters,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -4425,7 +4425,7 @@ WERROR _spoolss_GetPrinter(pipes_struct *p,
|
||||
return result;
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrinterInfo, NULL,
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrinterInfo,
|
||||
r->out.info, r->in.level);
|
||||
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
|
||||
|
||||
@ -5147,7 +5147,7 @@ WERROR _spoolss_GetPrinterDriver2(pipes_struct *p,
|
||||
return result;
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverInfo, NULL,
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverInfo,
|
||||
r->out.info, r->in.level);
|
||||
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
|
||||
|
||||
@ -5805,7 +5805,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
*/
|
||||
|
||||
if (!strequal(printer->info_2->comment, old_printer->info_2->comment)) {
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->comment);
|
||||
push_reg_sz(talloc_tos(), &buffer, printer->info_2->comment);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "description",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
|
||||
@ -5813,7 +5813,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
}
|
||||
|
||||
if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) {
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->sharename);
|
||||
push_reg_sz(talloc_tos(), &buffer, printer->info_2->sharename);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shareName",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
|
||||
@ -5829,7 +5829,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
pname = printer->info_2->printername;
|
||||
|
||||
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, pname);
|
||||
push_reg_sz(talloc_tos(), &buffer, pname);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "printerName",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
|
||||
@ -5837,7 +5837,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
}
|
||||
|
||||
if (!strequal(printer->info_2->portname, old_printer->info_2->portname)) {
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->portname);
|
||||
push_reg_sz(talloc_tos(), &buffer, printer->info_2->portname);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "portName",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
|
||||
@ -5845,7 +5845,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
}
|
||||
|
||||
if (!strequal(printer->info_2->location, old_printer->info_2->location)) {
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->location);
|
||||
push_reg_sz(talloc_tos(), &buffer, printer->info_2->location);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "location",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
|
||||
@ -5855,7 +5855,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
/* here we need to update some more DsSpooler keys */
|
||||
/* uNCName, serverName, shortServerName */
|
||||
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, global_myname());
|
||||
push_reg_sz(talloc_tos(), &buffer, global_myname());
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "serverName",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shortServerName",
|
||||
@ -5863,7 +5863,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
|
||||
|
||||
slprintf( asc_buffer, sizeof(asc_buffer)-1, "\\\\%s\\%s",
|
||||
global_myname(), printer->info_2->sharename );
|
||||
push_reg_sz(talloc_tos(), NULL, &buffer, asc_buffer);
|
||||
push_reg_sz(talloc_tos(), &buffer, asc_buffer);
|
||||
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "uNCName",
|
||||
REG_SZ, buffer.data, buffer.length);
|
||||
|
||||
@ -6414,7 +6414,7 @@ WERROR _spoolss_EnumJobs(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumJobs, NULL,
|
||||
spoolss_EnumJobs,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -6725,7 +6725,7 @@ WERROR _spoolss_EnumPrinterDrivers(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumPrinterDrivers, NULL,
|
||||
spoolss_EnumPrinterDrivers,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -6868,7 +6868,7 @@ WERROR _spoolss_EnumForms(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumForms, NULL,
|
||||
spoolss_EnumForms,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -6958,7 +6958,7 @@ WERROR _spoolss_GetForm(pipes_struct *p,
|
||||
return result;
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, NULL,
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo,
|
||||
r->out.info, r->in.level);
|
||||
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
|
||||
|
||||
@ -7206,7 +7206,7 @@ WERROR _spoolss_EnumPorts(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumPorts, NULL,
|
||||
spoolss_EnumPorts,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -7722,7 +7722,7 @@ WERROR _spoolss_GetPrinterDriverDirectory(pipes_struct *p,
|
||||
return werror;
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, NULL,
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo,
|
||||
r->out.info, r->in.level);
|
||||
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
|
||||
|
||||
@ -8289,7 +8289,7 @@ WERROR _spoolss_EnumPrintProcessors(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumPrintProcessors, NULL,
|
||||
spoolss_EnumPrintProcessors,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -8376,7 +8376,7 @@ WERROR _spoolss_EnumPrintProcDataTypes(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumPrintProcDataTypes, NULL,
|
||||
spoolss_EnumPrintProcDataTypes,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -8549,7 +8549,7 @@ WERROR _spoolss_EnumMonitors(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumMonitors, NULL,
|
||||
spoolss_EnumMonitors,
|
||||
*r->out.info, r->in.level,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -8710,8 +8710,8 @@ WERROR _spoolss_GetJob(pipes_struct *p,
|
||||
return result;
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_JobInfo, NULL,
|
||||
r->out.info, r->in.level);
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_JobInfo, r->out.info,
|
||||
r->in.level);
|
||||
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
|
||||
|
||||
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
|
||||
@ -9072,7 +9072,7 @@ WERROR _spoolss_EnumPrinterKey(pipes_struct *p,
|
||||
}
|
||||
}
|
||||
|
||||
if (!push_reg_multi_sz(p->mem_ctx, NULL, &blob, array)) {
|
||||
if (!push_reg_multi_sz(p->mem_ctx, &blob, array)) {
|
||||
result = WERR_NOMEM;
|
||||
goto done;
|
||||
}
|
||||
@ -9307,7 +9307,7 @@ WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_ARRAY(p->mem_ctx,
|
||||
spoolss_EnumPrinterDataEx, NULL,
|
||||
spoolss_EnumPrinterDataEx,
|
||||
*r->out.info,
|
||||
*r->out.count);
|
||||
*r->out.info = SPOOLSS_BUFFER_OK(*r->out.info, NULL);
|
||||
@ -9378,8 +9378,8 @@ WERROR _spoolss_GetPrintProcessorDirectory(pipes_struct *p,
|
||||
return result;
|
||||
}
|
||||
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo, NULL,
|
||||
r->out.info, r->in.level);
|
||||
*r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_PrintProcessorDirectoryInfo,
|
||||
r->out.info, r->in.level);
|
||||
r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
|
||||
|
||||
return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
|
||||
@ -9396,7 +9396,7 @@ static bool push_monitorui_buf(TALLOC_CTX *mem_ctx, DATA_BLOB *buf,
|
||||
|
||||
ui.dll_name = dllname;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(buf, mem_ctx, NULL, &ui,
|
||||
ndr_err = ndr_push_struct_blob(buf, mem_ctx, &ui,
|
||||
(ndr_push_flags_fn_t)ndr_push_spoolss_MonitorUi);
|
||||
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && (DEBUGLEVEL >= 10)) {
|
||||
NDR_PRINT_DEBUG(spoolss_MonitorUi, &ui);
|
||||
@ -9435,7 +9435,7 @@ static bool pull_port_data_1(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *buf)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
ndr_err = ndr_pull_struct_blob(buf, mem_ctx, NULL, port1,
|
||||
ndr_err = ndr_pull_struct_blob(buf, mem_ctx, port1,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData1);
|
||||
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && (DEBUGLEVEL >= 10)) {
|
||||
NDR_PRINT_DEBUG(spoolss_PortData1, port1);
|
||||
@ -9451,7 +9451,7 @@ static bool pull_port_data_2(TALLOC_CTX *mem_ctx,
|
||||
const DATA_BLOB *buf)
|
||||
{
|
||||
enum ndr_err_code ndr_err;
|
||||
ndr_err = ndr_pull_struct_blob(buf, mem_ctx, NULL, port2,
|
||||
ndr_err = ndr_pull_struct_blob(buf, mem_ctx, port2,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_spoolss_PortData2);
|
||||
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err) && (DEBUGLEVEL >= 10)) {
|
||||
NDR_PRINT_DEBUG(spoolss_PortData2, port2);
|
||||
|
@ -778,7 +778,7 @@ static WERROR winreg_printer_write_sz(TALLOC_CTX *mem_ctx,
|
||||
if (data == NULL) {
|
||||
blob = data_blob_string_const("");
|
||||
} else {
|
||||
if (!push_reg_sz(mem_ctx, NULL, &blob, data)) {
|
||||
if (!push_reg_sz(mem_ctx, &blob, data)) {
|
||||
DEBUG(0, ("winreg_printer_write_sz: Could not marshall string %s for %s\n",
|
||||
data, wvalue.name));
|
||||
return WERR_NOMEM;
|
||||
@ -1026,7 +1026,7 @@ static WERROR winreg_printer_write_multi_sz(TALLOC_CTX *mem_ctx,
|
||||
NTSTATUS status;
|
||||
|
||||
wvalue.name = value;
|
||||
if (!push_reg_multi_sz(mem_ctx, NULL, &blob, data)) {
|
||||
if (!push_reg_multi_sz(mem_ctx, &blob, data)) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
status = rpccli_winreg_SetValue(pipe_handle,
|
||||
@ -1111,7 +1111,7 @@ static WERROR winreg_enumval_to_sz(TALLOC_CTX *mem_ctx,
|
||||
return WERR_INVALID_DATATYPE;
|
||||
}
|
||||
|
||||
if (!pull_reg_sz(mem_ctx, NULL, v->data, _str)) {
|
||||
if (!pull_reg_sz(mem_ctx, v->data, _str)) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
@ -1132,7 +1132,7 @@ static WERROR winreg_enumval_to_multi_sz(TALLOC_CTX *mem_ctx,
|
||||
return WERR_INVALID_DATATYPE;
|
||||
}
|
||||
|
||||
if (!pull_reg_multi_sz(mem_ctx, NULL, v->data, array)) {
|
||||
if (!pull_reg_multi_sz(mem_ctx, v->data, array)) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
||||
@ -1162,7 +1162,7 @@ static WERROR winreg_printer_write_date(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
wvalue.name = value;
|
||||
if (!push_reg_sz(mem_ctx, NULL, &blob, str)) {
|
||||
if (!push_reg_sz(mem_ctx, &blob, str)) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
status = rpccli_winreg_SetValue(pipe_handle,
|
||||
@ -1229,7 +1229,7 @@ static WERROR winreg_printer_write_ver(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
wvalue.name = value;
|
||||
if (!push_reg_sz(mem_ctx, NULL, &blob, str)) {
|
||||
if (!push_reg_sz(mem_ctx, &blob, str)) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
status = rpccli_winreg_SetValue(pipe_handle,
|
||||
@ -1696,7 +1696,7 @@ WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, devmode,
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, devmode,
|
||||
(ndr_push_flags_fn_t) ndr_push_spoolss_DeviceMode);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0, ("winreg_update_printer: Failed to marshall device mode\n"));
|
||||
@ -2142,7 +2142,6 @@ WERROR winreg_get_printer(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
ndr_err = ndr_pull_struct_blob(&blob,
|
||||
info2->devmode,
|
||||
NULL,
|
||||
info2->devmode,
|
||||
(ndr_pull_flags_fn_t) ndr_pull_spoolss_DeviceMode);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -2262,7 +2261,6 @@ WERROR winreg_get_printer_secdesc(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
ndr_err = ndr_pull_struct_blob(&blob,
|
||||
secdesc,
|
||||
NULL,
|
||||
secdesc,
|
||||
(ndr_pull_flags_fn_t) ndr_pull_security_descriptor);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -2318,7 +2316,7 @@ create_default:
|
||||
}
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, secdesc,
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, secdesc,
|
||||
(ndr_push_flags_fn_t) ndr_push_security_descriptor);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0, ("winreg_set_secdesc: Failed to marshall security descriptor\n"));
|
||||
@ -2449,7 +2447,7 @@ WERROR winreg_set_printer_secdesc(TALLOC_CTX *mem_ctx,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, new_secdesc,
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, new_secdesc,
|
||||
(ndr_push_flags_fn_t) ndr_push_security_descriptor);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0, ("winreg_set_secdesc: Failed to marshall security descriptor\n"));
|
||||
|
@ -2156,7 +2156,7 @@ WERROR _srvsvc_NetGetFileSecurity(pipes_struct *p,
|
||||
goto error_exit;
|
||||
}
|
||||
|
||||
sd_size = ndr_size_security_descriptor(psd, NULL, 0);
|
||||
sd_size = ndr_size_security_descriptor(psd, 0);
|
||||
|
||||
sd_buf = TALLOC_ZERO_P(p->mem_ctx, struct sec_desc_buf);
|
||||
if (!sd_buf) {
|
||||
|
@ -442,7 +442,7 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
|
||||
}
|
||||
|
||||
for ( i=0; i<num_services; i++ ) {
|
||||
buffer_size += ndr_size_ENUM_SERVICE_STATUSW(&services[i], NULL, 0);
|
||||
buffer_size += ndr_size_ENUM_SERVICE_STATUSW(&services[i], 0);
|
||||
}
|
||||
|
||||
buffer_size += buffer_size % 4;
|
||||
@ -457,7 +457,7 @@ WERROR _svcctl_EnumServicesStatusW(pipes_struct *p,
|
||||
enum ndr_err_code ndr_err;
|
||||
struct ndr_push *ndr;
|
||||
|
||||
ndr = ndr_push_init_ctx(p->mem_ctx, NULL);
|
||||
ndr = ndr_push_init_ctx(p->mem_ctx);
|
||||
if (ndr == NULL) {
|
||||
return WERR_INVALID_PARAM;
|
||||
}
|
||||
@ -605,8 +605,7 @@ WERROR _svcctl_QueryServiceStatusEx(pipes_struct *p,
|
||||
svc_stat_proc.process_id = sys_getpid();
|
||||
svc_stat_proc.service_flags = 0x0;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL,
|
||||
&svc_stat_proc,
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &svc_stat_proc,
|
||||
(ndr_push_flags_fn_t)ndr_push_SERVICE_STATUS_PROCESS);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return WERR_INVALID_PARAM;
|
||||
@ -715,7 +714,7 @@ WERROR _svcctl_QueryServiceConfigW(pipes_struct *p,
|
||||
if ( !W_ERROR_IS_OK(wresult) )
|
||||
return wresult;
|
||||
|
||||
buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, NULL, 0);
|
||||
buffer_size = ndr_size_QUERY_SERVICE_CONFIG(r->out.query, 0);
|
||||
*r->out.needed = (buffer_size > r->in.offered) ? buffer_size : r->in.offered;
|
||||
|
||||
if (buffer_size > r->in.offered ) {
|
||||
@ -761,14 +760,13 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
|
||||
|
||||
desc_buf.description = description;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL,
|
||||
&desc_buf,
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &desc_buf,
|
||||
(ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return WERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
buffer_size = ndr_size_SERVICE_DESCRIPTION(&desc_buf, NULL, 0);
|
||||
buffer_size = ndr_size_SERVICE_DESCRIPTION(&desc_buf, 0);
|
||||
r->out.buffer = blob.data;
|
||||
|
||||
break;
|
||||
@ -784,14 +782,13 @@ WERROR _svcctl_QueryServiceConfig2W(pipes_struct *p,
|
||||
|
||||
ZERO_STRUCT( actions );
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, NULL,
|
||||
&actions,
|
||||
ndr_err = ndr_push_struct_blob(&blob, p->mem_ctx, &actions,
|
||||
(ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
return WERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
buffer_size = ndr_size_SERVICE_FAILURE_ACTIONS(&actions, NULL, 0);
|
||||
buffer_size = ndr_size_SERVICE_FAILURE_ACTIONS(&actions, 0);
|
||||
r->out.buffer = blob.data;
|
||||
|
||||
break;
|
||||
@ -883,7 +880,7 @@ WERROR _svcctl_QueryServiceObjectSecurity(pipes_struct *p,
|
||||
if ( !(sec_desc = svcctl_get_secdesc( p->mem_ctx, info->name, get_root_nt_token() )) )
|
||||
return WERR_NOMEM;
|
||||
|
||||
*r->out.needed = ndr_size_security_descriptor( sec_desc, NULL, 0 );
|
||||
*r->out.needed = ndr_size_security_descriptor(sec_desc, 0);
|
||||
|
||||
if ( *r->out.needed > r->in.offered) {
|
||||
return WERR_INSUFFICIENT_BUFFER;
|
||||
|
@ -135,7 +135,7 @@ static NTSTATUS cmd_eventlog_readlog(struct rpc_pipe_client *cli,
|
||||
|
||||
blob = data_blob_const(data + pos, size);
|
||||
/* dump_data(0, blob.data, blob.length); */
|
||||
ndr_err = ndr_pull_struct_blob_all(&blob, mem_ctx, NULL, &r,
|
||||
ndr_err = ndr_pull_struct_blob_all(&blob, mem_ctx, &r,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOGRECORD);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -739,7 +739,7 @@ static void display_reg_value(struct regval_blob value)
|
||||
break;
|
||||
case REG_SZ:
|
||||
blob = data_blob_const(value.data_p, value.size);
|
||||
pull_reg_sz(talloc_tos(), NULL, &blob, &text);
|
||||
pull_reg_sz(talloc_tos(), &blob, &text);
|
||||
printf("%s: REG_SZ: %s\n", value.valuename, text ? text : "");
|
||||
break;
|
||||
case REG_BINARY: {
|
||||
@ -765,7 +765,7 @@ static void display_reg_value(struct regval_blob value)
|
||||
const char **values;
|
||||
blob = data_blob_const(value.data_p, value.size);
|
||||
|
||||
if (!pull_reg_multi_sz(NULL, NULL, &blob, &values)) {
|
||||
if (!pull_reg_multi_sz(NULL, &blob, &values)) {
|
||||
d_printf("pull_reg_multi_sz failed\n");
|
||||
break;
|
||||
}
|
||||
|
@ -648,7 +648,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO
|
||||
goto fail;
|
||||
|
||||
blob = data_blob_const(regval_data_p(val), regval_size(val));
|
||||
pull_reg_sz(ctx, NULL, &blob, &display_name);
|
||||
pull_reg_sz(ctx, &blob, &display_name);
|
||||
|
||||
TALLOC_FREE( key );
|
||||
|
||||
@ -702,7 +702,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER
|
||||
}
|
||||
|
||||
blob = data_blob_const(regval_data_p(val), regval_size(val));
|
||||
pull_reg_sz(ctx, NULL, &blob, &description);
|
||||
pull_reg_sz(ctx, &blob, &description);
|
||||
|
||||
TALLOC_FREE(key);
|
||||
|
||||
|
@ -261,7 +261,7 @@ static bool get_ea_dos_attribute(connection_struct *conn,
|
||||
blob.data = (uint8_t *)attrstr;
|
||||
blob.length = sizeret;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), NULL, &dosattrib,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, talloc_tos(), &dosattrib,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_xattr_DOSATTRIB);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
@ -378,7 +378,7 @@ static bool set_ea_dos_attribute(connection_struct *conn,
|
||||
smb_fname_str_dbg(smb_fname) ));
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, talloc_tos(), NULL, &dosattrib,
|
||||
&blob, talloc_tos(), &dosattrib,
|
||||
(ndr_push_flags_fn_t)ndr_push_xattr_DOSATTRIB);
|
||||
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
|
@ -212,7 +212,7 @@ static NTSTATUS notify_load(struct notify_context *notify, struct db_record *rec
|
||||
status = NT_STATUS_OK;
|
||||
if (blob.length > 0) {
|
||||
enum ndr_err_code ndr_err;
|
||||
ndr_err = ndr_pull_struct_blob(&blob, notify->array, NULL, notify->array,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, notify->array, notify->array,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_notify_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
/* 1. log that we got a corrupt notify_array
|
||||
@ -275,7 +275,7 @@ static NTSTATUS notify_save(struct notify_context *notify, struct db_record *rec
|
||||
tmp_ctx = talloc_new(notify);
|
||||
NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, NULL, notify->array,
|
||||
ndr_err = ndr_push_struct_blob(&blob, tmp_ctx, notify->array,
|
||||
(ndr_push_flags_fn_t)ndr_push_notify_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
talloc_free(tmp_ctx);
|
||||
@ -313,7 +313,7 @@ static void notify_handler(struct messaging_context *msg_ctx, void *private_data
|
||||
return;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(data, tmp_ctx, NULL, &ev,
|
||||
ndr_err = ndr_pull_struct_blob(data, tmp_ctx, &ev,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_notify_event);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
talloc_free(tmp_ctx);
|
||||
@ -429,8 +429,7 @@ static void notify_add_onelevel(struct notify_context *notify,
|
||||
blob.length = rec->value.dsize;
|
||||
|
||||
if (blob.length > 0) {
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, array, NULL, array,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, array, array,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_notify_entry_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(10, ("ndr_pull_notify_entry_array failed: %s\n",
|
||||
@ -456,8 +455,7 @@ static void notify_add_onelevel(struct notify_context *notify,
|
||||
array->entries[array->num_entries].server = notify->server;
|
||||
array->num_entries += 1;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, rec, NULL, array,
|
||||
ndr_err = ndr_push_struct_blob(&blob, rec, array,
|
||||
(ndr_push_flags_fn_t)ndr_push_notify_entry_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(10, ("ndr_push_notify_entry_array failed: %s\n",
|
||||
@ -609,8 +607,7 @@ NTSTATUS notify_remove_onelevel(struct notify_context *notify,
|
||||
blob.length = rec->value.dsize;
|
||||
|
||||
if (blob.length > 0) {
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, array, NULL, array,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, array, array,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_notify_entry_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(10, ("ndr_pull_notify_entry_array failed: %s\n",
|
||||
@ -646,8 +643,7 @@ NTSTATUS notify_remove_onelevel(struct notify_context *notify,
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
ndr_err = ndr_push_struct_blob(
|
||||
&blob, rec, NULL, array,
|
||||
ndr_err = ndr_push_struct_blob(&blob, rec, array,
|
||||
(ndr_push_flags_fn_t)ndr_push_notify_entry_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(10, ("ndr_push_notify_entry_array failed: %s\n",
|
||||
@ -809,7 +805,7 @@ static NTSTATUS notify_send(struct notify_context *notify, struct notify_entry *
|
||||
|
||||
tmp_ctx = talloc_new(notify);
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&data, tmp_ctx, NULL, &ev,
|
||||
ndr_err = ndr_push_struct_blob(&data, tmp_ctx, &ev,
|
||||
(ndr_push_flags_fn_t)ndr_push_notify_event);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
talloc_free(tmp_ctx);
|
||||
@ -853,8 +849,7 @@ void notify_onelevel(struct notify_context *notify, uint32_t action,
|
||||
|
||||
if (blob.length > 0) {
|
||||
enum ndr_err_code ndr_err;
|
||||
ndr_err = ndr_pull_struct_blob(
|
||||
&blob, array, NULL, array,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, array, array,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_notify_entry_array);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(10, ("ndr_pull_notify_entry_array failed: %s\n",
|
||||
|
@ -1809,7 +1809,7 @@ NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
|
||||
security_info_wanted & DACL_SECURITY_INFORMATION)
|
||||
psd->type |= SEC_DESC_DACL_PRESENT;
|
||||
|
||||
*psd_size = ndr_size_security_descriptor(psd, NULL, 0);
|
||||
*psd_size = ndr_size_security_descriptor(psd, 0);
|
||||
|
||||
DEBUG(3,("smbd_do_query_security_desc: sd_size = %lu.\n",
|
||||
(unsigned long)*psd_size));
|
||||
|
@ -566,7 +566,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&secd->data,
|
||||
sec_desc, NULL, sec_desc,
|
||||
sec_desc, sec_desc,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(2,("ndr_pull_security_descriptor failed: %s\n",
|
||||
|
@ -3381,7 +3381,6 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
|
||||
i < conn->server_info->ptok->num_sids; ++i) {
|
||||
sid_bytes += ndr_size_dom_sid(
|
||||
&conn->server_info->ptok->user_sids[i],
|
||||
NULL,
|
||||
0);
|
||||
}
|
||||
|
||||
@ -3404,7 +3403,6 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
|
||||
i < conn->server_info->ptok->num_sids; ++i) {
|
||||
int sid_len = ndr_size_dom_sid(
|
||||
&conn->server_info->ptok->user_sids[i],
|
||||
NULL,
|
||||
0);
|
||||
|
||||
sid_linearize(pdata + data_len, sid_len,
|
||||
|
@ -55,7 +55,7 @@ static int net_eventlog_dump(struct net_context *c, int argc,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, ctx, NULL, &evt,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, ctx, &evt,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOG_EVT_FILE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
d_fprintf(stderr, _("evt pull failed: %s\n"),
|
||||
@ -113,7 +113,7 @@ static int net_eventlog_import(struct net_context *c, int argc,
|
||||
}
|
||||
|
||||
/* dump_data(0, blob.data, blob.length); */
|
||||
ndr_err = ndr_pull_struct_blob(&blob, ctx, NULL, &evt_header,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, ctx, &evt_header,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOGHEADER);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
d_fprintf(stderr, _("evt header pull failed: %s\n"),
|
||||
@ -126,7 +126,7 @@ static int net_eventlog_import(struct net_context *c, int argc,
|
||||
goto done;
|
||||
}
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, ctx, NULL, &evt,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, ctx, &evt,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOG_EVT_FILE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
d_fprintf(stderr, _("evt pull failed: %s\n"),
|
||||
|
@ -85,7 +85,7 @@ static void display_reg_value(const char *subkey, struct regval_blob value)
|
||||
|
||||
case REG_SZ:
|
||||
blob = data_blob_const(value.data_p, value.size);
|
||||
pull_reg_sz(talloc_tos(), NULL, &blob, &text);
|
||||
pull_reg_sz(talloc_tos(), &blob, &text);
|
||||
if (!text) {
|
||||
break;
|
||||
}
|
||||
@ -104,7 +104,7 @@ static void display_reg_value(const char *subkey, struct regval_blob value)
|
||||
const char **values;
|
||||
blob = data_blob_const(value.data_p, value.size);
|
||||
|
||||
if (!pull_reg_multi_sz(NULL, NULL, &blob, &values)) {
|
||||
if (!pull_reg_multi_sz(NULL, &blob, &values)) {
|
||||
d_printf("pull_reg_multi_sz failed\n");
|
||||
break;
|
||||
}
|
||||
@ -2423,7 +2423,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
|
||||
if (strequal(info[j].value_name, SPOOL_REG_PORTNAME)) {
|
||||
|
||||
/* although windows uses a multi-sz, we use a sz */
|
||||
push_reg_sz(mem_ctx, NULL, &blob, SAMBA_PRINTER_PORT_NAME);
|
||||
push_reg_sz(mem_ctx, &blob, SAMBA_PRINTER_PORT_NAME);
|
||||
fstrcpy(value.valuename, SPOOL_REG_PORTNAME);
|
||||
}
|
||||
|
||||
@ -2433,7 +2433,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
|
||||
nt_status = NT_STATUS_NO_MEMORY;
|
||||
goto done;
|
||||
}
|
||||
push_reg_sz(mem_ctx, NULL, &blob, unc_name);
|
||||
push_reg_sz(mem_ctx, &blob, unc_name);
|
||||
fstrcpy(value.valuename, SPOOL_REG_UNCNAME);
|
||||
}
|
||||
|
||||
@ -2454,13 +2454,13 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
|
||||
|
||||
if (strequal(info[j].value_name, SPOOL_REG_SERVERNAME)) {
|
||||
|
||||
push_reg_sz(mem_ctx, NULL, &blob, longname);
|
||||
push_reg_sz(mem_ctx, &blob, longname);
|
||||
fstrcpy(value.valuename, SPOOL_REG_SERVERNAME);
|
||||
}
|
||||
|
||||
if (strequal(info[j].value_name, SPOOL_REG_SHORTSERVERNAME)) {
|
||||
|
||||
push_reg_sz(mem_ctx, NULL, &blob, global_myname());
|
||||
push_reg_sz(mem_ctx, &blob, global_myname());
|
||||
fstrcpy(value.valuename, SPOOL_REG_SHORTSERVERNAME);
|
||||
}
|
||||
|
||||
|
@ -961,7 +961,7 @@ static void dump_values( REGF_NK_REC *nk )
|
||||
switch ( nk->values[i].type ) {
|
||||
case REG_SZ:
|
||||
blob = data_blob_const(nk->values[i].data, data_size);
|
||||
pull_reg_sz(talloc_tos(), NULL, &blob, &data_str);
|
||||
pull_reg_sz(talloc_tos(), &blob, &data_str);
|
||||
if (!data_str) {
|
||||
break;
|
||||
}
|
||||
@ -1250,7 +1250,7 @@ static NTSTATUS rpc_registry_getsd_internal(struct net_context *c,
|
||||
blob.data = sd->data;
|
||||
blob.length = sd->size;
|
||||
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, NULL, &sec_desc,
|
||||
ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &sec_desc,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
status = ndr_map_error2ntstatus(ndr_err);
|
||||
|
@ -276,7 +276,7 @@ static NTSTATUS rpc_service_list_internal(struct net_context *c,
|
||||
break;
|
||||
}
|
||||
|
||||
ndr = ndr_pull_init_blob(&blob, mem_ctx, NULL);
|
||||
ndr = ndr_pull_init_blob(&blob, mem_ctx);
|
||||
if (ndr == NULL) {
|
||||
status = NT_STATUS_NO_MEMORY;
|
||||
break;
|
||||
|
@ -413,7 +413,7 @@ static void wb_group_members_done(struct tevent_req *subreq)
|
||||
|
||||
sid = &members[i].sid;
|
||||
key = data_blob_const(
|
||||
sid, ndr_size_dom_sid(sid, NULL, 0));
|
||||
sid, ndr_size_dom_sid(sid, 0));
|
||||
|
||||
if (!talloc_dict_set(state->users, key, &m)) {
|
||||
tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
|
||||
|
@ -73,7 +73,7 @@ static struct tevent_req *wb_ndr_dispatch_send(TALLOC_CTX *mem_ctx,
|
||||
state->transport = transport;
|
||||
state->opnum = opnum;
|
||||
|
||||
push = ndr_push_init_ctx(state, NULL);
|
||||
push = ndr_push_init_ctx(state);
|
||||
if (tevent_req_nomem(push, req)) {
|
||||
return tevent_req_post(req, ev);
|
||||
}
|
||||
@ -148,7 +148,7 @@ static NTSTATUS wb_ndr_dispatch_recv(struct tevent_req *req,
|
||||
return status;
|
||||
}
|
||||
|
||||
pull = ndr_pull_init_blob(&state->resp_blob, mem_ctx, NULL);
|
||||
pull = ndr_pull_init_blob(&state->resp_blob, mem_ctx);
|
||||
if (pull == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ static NTSTATUS append_info3_as_ndr(TALLOC_CTX *mem_ctx,
|
||||
DATA_BLOB blob;
|
||||
enum ndr_err_code ndr_err;
|
||||
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, NULL, info3,
|
||||
ndr_err = ndr_push_struct_blob(&blob, mem_ctx, info3,
|
||||
(ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
|
||||
DEBUG(0,("append_info3_as_ndr: failed to append\n"));
|
||||
|
@ -81,7 +81,6 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
|
||||
|
||||
io.in.options = smb_options;
|
||||
|
||||
io.in.iconv_convenience = lp_iconv_convenience(ctx->auth_ctx->lp_ctx);
|
||||
lp_smbcli_session_options(ctx->auth_ctx->lp_ctx, &io.in.session_options);
|
||||
|
||||
status = smb_composite_connect(&io, mem_ctx, lp_resolve_context(ctx->auth_ctx->lp_ctx),
|
||||
|
@ -215,8 +215,6 @@ struct dsdb_schema {
|
||||
struct ldb_dn *master_dn;
|
||||
} fsmo;
|
||||
|
||||
struct smb_iconv_convenience *iconv_convenience;
|
||||
|
||||
/* Was this schema loaded from ldb (if so, then we will reload it when we detect a change in ldb) */
|
||||
struct ldb_module *loaded_from_module;
|
||||
struct dsdb_schema *(*refresh_fn)(struct ldb_module *module, struct dsdb_schema *schema, bool is_global_schema);
|
||||
|
@ -1417,8 +1417,7 @@ static WERROR dsdb_syntax_UNICODE_validate_one_val(struct ldb_context *ldb,
|
||||
return WERR_FOOBAR;
|
||||
}
|
||||
|
||||
ok = convert_string_talloc_convenience(ldb,
|
||||
schema->iconv_convenience,
|
||||
ok = convert_string_talloc(ldb,
|
||||
CH_UNIX, CH_UTF16,
|
||||
val->data,
|
||||
val->length,
|
||||
|
@ -98,8 +98,6 @@ static int mit_samba_context_init(struct mit_samba_context **_ctx)
|
||||
cli_credentials_set_kerberos_state(ctx->session_info->credentials,
|
||||
CRED_DONT_USE_KERBEROS);
|
||||
|
||||
ctx->db_ctx->ic_ctx = lp_iconv_convenience(ctx->db_ctx->lp_ctx);
|
||||
|
||||
ctx->db_ctx->samdb = samdb_connect(ctx,
|
||||
ctx->db_ctx->ev_ctx,
|
||||
ctx->db_ctx->lp_ctx,
|
||||
@ -275,7 +273,6 @@ static int mit_samba_update_pac_data(struct mit_samba_context *ctx,
|
||||
}
|
||||
|
||||
nt_status = samba_kdc_update_pac_blob(tmp_ctx, ctx->context,
|
||||
ctx->db_ctx->ic_ctx,
|
||||
&pac, logon_blob);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0, ("Building PAC failed: %s\n",
|
||||
|
@ -33,7 +33,6 @@ NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
|
||||
NTSTATUS samba_kdc_update_pac_blob(TALLOC_CTX *mem_ctx,
|
||||
krb5_context context,
|
||||
struct smb_iconv_convenience *ic,
|
||||
krb5_pac *pac, DATA_BLOB *pac_blob);
|
||||
|
||||
void samba_kdc_build_edata_reply(NTSTATUS nt_status, DATA_BLOB *e_data);
|
||||
|
@ -31,7 +31,6 @@ struct samba_kdc_seq;
|
||||
struct samba_kdc_db_context {
|
||||
struct tevent_context *ev_ctx;
|
||||
struct loadparm_context *lp_ctx;
|
||||
struct smb_iconv_convenience *ic_ctx;
|
||||
struct ldb_context *samdb;
|
||||
struct samba_kdc_seq *seq_ctx;
|
||||
};
|
||||
|
@ -85,7 +85,6 @@ static krb5_error_code samba_wdc_reget_pac(void *priv, krb5_context context,
|
||||
}
|
||||
|
||||
nt_status = samba_kdc_update_pac_blob(mem_ctx, context,
|
||||
p->kdc_db_ctx->ic_ctx,
|
||||
pac, pac_blob);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0, ("Building PAC failed: %s\n",
|
||||
|
@ -40,7 +40,6 @@ struct nbt_dgram_request {
|
||||
struct nbt_dgram_socket {
|
||||
struct socket_context *sock;
|
||||
struct tevent_context *event_ctx;
|
||||
struct smb_iconv_convenience *iconv_convenience;
|
||||
|
||||
/* the fd event */
|
||||
struct tevent_fd *fde;
|
||||
|
@ -164,9 +164,6 @@ struct smbcli_transport {
|
||||
|
||||
/* context of the stream -> packet parser */
|
||||
struct packet_context *packet;
|
||||
|
||||
/* iconv convenience */
|
||||
struct smb_iconv_convenience *iconv_convenience;
|
||||
};
|
||||
|
||||
/* this is the context for the user */
|
||||
|
@ -146,7 +146,6 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
|
||||
state->connect->in.fallback_to_anonymous = false;
|
||||
state->connect->in.workgroup = io->in.workgroup;
|
||||
state->connect->in.gensec_settings = io->in.gensec_settings;
|
||||
state->connect->in.iconv_convenience = io->in.iconv_convenience;
|
||||
|
||||
state->connect->in.options = io->in.options;
|
||||
state->connect->in.session_options = io->in.session_options;
|
||||
|
@ -153,7 +153,6 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
|
||||
state->connect->in.credentials = io->in.credentials;
|
||||
state->connect->in.fallback_to_anonymous = false;
|
||||
state->connect->in.workgroup = io->in.workgroup;
|
||||
state->connect->in.iconv_convenience = io->in.iconv_convenience;
|
||||
state->connect->in.gensec_settings = io->in.gensec_settings;
|
||||
|
||||
state->connect->in.options = tree->session->transport->options;
|
||||
|
@ -60,7 +60,6 @@ struct smb_composite_fetchfile {
|
||||
struct smbcli_options options;
|
||||
struct smbcli_session_options session_options;
|
||||
struct resolve_context *resolve_ctx;
|
||||
struct smb_iconv_convenience *iconv_convenience;
|
||||
struct gensec_settings *gensec_settings;
|
||||
} in;
|
||||
struct {
|
||||
@ -104,7 +103,6 @@ struct smb_composite_connect {
|
||||
const char *workgroup;
|
||||
struct smbcli_options options;
|
||||
struct smbcli_session_options session_options;
|
||||
struct smb_iconv_convenience *iconv_convenience;
|
||||
struct gensec_settings *gensec_settings;
|
||||
} in;
|
||||
struct {
|
||||
@ -145,7 +143,6 @@ struct smb_composite_fsinfo {
|
||||
struct cli_credentials *credentials;
|
||||
const char *workgroup;
|
||||
enum smb_fsinfo_level level;
|
||||
struct smb_iconv_convenience *iconv_convenience;
|
||||
struct gensec_settings *gensec_settings;
|
||||
} in;
|
||||
|
||||
|
@ -239,7 +239,6 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
|
||||
io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx);
|
||||
io.in.service = remote_share;
|
||||
io.in.service_type = "?????";
|
||||
io.in.iconv_convenience = lp_iconv_convenience(ntvfs->ctx->lp_ctx);
|
||||
io.in.gensec_settings = lp_gensec_settings(p, ntvfs->ctx->lp_ctx);
|
||||
lp_smbcli_options(ntvfs->ctx->lp_ctx, &io.in.options);
|
||||
lp_smbcli_session_options(ntvfs->ctx->lp_ctx, &io.in.session_options);
|
||||
|
@ -883,7 +883,6 @@ static struct composite_context *torture_connect_async(
|
||||
smb->in.service_type=NULL;
|
||||
smb->in.credentials=cmdline_credentials;
|
||||
smb->in.fallback_to_anonymous=false;
|
||||
smb->in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
|
||||
smb->in.gensec_settings = lp_gensec_settings(mem_ctx, tctx->lp_ctx);
|
||||
smb->in.workgroup=workgroup;
|
||||
lp_smbcli_options(tctx->lp_ctx, &smb->in.options);
|
||||
|
@ -163,7 +163,6 @@ static bool test_fetchfile(struct smbcli_state *cli, struct torture_context *tct
|
||||
io2.in.workgroup = lp_workgroup(tctx->lp_ctx);
|
||||
io2.in.filename = fname;
|
||||
io2.in.resolve_ctx = lp_resolve_context(tctx->lp_ctx);
|
||||
io2.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
|
||||
io2.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
|
||||
lp_smbcli_options(tctx->lp_ctx, &io2.in.options);
|
||||
lp_smbcli_session_options(tctx->lp_ctx, &io2.in.session_options);
|
||||
@ -355,7 +354,6 @@ static bool test_fsinfo(struct smbcli_state *cli, struct torture_context *tctx)
|
||||
io1.in.credentials = cmdline_credentials;
|
||||
io1.in.workgroup = lp_workgroup(tctx->lp_ctx);
|
||||
io1.in.level = RAW_QFS_OBJECTID_INFORMATION;
|
||||
io1.in.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx);
|
||||
io1.in.gensec_settings = lp_gensec_settings(tctx, tctx->lp_ctx);
|
||||
|
||||
printf("Testing parallel queryfsinfo [Object ID] with %d ops\n",
|
||||
|
@ -195,7 +195,6 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
|
||||
io->in.credentials = cmdline_credentials;
|
||||
io->in.fallback_to_anonymous = false;
|
||||
io->in.workgroup = lp_workgroup(state->tctx->lp_ctx);
|
||||
io->in.iconv_convenience = lp_iconv_convenience(state->tctx->lp_ctx);
|
||||
lp_smbcli_options(state->tctx->lp_ctx, &io->in.options);
|
||||
lp_smbcli_session_options(state->tctx->lp_ctx, &io->in.session_options);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user