1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

67 Commits

Author SHA1 Message Date
Andrew Bartlett
2de07761e0 s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.

Andrew Bartlett
2010-03-16 19:26:03 +11:00
Matthias Dieter Wallnöfer
7a7cb5e9c2 s4:ldif_handlers - Change "unsigned int" to "uint32_t" which fits better here 2010-03-08 10:29:25 +01:00
Matthias Dieter Wallnöfer
8a8c2de29f s4:ldif_handlers - Use "unsigned int" for counting purposes
I changed "uint32_t" to "unsigned int" since the LDB specification prescrives
"unsigned (int)" for counter variables (number of attributes,
number of values...).
2010-03-04 10:38:31 +01:00
Brad Hards
1683d090cc LDB related spelling fixes.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:36 +01:00
Kamen Mazdrashki
93142e4a3a s4/ldif: Handle Schema:prefixMap blobs in W2K3 and W2K8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:31 +01:00
Kamen Mazdrashki
83068b42ae s4/ldif: Better control on ldif_write_NDR() errors processing
Current implementation mask NDR_ errors implicitly.
Thus the caller has no opportunity handle such an error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-01 15:23:31 +01:00
Andrew Tridgell
a3e089db19 s4-ldb: display security descriptors with correct SDL for known SIDs
This makes it much easier to compare SDs
2010-01-10 13:23:38 +11:00
Andrew Tridgell
bd6d0e9379 s4-ldb: added nice ldif display of 64 bit ranges for RIDs 2010-01-08 13:02:58 +11:00
Andrew Tridgell
00b39c70f5 s4-dsdb: switched to using RMD_FLAGS instead of DELETED in extended DNs
This allows for more flags in the future
2010-01-02 08:16:57 +11:00
Andrew Tridgell
708ad42b0b s4-dsdb: use safe length limiting in string->integer conversion
The ldap.py test suite could trigger a read past the end of the struct
ldb_val buffer
2010-01-02 08:16:55 +11:00
Andrew Tridgell
f1b6484232 s4-dsdb: split RMD_USN into RMD_LOCAL_USN and RMD_ORIGINATING_USN
We need a separate RMD_LOCAL_USN to allow us to tell what attributes
need to be sent in a getncchanges request. Thanks to Metze for
pointing this out.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:50 +11:00
Andrew Tridgell
f392ae5169 s4-ldb: display msDS-OptionalFeatureGUID as a GUID
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-18 21:03:39 +11:00
Andrew Tridgell
e3c2309dcd s4-ldb: added new ldb_dn extended components for linked attributes
These will store linked attribute replication meta data
2009-12-14 22:29:57 +11:00
Andrew Tridgell
215cc5a9ed s4-ldb: use GUID_to_ndr_blob() 2009-12-10 17:51:29 +11:00
Andrew Tridgell
2493776f59 s4-ldb: simplify ldif handlers using new GUID functions 2009-12-10 17:51:27 +11:00
Endi S. Dewata
8e5f5e3f05 s4:provision - Removed dependency on full Samba 3 schema from FDS 2009-11-16 07:57:40 +11:00
Andrew Bartlett
f0d43e9e56 s4:dsdb Use new dsdb_dn code in LDB modules and Samba4 schema
This converts the code from using the binary DN code in ldb_dn to
using a special Samba-specfic wrapper around ldb_dn.

We also use the dsdb_dn code for DN+Binary and DN+String comparisons
(changed from treating them as Binary blobs)

Andrew Bartlett
2009-11-12 16:34:04 +11:00
Andrew Bartlett
973197cd9d s4:ldb-samba Use new ldb_any_comparison helper function in ldb-samba 2009-11-12 16:34:04 +11:00
Andrew Bartlett
fd5174e88c lib/util Split data_blob_hex_string() into upper and lower
Rather than have a repeat of the bugs we found at the plugfest where
hexidecimal strings must be in upper or lower case in particular
places, ensure that each caller chooses which case they want.

This reverts most of the callers back to upper case, as things were
before tridge's patch.  The critical call in the extended DN code is
of course handled in lower case.

Andrew Bartlett
2009-11-12 16:34:01 +11:00
Endi S. Dewata
bf01937549 s4:dsdb - Store SID as string in FDS. 2009-11-02 16:36:54 +11:00
Kamen Mazdrashki
40a8a22684 s4/drs: Propagate redefinition of drsuapi_DsReplicaOID into code base
The biggest change is that 'oid' field is transmited in binary format.
Also the field name is changed to 'binary_oid' so that
field format to be clear for callers.

After those changes, Samba4 should work the way it works before -
i.e. no added value here but we should not fail when
partial-oid is part of prefixMap transmited from Win server.

Also, thre is a bug in this patch - partial-binary-OIDs are
not handled correctly. Partial-binary-OIDs received during
replication will be encoded, but not handled correctly.
2009-10-16 12:54:14 +03:00
Andrew Tridgell
41ba2f8189 ldb: fixed display of replUpToDateVector 2009-10-15 08:20:37 +11:00
Andrew Tridgell
3f59705a71 Revert "s4:ldb-samba Use temp talloc contexts and talloc_steal avoid leaks."
This reverts commit 38f87f40bfd7892043d49009067ae28431279580.
2009-10-02 22:40:50 +10:00
Andrew Bartlett
38f87f40bf s4:ldb-samba Use temp talloc contexts and talloc_steal avoid leaks.
We would use the mem_ctx for internal work, but previously we did not
clean it up on exit.

Andrew Bartlett
2009-10-02 12:45:01 +02:00
Andrew Bartlett
f28219d1a1 s4:ldif_handlers Fix memory leak in objectCategory LDIF handler 2009-09-23 14:01:30 -07:00
Andrew Tridgell
8fd6ce613a s4-ldb: display an error if we can't decode a NDR blob 2009-09-19 18:41:22 -07:00
Andrew Tridgell
0ed467ac0c s4/ldb: support NDR printing for 2 more replication types
print replUpToDateVector and replPropertyMetaData using NDR format if
--show-binary is given.
2009-09-08 22:15:59 +10:00
Andrew Tridgell
27ff8f4e73 s4/ldb: allow prefixMap to be shown as NDR 2009-09-08 22:02:59 +10:00
Andrew Tridgell
a8e8a31611 s4/ldb: allow printing ntSecurityDescriptor in full
print security descriptors in NDR format if --show-binary is
given. This is easier to read than sddl format.
2009-09-08 21:56:31 +10:00
Andrew Tridgell
6d1d33319c s4/ldb: added ldif handler for repsFrom/repsTo
In normal usage this makes no difference, but if you add --show-binary
then you can see the NDR printed out in the usual ndr_print_*() format
2009-09-08 21:56:31 +10:00
Matthias Dieter Wallnöfer
2cf897b10a s4: Make the int32 problem more clear - and fix another error 2009-08-17 20:29:11 +02:00
Matthias Dieter Wallnöfer
6cc9e4b900 s4: Fixed the int32 datatype support
Should finally fix bug #6136 ("groupType", "sAMAccountType" ... attributes).
2009-08-17 13:15:26 +02:00
Andrew Bartlett
dac8aabb55 Add const 2009-08-04 16:11:55 +10:00
Andrew Bartlett
d7b39a353a s4:ldif_handlers Allow a binary nTsecurityDescriptor when parsing LDIF
Also allow a SDDL security descriptor, using the domain SID attached
to the session (it will search for it during the LDIF parse if need
be).

Andrew Bartlett
2009-08-04 16:10:39 +10:00
Andrew Bartlett
49e5b83aa9 s4: dsdb Avoid using the internal ldb_private.h header
This job is not complete (the partition module remains a unfinished
task), but now we do use the private ldb headers much less.

Andrew Bartlett
2009-06-30 15:12:29 +10:00
Matthias Dieter Wallnöfer
0376d056e5 Correct handling of 32-bit integer attributes in SAMBA 4
- LDB handles now all 32-bit integer attributes correctly (also with overflows)
  according to the schema
- LDAP backends handle the attributes "groupType", "userAccountControl" and
  "sAMAccountType" correctly. This handling doesn't yet use the schema but
  the conversion file "simple_ldap.map.c" which contains them hardcoded.
  Did also a refactoring of the conversion function there.
- Bug #6136 should be gone
2009-06-19 11:32:01 +10:00
Jelmer Vernooij
4657f52c06 Fix build with system LDB. 2009-06-18 01:21:35 +02:00
Andrew Tridgell
9539e2b508 major upgrade to the ldb attribute handling
This is all working towards supporting the full WSPP schema without a
major performance penalty.

We now use binary searches when looking up classes and attributes. We
also avoid the loop loading the attributes into ldb, by adding a hook
to override the ldb attribute search function in a module. The
attributes can thus be loaded once, and then saved as part of the
global schema. 

Also added support for a few more key attribute syntaxes, as needed
for the full schema.
2009-04-02 16:42:21 +11:00
Stefan Metzmacher
82466db35d s4:ldif_handlers: s/class/sclass
metze
2009-02-02 13:09:15 +01:00
Simo Sorce
0245b9b973 Explicitly include ldb_handlers.h where necessary 2009-01-30 20:12:50 -05:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
Separate again the public from the private headers.

Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
2009-01-30 01:02:03 -05:00
Andrew Bartlett
408a752a63 s4:ldb-samba: register samba specific extended dn handlers
This provides the two extended DN handlers for the GUID and SID types,
and makes the parsing more strict (where possible, it uses
ndr_pull_struct_blob_all(), to cause an error if trailing data is
found).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:26 +11:00
Stefan Metzmacher
1290b1d3d3 s4:librpc/ndr: integrate NDR_MISC into LIBNDR
metze
2008-11-16 16:24:34 +01:00
Andrew Tridgell
0521ed1ddf fixed the GUID and objectSID canonicalisation functions
(This used to be commit 115053ea7e70b067e7873668ed83f1f10908287d)
2008-08-22 18:37:34 +10:00
Andrew Bartlett
4ad97a1d05 Don't walk past the end of ldb values.
This is a partial fix towards bugs due to us walking past the end of
what we think are strings in ldb.  There is much more work to do in
this area.

Andrew Bartlett
(This used to be commit 5805a9a8f35fd90fa4f718f73534817fa3bbdfd2)
2008-08-21 19:24:58 +10:00
Andrew Bartlett
c36c42af29 Handle error cases in attribute handlers better.
We don't need to just bail, for all these error cases there is still
real result that can be made - just fall back to binary copy/compare.

Andrew Bartlett
(This used to be commit 6aa5dde2aa9a5f070871ecc117e44bfcad363459)
2008-08-21 15:10:40 +10:00
Andrew Bartlett
473540d4a5 Don't hardcode attributes to be treated as a DN
This is now handled by reading the schema into the attributes.

Also, when we do set something here, mark it as FIXED, so the schema
and any reload from @ATTRIBUTES won't touch it.

Andrew Bartlett
(This used to be commit 7b24701335398ece3d1b3a20cf5f1174500b16ce)
2008-08-21 12:56:04 +10:00
Andrew Bartlett
bb80a19714 Note the ldb syntax for attribute syntaxes in the table.
This includes additional Samba-specific syntaxes made available from
the ldif_handlers code.

This commit also changes some table to use #defines, to ensure
consistancy in other parts of the code.

Andrew Bartlett
(This used to be commit e26a5efd9a580ed3728e1f449e367b1cd4a73b5f)
2008-08-18 20:30:27 +10:00
Andrew Bartlett
08656f831c Depend on NDR_DRSBLOBS explicity.
Something else ensures this links correctly (for the moment) but for
the long-term let's declare our depenency (for the prefixMap stuff)
here.

Andrew Bartlett
(This used to be commit 5fcb39594b07c7b7a11985711a912b7a4d629ae7)
2008-06-20 18:22:15 +10:00
Andrew Bartlett
617ef56aa3 Remove extra spaces on prefixMap input and output.
Metze requested that the format not include spaces, and the input parser
already expects this.

Andrew Bartlett
(This used to be commit 3b1f5d10360ed1b26980d748a7c9be6db5977bd3)
2008-05-29 20:16:18 +10:00