1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Merge branch 'master' of ssh://git.samba.org/data/git/samba

This commit is contained in:
Jelmer Vernooij 2009-01-18 16:19:39 +01:00
commit bfbb0fb17f
29 changed files with 1736 additions and 879 deletions

View File

@ -47,7 +47,7 @@ struct eventlog_Record {
time_t time_written;
uint32_t event_id;
enum eventlogEventTypes event_type;
uint16_t num_of_strings;/* [max(256)] */
uint16_t num_of_strings;/* [range(0,256)] */
uint16_t event_category;
uint16_t reserved_flags;
uint32_t closing_record_number;

View File

@ -811,7 +811,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull *
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 0x100000) {
if (r->count > 0x100000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
@ -1166,7 +1166,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_p
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_mappings));
if (r->num_mappings < 0 || r->num_mappings > 0x100000) {
if (r->num_mappings > 0x100000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mappings));
@ -1700,7 +1700,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 0x100000) {
if (r->count > 0x100000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
@ -1764,7 +1764,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull *ndr,
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
if (r->__ndr_size < 0 || r->__ndr_size > 10485760) {
if (r->__ndr_size > 10485760) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_blob));
@ -1830,7 +1830,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull *n
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_values));
if (r->num_values < 0 || r->num_values > 10485760) {
if (r->num_values > 10485760) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
@ -2074,7 +2074,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attributes));
if (r->num_attributes < 0 || r->num_attributes > 1048576) {
if (r->num_attributes > 1048576) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attributes));
@ -2278,7 +2278,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull
NDR_CHECK(ndr_pull_array_size(ndr, &r->meta_data));
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1048576) {
if (r->count > 1048576) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->meta_data, ndr_get_array_size(ndr, &r->meta_data));
@ -2710,7 +2710,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_object_count));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_linked_attributes_count));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linked_attributes_count));
if (r->linked_attributes_count < 0 || r->linked_attributes_count > 1048576) {
if (r->linked_attributes_count > 1048576) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linked_attributes));
@ -3837,11 +3837,11 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull *
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_memberships));
if (r->num_memberships < 0 || r->num_memberships > 10000) {
if (r->num_memberships > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
if (r->num_sids < 0 || r->num_sids > 10000) {
if (r->num_sids > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
@ -4324,7 +4324,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_p
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
if (r->length < 0 || r->length > 0x00A00000) {
if (r->length > 0x00A00000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
@ -4479,11 +4479,11 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length1));
if (r->length1 < 0 || r->length1 > 0x00A00000) {
if (r->length1 > 0x00A00000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length2));
if (r->length2 < 0 || r->length2 > 0x00A00000) {
if (r->length2 > 0x00A00000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1));
@ -5320,7 +5320,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_p
r->object_dn = NULL;
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_spn_names));
@ -6217,7 +6217,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull *ndr,
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
@ -6585,7 +6585,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull *ndr,
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
@ -6956,7 +6956,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull *ndr,
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
@ -7133,7 +7133,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCConnectionCtr01(struct ndr_pull
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
@ -7537,7 +7537,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryExtraErrorBuffer(struct ndr_
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
if (r->size < 0 || r->size > 10485760) {
if (r->size > 10485760) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
@ -8097,7 +8097,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr2(struct ndr_pull *ndr, i
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
NDR_CHECK(ndr_pull_drsuapi_DsAddEntryErrorInfoX(ndr, NDR_SCALARS, &r->error));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objects));
@ -8227,7 +8227,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAddEntryCtr3(struct ndr_pull *ndr, i
r->error = NULL;
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_objects));
@ -10709,7 +10709,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaConnection04Ctr(struct ndr_pu
NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 10000) {
if (r->count > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
@ -10858,7 +10858,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplica06Ctr(struct ndr_pull *ndr, i
NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 256) {
if (r->count > 256) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
@ -11863,7 +11863,7 @@ static enum ndr_err_code ndr_pull_drsuapi_QuerySitesByCostCtr1(struct ndr_pull *
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_info));
if (r->num_info < 0 || r->num_info > 10000) {
if (r->num_info > 10000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));

View File

@ -974,7 +974,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i
NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, &r->in.flags));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes));
if (r->in.number_of_bytes < 0 || r->in.number_of_bytes > 0x7FFFF) {
if (r->in.number_of_bytes > 0x7FFFF) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);

View File

@ -1819,7 +1819,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_f
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
if (r->num_sids < 0 || r->num_sids > 1000) {
if (r->num_sids > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
@ -2060,7 +2060,7 @@ static enum ndr_err_code ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int nd
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
@ -2147,7 +2147,7 @@ static enum ndr_err_code ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int nd
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
@ -2306,7 +2306,7 @@ static enum ndr_err_code ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int n
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
@ -2422,7 +2422,7 @@ static enum ndr_err_code ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr
NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
@ -2580,7 +2580,7 @@ static enum ndr_err_code ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_fl
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
if (r->size < 0 || r->size > 65536) {
if (r->size > 65536) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
@ -3924,7 +3924,7 @@ static enum ndr_err_code ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_fla
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 256) {
if (r->count > 256) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
@ -4338,7 +4338,7 @@ static enum ndr_err_code ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
@ -4463,7 +4463,7 @@ static enum ndr_err_code ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int n
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
@ -4609,7 +4609,7 @@ static enum ndr_err_code ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int n
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1000) {
if (r->count > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
@ -4690,7 +4690,7 @@ static enum ndr_err_code ndr_pull_lsa_ForestTrustBinaryData(struct ndr_pull *ndr
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
if (r->length < 0 || r->length > 131072) {
if (r->length > 131072) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
@ -5021,7 +5021,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_ForestTrustInformation(struct ndr_pull *
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 4000) {
if (r->count > 4000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entries));
@ -6032,7 +6032,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int f
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_entries));
if (r->in.num_entries < 0 || r->in.num_entries > 8192) {
if (r->in.num_entries > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC(ndr, r->out.resume_handle);
@ -6375,7 +6375,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int fl
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
if (r->in.num_names < 0 || r->in.num_names > 1000) {
if (r->in.num_names > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
@ -10842,7 +10842,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int f
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
if (r->in.num_names < 0 || r->in.num_names > 1000) {
if (r->in.num_names > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
@ -11496,7 +11496,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int f
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
if (r->in.num_names < 0 || r->in.num_names > 1000) {
if (r->in.num_names > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
@ -12234,7 +12234,7 @@ static enum ndr_err_code ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int fla
ZERO_STRUCT(r->out);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
if (r->in.num_names < 0 || r->in.num_names > 1000) {
if (r->in.num_names > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));

View File

@ -13751,7 +13751,7 @@ static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesW(struct ndr_pull *n
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
if (r->in.count < 0 || r->in.count > 32000) {
if (r->in.count > 32000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));
@ -14294,7 +14294,7 @@ static enum ndr_err_code ndr_pull_netr_DsRAddressToSitenamesExW(struct ndr_pull
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
if (r->in.count < 0 || r->in.count > 32000) {
if (r->in.count > 32000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.addresses));

View File

@ -1191,7 +1191,7 @@ static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags,
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
if (r->count < 0 || r->count > 1024) {
if (r->count > 1024) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ids));
@ -7211,7 +7211,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int f
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
if (r->in.num_names < 0 || r->in.num_names > 1000) {
if (r->in.num_names > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
@ -7353,7 +7353,7 @@ static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flag
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.domain_handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_rids));
if (r->in.num_rids < 0 || r->in.num_rids > 1000) {
if (r->in.num_rids > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rids));

View File

@ -498,7 +498,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_f
NDR_CHECK(ndr_pull_security_acl_revision(ndr, NDR_SCALARS, &r->revision));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces));
if (r->num_aces < 0 || r->num_aces > 1000) {
if (r->num_aces > 1000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->aces, r->num_aces);
@ -797,7 +797,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_f
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
if (r->sd_size < 0 || r->sd_size > 0x40000) {
if (r->sd_size > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));

View File

@ -1164,7 +1164,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr
ndr->flags = _flags_save_string;
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
if (r->num_actions < 0 || r->num_actions > 1024) {
if (r->num_actions > 1024) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
@ -1627,7 +1627,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.security_flags));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buffer_size));
if (r->in.buffer_size < 0 || r->in.buffer_size > 0x40000) {
if (r->in.buffer_size > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buffer_size);
@ -1647,7 +1647,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p
_mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
if (*r->out.needed < 0 || *r->out.needed > 0x40000) {
if (*r->out.needed > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -2729,7 +2729,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 0x40000) {
if (r->in.buf_size > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.buf_size);
@ -2751,7 +2751,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 0x40000) {
if (*r->out.bytes_needed > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -2761,7 +2761,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
_mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
if (*r->out.services_returned < 0 || *r->out.services_returned > 0x40000) {
if (*r->out.services_returned > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
@ -2870,7 +2870,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 0x40000) {
if (r->in.buf_size > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
@ -2904,7 +2904,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 0x40000) {
if (*r->out.bytes_needed > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -2914,7 +2914,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd
_mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
if (*r->out.services_returned < 0 || *r->out.services_returned > 0x40000) {
if (*r->out.services_returned > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
@ -3251,7 +3251,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
if (r->in.buf_size > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC(ndr, r->out.query);
@ -3273,7 +3273,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *nd
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) {
if (*r->out.bytes_needed > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -6087,7 +6087,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
if (r->in.buf_size > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
@ -6107,7 +6107,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) {
if (*r->out.bytes_needed > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -6195,7 +6195,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 8192) {
if (r->in.buf_size > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
@ -6215,7 +6215,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 8192) {
if (*r->out.bytes_needed > 8192) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -6536,7 +6536,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
if (r->in.buf_size < 0 || r->in.buf_size > 0x40000) {
if (r->in.buf_size > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
@ -6549,7 +6549,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
if (*r->in.resume_handle < 0 || *r->in.resume_handle > 0x40000) {
if (*r->in.resume_handle > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
@ -6591,7 +6591,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
if (*r->out.bytes_needed < 0 || *r->out.bytes_needed > 0x40000) {
if (*r->out.bytes_needed > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
@ -6601,7 +6601,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
if (*r->out.service_returned < 0 || *r->out.service_returned > 0x40000) {
if (*r->out.service_returned > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
@ -6615,7 +6615,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in
_mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
if (*r->out.resume_handle < 0 || *r->out.resume_handle > 0x40000) {
if (*r->out.resume_handle > 0x40000) {
return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);

View File

@ -40,7 +40,7 @@ import "lsa.idl", "security.idl";
time_t time_written;
uint32 event_id;
eventlogEventTypes event_type;
[max(256)] uint16 num_of_strings;
[range(0,256)] uint16 num_of_strings;
uint16 event_category;
uint16 reserved_flags;
uint32 closing_record_number;

View File

@ -67,7 +67,6 @@ my %supported_properties = (
# array
"range" => ["ELEMENT"],
"max" => ["ELEMENT"],
"size_is" => ["ELEMENT"],
"string" => ["ELEMENT"],
"noheader" => ["ELEMENT"],

View File

@ -921,7 +921,6 @@ my %property_list = (
# array
"range" => ["ELEMENT"],
"max" => ["ELEMENT"],
"size_is" => ["ELEMENT"],
"string" => ["ELEMENT"],
"noheader" => ["ELEMENT"],

View File

@ -857,14 +857,16 @@ sub ParseDataPull($$$$$$$)
if (my $range = has_property($e, "range")) {
$var_name = get_value_of($var_name);
my $signed = Parse::Pidl::Typelist::is_signed($l->{DATA_TYPE});
my ($low, $high) = split(/,/, $range, 2);
$self->pidl("if ($var_name < $low || $var_name > $high) {");
$self->pidl("\treturn ndr_pull_error($ndr, NDR_ERR_RANGE, \"value out of range\");");
$self->pidl("}");
}
if (my $max = has_property($e, "max")) {
$var_name = get_value_of($var_name);
$self->pidl("if ($var_name > $max) {");
if ($low < 0 and not $signed) {
warning(0, "$low is invalid for the range of an unsigned type");
}
if ($low == 0 and not $signed) {
$self->pidl("if ($var_name > $high) {");
} else {
$self->pidl("if ($var_name < $low || $var_name > $high) {");
}
$self->pidl("\treturn ndr_pull_error($ndr, NDR_ERR_RANGE, \"value out of range\");");
$self->pidl("}");
}

View File

@ -8,7 +8,7 @@ package Parse::Pidl::Typelist;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(hasType getType resolveType mapTypeName scalar_is_reference expandAlias
mapScalarType addType typeIs is_scalar enum_type_fn
mapScalarType addType typeIs is_signed is_scalar enum_type_fn
bitmap_type_fn mapType typeHasBody
);
use vars qw($VERSION);
@ -145,6 +145,19 @@ sub hasType($)
return 0;
}
sub is_signed($)
{
my $t = shift;
return ($t eq "int8"
or $t eq "int16"
or $t eq "int32"
or $t eq "dlong"
or $t eq "int"
or $t eq "long"
or $t eq "short");
}
sub is_scalar($)
{
sub is_scalar($);

View File

@ -176,6 +176,11 @@ struct SMBC_internal_data {
*/
smbc_smb_encrypt_level smb_encryption_level;
/*
* Should we request case sensitivity of file names?
*/
bool case_sensitive;
struct smbc_server_cache * server_cache;
/* POSIX emulation functions */
@ -396,16 +401,6 @@ SMBC_errno(SMBCCTX *context,
/* Functions in libsmb_path.c */
int
SMBC_urldecode(char *dest,
char *src,
size_t max_dest_len);
int
SMBC_urlencode(char *dest,
char *src,
int max_dest_len);
int
SMBC_parse_path(TALLOC_CTX *ctx,
SMBCCTX *context,

View File

@ -550,6 +550,27 @@ smbc_getOptionSmbEncryptionLevel(SMBCCTX *c);
void
smbc_setOptionSmbEncryptionLevel(SMBCCTX *c, smbc_smb_encrypt_level level);
/**
* Get whether to treat file names as case-sensitive if we can't determine
* when connecting to the remote share whether the file system is case
* sensitive. This defaults to FALSE since it's most likely that if we can't
* retrieve the file system attributes, it's a very old file system that does
* not support case sensitivity.
*/
smbc_bool
smbc_getOptionCaseSensitive(SMBCCTX *c);
/**
* Set whether to treat file names as case-sensitive if we can't determine
* when connecting to the remote share whether the file system is case
* sensitive. This defaults to FALSE since it's most likely that if we can't
* retrieve the file system attributes, it's a very old file system that does
* not support case sensitivity.
*/
void
smbc_setOptionCaseSensitive(SMBCCTX *c, smbc_bool b);
/**
* Get from how many local master browsers should the list of workgroups be
* retrieved. It can take up to 12 minutes or longer after a server becomes a

View File

@ -5197,10 +5197,22 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
/* The following definitions come from rpc_client/cli_pipe.c */
NTSTATUS rpc_api_pipe_req(struct rpc_pipe_client *cli,
struct async_req *rpc_api_pipe_req_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct rpc_pipe_client *cli,
uint8_t op_num,
prs_struct *req_data);
NTSTATUS rpc_api_pipe_req_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
prs_struct *reply_pdu);
NTSTATUS rpc_api_pipe_req(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli,
uint8 op_num,
prs_struct *in_data,
prs_struct *out_data);
struct async_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct rpc_pipe_client *cli,
struct cli_pipe_auth_data *auth);
NTSTATUS rpc_pipe_bind_recv(struct async_req *req);
NTSTATUS rpc_pipe_bind(struct rpc_pipe_client *cli,
struct cli_pipe_auth_data *auth);
unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,

View File

@ -49,9 +49,8 @@
if (!prs_init( &q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \
return WERR_NOMEM;\
}\
prs_init_empty( &r_ps, ctx, UNMARSHALL );\
if ( q_io_fn("", &q_in, &q_ps, 0) ) {\
NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, &q_ps, &r_ps); \
NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(ctx, pcli, opnum, &q_ps, &r_ps); \
if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\
prs_mem_free( &q_ps );\
prs_mem_free( &r_ps );\

View File

@ -1889,6 +1889,7 @@ const char *get_mydnsfullname(void)
bool is_myname_or_ipaddr(const char *s)
{
TALLOC_CTX *ctx = talloc_tos();
char addr[INET6_ADDRSTRLEN];
char *name = NULL;
const char *dnsname;
char *servername = NULL;
@ -1941,7 +1942,6 @@ bool is_myname_or_ipaddr(const char *s)
/* Use DNS to resolve the name, but only the first address */
struct sockaddr_storage ss;
if (interpret_string_addr(&ss, servername, 0)) {
char addr[INET6_ADDRSTRLEN];
print_sockaddr(addr,
sizeof(addr),
&ss);

View File

@ -581,9 +581,20 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
TALLOC_FREE(s);
}
if (ads->server.ldap_server &&
ads_try_connect(ads, ads->server.ldap_server, ads->server.gc)) {
goto got_connection;
if (ads->server.ldap_server)
{
if (ads_try_connect(ads, ads->server.ldap_server, ads->server.gc)) {
goto got_connection;
}
/* The choice of which GC use is handled one level up in
ads_connect_gc(). If we continue on from here with
ads_find_dc() we will get GC searches on port 389 which
doesn't work. --jerry */
if (ads->server.gc == true) {
return ADS_ERROR(LDAP_OPERATIONS_ERROR);
}
}
ntstatus = ads_find_dc(ads);

View File

@ -84,7 +84,8 @@ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
prs_init_empty( &r_ps, req, UNMARSHALL );
status = rpc_api_pipe_req(req->pipe->rpc_cli, req->opnum, &req->q_ps, &r_ps);
status = rpc_api_pipe_req(req, req->pipe->rpc_cli, req->opnum,
&req->q_ps, &r_ps);
prs_mem_free( &req->q_ps );

View File

@ -69,6 +69,7 @@ smbc_new_context(void)
smbc_setOptionFullTimeNames(context, False);
smbc_setOptionOpenShareMode(context, SMBC_SHAREMODE_DENY_NONE);
smbc_setOptionSmbEncryptionLevel(context, SMBC_ENCRYPTLEVEL_NONE);
smbc_setOptionCaseSensitive(context, False);
smbc_setOptionBrowseMaxLmbCount(context, 3); /* # LMBs to query */
smbc_setOptionUrlEncodeReaddirEntries(context, False);
smbc_setOptionOneSharePerServer(context, False);

View File

@ -895,7 +895,7 @@ smbc_readdir_internal(SMBCCTX * context,
/* url-encode the name. get back remaining buffer space */
max_namebuf_len =
SMBC_urlencode(dest->name, src->name, max_namebuf_len);
smbc_urlencode(dest->name, src->name, max_namebuf_len);
/* We now know the name length */
dest->namelen = strlen(dest->name);

View File

@ -41,7 +41,7 @@ hex2int( unsigned int _char )
}
/*
* SMBC_urldecode()
* smbc_urldecode()
* and urldecode_talloc() (internal fn.)
*
* Convert strings of %xx to their single character equivalent. Each 'x' must
@ -122,7 +122,7 @@ urldecode_talloc(TALLOC_CTX *ctx, char **pp_dest, const char *src)
}
int
SMBC_urldecode(char *dest,
smbc_urldecode(char *dest,
char *src,
size_t max_dest_len)
{
@ -138,7 +138,7 @@ SMBC_urldecode(char *dest,
}
/*
* SMBC_urlencode()
* smbc_urlencode()
*
* Convert any characters not specifically allowed in a URL into their %xx
* equivalent.
@ -146,7 +146,7 @@ SMBC_urldecode(char *dest,
* Returns the remaining buffer length.
*/
int
SMBC_urlencode(char *dest,
smbc_urlencode(char *dest,
char *src,
int max_dest_len)
{
@ -286,7 +286,7 @@ SMBC_parse_path(TALLOC_CTX *ctx,
DEBUG(4, ("Found options '%s'", q));
/* Copy the options */
if (*pp_options != NULL) {
if (pp_options && *pp_options != NULL) {
TALLOC_FREE(*pp_options);
*pp_options = talloc_strdup(ctx, q);
}

View File

@ -245,6 +245,8 @@ SMBC_server(TALLOC_CTX *ctx,
int tried_reverse = 0;
int port_try_first;
int port_try_next;
int is_ipc = (share != NULL && strcmp(share, "IPC$") == 0);
uint32 fs_attrs = 0;
const char *username_used;
NTSTATUS status;
@ -310,6 +312,38 @@ SMBC_server(TALLOC_CTX *ctx,
srv = NULL;
}
/* Determine if this share supports case sensitivity */
if (is_ipc) {
DEBUG(4,
("IPC$ so ignore case sensitivity\n"));
} else if (!cli_get_fs_attr_info(c, &fs_attrs)) {
DEBUG(4, ("Could not retrieve "
"case sensitivity flag: %s.\n",
cli_errstr(c)));
/*
* We can't determine the case sensitivity of
* the share. We have no choice but to use the
* user-specified case sensitivity setting.
*/
if (smbc_getOptionCaseSensitive(context)) {
cli_set_case_sensitive(c, True);
} else {
cli_set_case_sensitive(c, False);
}
} else {
DEBUG(4,
("Case sensitive: %s\n",
(fs_attrs & FILE_CASE_SENSITIVE_SEARCH
? "True"
: "False")));
cli_set_case_sensitive(
c,
(fs_attrs & FILE_CASE_SENSITIVE_SEARCH
? True
: False));
}
/*
* Regenerate the dev value since it's based on both
* server and share
@ -370,7 +404,7 @@ again:
* Force use of port 139 for first try if share is $IPC, empty, or
* null, so browse lists can work
*/
if (share == NULL || *share == '\0' || strcmp(share, "IPC$") == 0) {
if (share == NULL || *share == '\0' || is_ipc) {
port_try_first = 139;
port_try_next = 445;
} else {
@ -476,6 +510,34 @@ again:
DEBUG(4,(" tconx ok\n"));
/* Determine if this share supports case sensitivity */
if (is_ipc) {
DEBUG(4, ("IPC$ so ignore case sensitivity\n"));
} else if (!cli_get_fs_attr_info(c, &fs_attrs)) {
DEBUG(4, ("Could not retrieve case sensitivity flag: %s.\n",
cli_errstr(c)));
/*
* We can't determine the case sensitivity of the share. We
* have no choice but to use the user-specified case
* sensitivity setting.
*/
if (smbc_getOptionCaseSensitive(context)) {
cli_set_case_sensitive(c, True);
} else {
cli_set_case_sensitive(c, False);
}
} else {
DEBUG(4, ("Case sensitive: %s\n",
(fs_attrs & FILE_CASE_SENSITIVE_SEARCH
? "True"
: "False")));
cli_set_case_sensitive(c,
(fs_attrs & FILE_CASE_SENSITIVE_SEARCH
? True
: False));
}
if (context->internal->smb_encryption_level) {
/* Attempt UNIX smb encryption. */
if (!NT_STATUS_IS_OK(cli_force_encryption(c,

View File

@ -193,6 +193,32 @@ smbc_setOptionSmbEncryptionLevel(SMBCCTX *c, smbc_smb_encrypt_level level)
c->internal->smb_encryption_level = level;
}
/**
* Get whether to treat file names as case-sensitive if we can't determine
* when connecting to the remote share whether the file system is case
* sensitive. This defaults to FALSE since it's most likely that if we can't
* retrieve the file system attributes, it's a very old file system that does
* not support case sensitivity.
*/
smbc_bool
smbc_getOptionCaseSensitive(SMBCCTX *c)
{
return c->internal->case_sensitive;
}
/**
* Set whether to treat file names as case-sensitive if we can't determine
* when connecting to the remote share whether the file system is case
* sensitive. This defaults to FALSE since it's most likely that if we can't
* retrieve the file system attributes, it's a very old file system that does
* not support case sensitivity.
*/
void
smbc_setOptionCaseSensitive(SMBCCTX *c, smbc_bool b)
{
c->internal->case_sensitive = b;
}
/**
* Get from how many local master browsers should the list of workgroups be
* retrieved. It can take up to 12 minutes or longer after a server becomes a

File diff suppressed because it is too large Load Diff

View File

@ -59,9 +59,7 @@ NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
talloc_free(push);
prs_init_empty( &r_ps, mem_ctx, UNMARSHALL );
status = rpc_api_pipe_req(cli, opnum, &q_ps, &r_ps);
status = rpc_api_pipe_req(mem_ctx, cli, opnum, &q_ps, &r_ps);
prs_mem_free( &q_ps );

View File

@ -361,13 +361,10 @@ uint32 prs_offset(prs_struct *ps)
bool prs_set_offset(prs_struct *ps, uint32 offset)
{
if(offset <= ps->data_offset) {
ps->data_offset = offset;
return True;
}
if(!prs_grow(ps, offset - ps->data_offset))
if ((offset > ps->data_offset)
&& !prs_grow(ps, offset - ps->data_offset)) {
return False;
}
ps->data_offset = offset;
return True;

View File

@ -1918,6 +1918,7 @@ NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p,
uint32 reject_reason;
struct samr_DomInfo1 *dominfo = NULL;
struct samr_ChangeReject *reject = NULL;
uint32_t tmp;
DEBUG(5,("_samr_ChangePasswordUser3: %d\n", __LINE__));
@ -1967,11 +1968,11 @@ NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p,
/* AS ROOT !!! */
pdb_get_account_policy(AP_MIN_PASSWORD_LEN,
(uint32_t *)&dominfo->min_password_length);
pdb_get_account_policy(AP_MIN_PASSWORD_LEN, &tmp);
dominfo->min_password_length = tmp;
pdb_get_account_policy(AP_PASSWORD_HISTORY,
(uint32_t *)&dominfo->password_history_length);
pdb_get_account_policy(AP_PASSWORD_HISTORY, &tmp);
dominfo->password_history_length = tmp;
pdb_get_account_policy(AP_USER_MUST_LOGON_TO_CHG_PASS,
&dominfo->password_properties);
@ -2833,10 +2834,11 @@ NTSTATUS _samr_QueryDomainInfo(pipes_struct *p,
/* AS ROOT !!! */
pdb_get_account_policy(AP_MIN_PASSWORD_LEN,
(uint32_t *)&dom_info->info1.min_password_length);
&account_policy_temp);
dom_info->info1.min_password_length = account_policy_temp;
pdb_get_account_policy(AP_PASSWORD_HISTORY,
(uint32_t *)&dom_info->info1.password_history_length);
pdb_get_account_policy(AP_PASSWORD_HISTORY, &account_policy_temp);
dom_info->info1.password_history_length = account_policy_temp;
pdb_get_account_policy(AP_USER_MUST_LOGON_TO_CHG_PASS,
&dom_info->info1.password_properties);
@ -2965,7 +2967,8 @@ NTSTATUS _samr_QueryDomainInfo(pipes_struct *p,
u_reset_time = account_policy_temp * 60;
pdb_get_account_policy(AP_BAD_ATTEMPT_LOCKOUT,
(uint32_t *)&dom_info->info12.lockout_threshold);
&account_policy_temp);
dom_info->info12.lockout_threshold = account_policy_temp;
/* !AS ROOT */