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

96 Commits

Author SHA1 Message Date
Andreas Schneider
ba02d89be1 librpc:idl: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-23 13:44:31 +00:00
Andrew Bartlett
937bf4b836 librpc/ndr: Unimplement DRSUAPI_COMPRESSION_TYPE_XPRESS and rename
DRSUAPI_COMPRESSION_TYPE_XPRESS is not MS-XCA nor is it implemented by
lzexpress_compress(), so disconnect from that algorithm.

This avoids someone fixing lzxpress_compress() to work for DRSUAPI
and breaking claims support.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2023-03-31 01:48:30 +00:00
Stefan Metzmacher
f1c5fa28c4 CVE-2022-37966 drsuapi.idl: add trustedDomain related ATTID values
For now this is only for debugging in order to see
DRSUAPI_ATTID_msDS_SupportedEncryptionTypes in the replication meta
data.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15219
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2022-12-13 13:07:30 +00:00
Gary Lockyer
575d39048e idl: limit recurion on recursive elements
Limit the max_recursion on self recursive definitions in the idl to
20,000. This value is hopefully large eneough to not impact normal
operation, but small eneough to prevent stack over flow issues.

Credit to OSS-Fuzz

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19820
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 27 02:29:21 UTC 2020 on sn-devel-184
2020-02-27 02:29:20 +00:00
Gary Lockyer
2f8c3b6226 idl: drsuapi_DsaAddressListItem_V1 limit recursion
Limit number of drsuapi_DsaAddressListItem_V1 elements to 1024

Credit to OSS-Fuzz

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19820
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-27 01:02:32 +00:00
Stefan Metzmacher
09de6f0618 librpc/idl: change from samr_GroupAttrs in samr.idl to security_GroupAttrs in security.idl
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2019-09-20 01:14:42 +00:00
Stefan Metzmacher
140a6733a4 drsuapi.idl: add DRSUAPI_ATTID_schemaInfo
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13799

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2019-04-11 04:17:09 +00:00
Stefan Metzmacher
2f1ba314df drsuapi.idl: add DN/fpo-enabled attributes as DRSUAPI_ATTID_* values
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13307

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2018-03-19 20:30:49 +01:00
Tim Beale
cc201c2c4f drepl: Support GET_TGT on periodic replication client
- Update IDL comments to include Microsoft reference doc
- Add support for sending v10 GetNCChanges request (needed for the
  GET_TGT flag, which is in the new 'more_flags' field)
- Update to also set the GET_TGT flag in the same place we were setting
  GET_ANC (I split this logic out into a separate function).
- The state struct now needs to hold a 'more_flags' field as well (this
  flag is different to the GET_ANC replica flag)

Note that using the GET_TGT when replicating from a Windows DC could be
highly inefficient. Because Samba keeps the GET_TGT flag set throughout
the replication cycle, it will basically receive a repeated object from
Windows for every single linked attribute that it receives.

I believe Windows behaviour only expects the client to set the GET_TGT
flag when it actually needs to (i.e. when it receives a target object it
doesn't know about), rather than throughout the replication cycle.
However, this approach won't work with Samba-to-Samba replication,
because when the server receives the GET_TGT flag it restarts the
replication cycle from scratch. So if we only set the GET_TGT flag when
the client encountered an unknown target then Samba-to-Samba could
potentially get into an endless replication loop.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
2017-08-18 06:07:12 +02:00
Garming Sam
acc66d91b2 drsuapi.idl: Expose GetNCChanges req8 like req10
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-04-13 07:29:16 +02:00
Stefan Metzmacher
f5d3b863c7 drsuapi.idl: make drsuapi_DsGetNCChangesRequest10 [public]
This allows ndr_print to work.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-08 23:20:18 +01:00
Stefan Metzmacher
0c77567a4e drsuapi.idl: add drsuapi_DrsMoreOptions with DRSUAPI_DRS_GET_TGT
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-08 23:20:18 +01:00
Stefan Metzmacher
49cd4c9853 drsuapi.idl: add DRSUAPI_ATTID_operatorCount and DRSUAPI_ATTID_adminCount
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-07-09 15:06:19 +02:00
Garming Sam
e37af464e1 drsuapi.idl: Add attid used in testing in idl
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11960
2016-06-16 04:40:13 +02:00
Stefan Metzmacher
9c09911338 drsuapi.idl: add DRSUAPI_ATTID_objectGUID and DRSUAPI_ATTID_replPropertyMetaData
These might be usefull in future if we want to fast check
against dsdb_attribute->attributeID_id, instead of an expensive
ldb_attr_cmp(). They will never appear in replPropertyMetaData.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-02-01 09:53:10 +01:00
Samuel Cabrero
d747372d28 idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfo
Signed-off-by: Samuel Cabrero <scabrero@zentyal.com>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-07-07 05:22:33 +02:00
Matthieu Patou
8dc931bafc librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.
Previous implementation had a problem with NDR64 with uint32 and
uint3264 being in the wrong order

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 10:16:02 CET 2013 on sn-devel-104
2013-10-30 10:16:02 +01:00
Stefan Metzmacher
1e2e421632 librpc-idl: replace int32 by uint32 as the values are always > 0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-26 16:33:07 -07:00
Matthieu Patou
568bf16dfa librpc-idl: replace int32 by the enumeration as it's the type that we use in union's switch drsuapi_DsGetDCInfoCtrLevels
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-26 16:33:07 -07:00
Stefan Metzmacher
51d8eba841 drsuapi.idl: change the range for attribute values to 26214400 bytes.
This matches the IDL from [MS-DRSR].

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
2013-09-24 00:11:15 +02:00
Matthieu Patou
8bbb4d7b51 drsuapi-idl: Fix the encoding of the source_dsa_dns
astring is not aligned and is not conformant
2012-10-07 21:51:03 -07:00
Matthieu Patou
78aaffce2f idl: fix the charset for the source_dsa_address in DsReplicaDel call
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Apr 22 03:00:06 CEST 2012 on sn-devel-104
2012-04-22 03:00:06 +02:00
Dave Craft
b58cb7ea93 Add DRSUAPI_DRS_UPDATE_(x) flags
DRSUAPI_DRS_UPDATE flags are used in
DRS_MSG_REPMOD_V1 message structure when repsFrom
is modified via RPC.  The RPCs are currently uncoded but
samba_kcc maintains the flags (and uses them to identify
what repsFrom changes are to be executed).  These are currently
helpful to samba_kcc and are intended to ultimately be used in
RPCs.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-12-08 11:48:17 +11:00
Andrew Tridgell
004f8c6e97 drsuapi: added ncName attid in enum 2011-10-04 15:08:56 +11:00
Stefan Metzmacher
c39e80094b drsuapi.idl: add some more DRSUAPI_ATTID_* values
These will be use for "net rpc vampire passwd" in source3.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan 12 19:51:53 CET 2011 on sn-devel-104
2011-01-12 19:51:53 +01:00
Kamen Mazdrashki
9221c38e16 s4-druspia.idl: rename DRSUAPI_ATTID_NONE to DRSUAPI_ATTID_INVALID
0xFFFFFFFF is actually an invalid value for an ATTID
and *_INVALID will make it more easy to notice in logs
2010-10-31 23:54:04 +00:00
Kamen Mazdrashki
717b1158a6 idl: Use DRSUAPI_ATTID_ prefix instead of DRSUAPI_ATTRIBUTE_ for ATTID values
Those values are actually ATTID values and such, they are used
for ATTIDs for Attributes, Classes and Syntaxes.
2010-10-31 23:54:04 +00:00
Andrew Tridgell
d690622f37 idl-drsuapi: fixed another replica_flags that should use the bitmap
Pair-Programmed-With: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-09-29 22:12:57 -07:00
Anatoliy Atanasov
b55853cd64 s4/drs: Added the rest of the enum drsuapi_DsNameFormat values
According to documentation - [MS-DRSR] 4.1.4.1.2 and 4.1.4.1.3
2010-09-20 09:39:44 -07:00
Kamen Mazdrashki
26efea195a s4-drsuapi: Implement custom printing for drsuapi protocol for
drsuapi_DsReplicaAttribute and drsuapi_DsAttributeValueCtr objects

This makes tracing what data has been transferred much easier
2010-08-21 00:33:52 +03:00
Kamen Mazdrashki
a4719a4e12 s4-drsuapi: Sort ATTID definitions by ATTID value 2010-05-21 17:36:40 +03:00
Kamen Mazdrashki
ffc46769b3 s4/drsuapi: Yet another set of predefined ATTIDs 2010-05-21 17:36:40 +03:00
Kamen Mazdrashki
ad9050a6ff s4/drsuapi: Add another set of predefined ATTIDs
Very useful for debugging/dumping purposes
2010-05-19 02:49:05 +03:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Kamen Mazdrashki
ef6976dad3 idl: drsuapi.idl - fix few more comments 2010-03-24 17:34:45 +02:00
Kamen Mazdrashki
842d75613b s4/idl: DsAddEntry V3 request description 2010-03-24 17:34:43 +02:00
Kamen Mazdrashki
6b3ff0de46 s4/idl: Remove drsuapi_DsAddEntryExtraErrorBuffer - it is not used anymore 2010-03-24 17:34:42 +02:00
Kamen Mazdrashki
3efad5a6d8 s4/idl: Complete drsuapi_DsAddEntryErrorInfo description
Members for Security, Service, Update and System errors renamed
to be more descriptive.

All those error types share same description.
2010-03-24 17:34:41 +02:00
Kamen Mazdrashki
0663799275 s4/idl: Add DsAddEntry Referral error definition 2010-03-24 17:34:40 +02:00
Kamen Mazdrashki
61e80fe3eb s4/idl: Add DsAddEntry Name resolution error definition 2010-03-24 17:34:39 +02:00
Kamen Mazdrashki
fbaf3b3799 s4/drs: pretty print for drsuapi_DsAddEntry_AttrErrListItem_V1 2010-03-24 17:34:38 +02:00
Kamen Mazdrashki
98cbcf809f s4/idl: redefine drsuapi_DsAddEntryErrorInfo1
This actually describes Attribute error during DsAddEntry execution.

Structure is renamed to drsuapi_DsAddEntryErrorInfo_Attr.
And structure to define Attribute error data are all
prefixed with drsuapi_DsAddEntry_AttrErr
2010-03-24 17:34:37 +02:00
Kamen Mazdrashki
7b4341637c s4/idl: drsuapi_DsAddEntryError refactored
Structure description and name was changed to be aligned with
WSPP definition.

Ref: [MS-DRSR] 4.1.1.1.23
2010-03-24 17:34:36 +02:00
Kamen Mazdrashki
fbc1528649 s4/idl: DsAddEntry - refactor DsAddEntryCtr2 structure
Reply structure definition was aligned with WSPP documentation
Ref: [MS-DRSR], section 4.1.1.1.7
2010-03-24 17:34:34 +02:00
Kamen Mazdrashki
4cdf4627a1 s4/idl: Update drsuapi_DsAddEntryErrorInfoX definition
drsuapi_DsAddEntryErrorInfoX is an extended error
description used by most of the error infos returned
by DsAddEntry RPC method.
2010-03-24 17:34:33 +02:00
Kamen Mazdrashki
818719f7ba s4/idl: DIRERR error codes definition
DIRERR codes specify class of error returned from
DsAddEntry method call.

Ref: [MS-DRSR], section 4.1.1.1.25
2010-03-24 17:34:32 +02:00
Kamen Mazdrashki
a4ed8dc1fd s4/idl: DsAddEntry - switch types should be unsigned 2010-03-24 17:34:31 +02:00
Stefan Metzmacher
f85c825ae2 drsuapi.idl: don't mark drsuapi_DsGetMemberships as [todo]
metze
2010-03-12 15:25:39 +01:00
Stefan Metzmacher
aef4890a7c drsuapi.idl: finish drsuapi_DsGetNT4ChangeLog idl
metze
2010-03-11 13:31:38 +01:00
Kamen Mazdrashki
6853f452b4 s4/idl: drsuapi_QuerySitesByCostCtr1 'unknown' member is now known
and this it is a reserved fields for future flags - 'flags_reserver'
Must be 0 and is currently ignored.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-10 17:12:08 +01:00