1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

313 Commits

Author SHA1 Message Date
Andrew Bartlett
24d2107324 r8650: Use the timestamps and a new objectguid module rather than placing
boilerplate attributes in every entry in provision.ldif.

The next step will be to use templates.

Andrew Bartlett
(This used to be commit 940ed9827f5ab83b668a60a2b0110567dd54c3e2)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
338c3f8523 r8625: move the ldb_wrap logic into the ldb code. This logic is meant to
avoid the horrors of posix locking, but it was preventing us having an
ldb open twice with different options. Now each ldb open of the same
file shares the same underlying tdb, but uses a different ldb
structure
(This used to be commit 4e090c66dfa1d2764e4693578d3845be3b8893f6)
2007-10-10 13:29:45 -05:00
Andrew Tridgell
c1a4f0c769 r8601: fixed null termination in ltdb connect error
(This used to be commit 64b6586b57de0bf22f8779447d217a918b7024a0)
2007-10-10 13:29:43 -05:00
Andrew Tridgell
3c5675af93 r8600: fixed null termination on some error messages in ldb
(This used to be commit 326f0ad6fba8d78f104b93b49995e6c24f9493ef)
2007-10-10 13:29:43 -05:00
Simo Sorce
bfb1186269 r8585: add to ldb and ldap comparison functionality
better pares filters
Approx is currently only a stub need to dig more info to
understand what it really means and how it works exactly
(This used to be commit a9e8cd0bad27ed2b3c6a12302e787ba3c9a70a3c)
2007-10-10 13:29:41 -05:00
Simo Sorce
7bcccfc000 r8529: Matching against the wrong union
(This used to be commit 24a65b5ba6e31655bdf49be8076d758206694ac3)
2007-10-10 13:29:35 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b3854973b694d2b1e22323ed7eb00e3a3f)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
6e4bcaffa0 r8517: fixed a crash bug in ldb_dn_compare_base()
(This used to be commit 19d789e82526eff236aeed77ddc8d2606c5118b6)
2007-10-10 13:29:34 -05:00
Simo Sorce
cb2c43f7b0 r8515: ldb_dn_cmp now uses ldb_dn_compare so that the DNs are compared
on a content level not ona form level, his means that the 2 DNs:
a) cn= user, dc=this, dc = is,dc=test
b) cn=user,dc=this,dc=is,dc=test
are now identical even if the string form differ (spaces)
(This used to be commit 76d496c30867ae80434483a34b0d842523aed762)
2007-10-10 13:29:33 -05:00
Andrew Tridgell
4df9b5a6e3 r8490: make the ldb tests more portable
(This used to be commit 6b20bcbeeb33a2cf6abc7bb251830ad6def9a79e)
2007-10-10 13:23:09 -05:00
Andrew Tridgell
32b06d5882 r8485: - be friendly to shells other than bash
- don't use /tmp in test paths, as that opens us to symlink attacks
(This used to be commit 9f29cccbc1fb44cb0317911601456c190883f066)
2007-10-10 13:23:08 -05:00
Tim Potter
52bef30fd4 r8414: Some C++ friendlyness fixes - 'not' is apparently a keyword in C++.
(This used to be commit bcfb3a45e4a5962fe763f8071d4458f4bd11605b)
2007-10-10 13:23:00 -05:00
Love Hörnquist Åstrand
61edb97bdf r8394: Make sure the argument to ctype is*(3) macros are unsigned char as
required by ISO C99.
(This used to be commit 56fd21c806e816cf4c3d23881f26474f858b45e2)
2007-10-10 13:20:14 -05:00
Simo Sorce
f5598308d5 r8377: forgot an ldif test
(This used to be commit ed804262dc6abf01ffdeb03a36d94cf40b9f033c)
2007-10-10 13:20:14 -05:00
Simo Sorce
c9b0e86a43 r8373: New wildcard matching code.
This code applies correct ldap standard wildcard matching code
removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently
adds some more tests for wildcard matching
fixes dn comparison code in ldb_match
(This used to be commit 4eb5863042011988d85092d7dde3d809aa15bd59)
2007-10-10 13:20:13 -05:00
Andrew Tridgell
a7c7a9c64c r8364: fixed a valgrind bug spotted by simo
(This used to be commit ef804e8f36f1835d5d61f69565f1195a70f37e74)
2007-10-10 13:20:12 -05:00
Andrew Tridgell
7c78ec0e14 r8342: allow ldb_ldif_read_string() to continue in the string, so you can
read multiple records
(This used to be commit 4b11c00421b5152fd7d4be0be0db983bb310021d)
2007-10-10 13:20:08 -05:00
Stefan Metzmacher
d9129a77bd r8228: fix compiler warnings
metze
(This used to be commit 93c1d18021cbf08be1782b129c40d8769b1b559c)
2007-10-10 13:19:22 -05:00
Stefan Metzmacher
5a176571d8 r8224: - add objectGUID ldif_handler
- fix some compiler warnings

metze
(This used to be commit e6c39241bf93336d4c94c43f9d8beb69018fb74a)
2007-10-10 13:19:21 -05:00
Stefan Metzmacher
8f9e87d858 r8146: fix compiler warning
metze
(This used to be commit 5fcaa21d67e399aab4af15f4f6f919203c1152e5)
2007-10-10 13:19:12 -05:00
Simo Sorce
3fe6ca1c18 r8084: do not leak memory on errors
(This used to be commit 2e328e6c2fc2c66b0d0de910cd43ab232049bc90)
2007-10-10 13:19:07 -05:00
Simo Sorce
e6b353e764 r8083: check attribute type is valid (only ascii alphanum chars and '-' char)
fail if not
(This used to be commit b1a61cd5d03b4c61b81c810123ffeb3621831617)
2007-10-10 13:19:06 -05:00
Simo Sorce
1c5105065a r8082: large rewite of ldb_dn.c
- we do not support multpiple attribute components anymore, makes code a lot easier
  they will be readded later if we found out they are really used, so far my tests
  show w2k3 do not handle them as well

- fix escaping issues, move component value to be in an ldb_val structure
  still need to handle binary values case

- make cononicalize functions leak less memory by giving a specific memory context

- fix tests scripts so that test-ldap can start
- make test not delete databases on completion so that I can inspect them
(This used to be commit 624a73148d125690ce18515f19231d26df207738)
2007-10-10 13:19:06 -05:00
Andrew Tridgell
75883a2237 r8071: reduce the size of the default ldb tests. We run on some pretty low powered machines
in the farm, and don't want to chew too much cpu needlessly.
(This used to be commit c03753faa46d52ae4606546b57962e10c41ea3ad)
2007-10-10 13:19:05 -05:00
Andrew Tridgell
f450b0a02a r8043: increase shell compatibility of ldb tests
(This used to be commit 60863b6faf7f78566052491340607cbb4b3f2e72)
2007-10-10 13:19:02 -05:00
Andrew Tridgell
978335ae94 r8041: remove a mis-spelled debug message :-)
(This used to be commit 912fa269d293b3b55fc5fa65f9532614fe2e202d)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
036a7dd9f8 r8039: allow ldb test suite to be run outside of the ldb directory
(This used to be commit f3e3b2ccd93b87c1c240cf7e44106389b089b526)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
bd7812be31 r8038: - fixed indexing on binary values that need base64 encoding and canonicalisation
- added support for recognising the S- form of objectsid in search
  expressions. I thought this could be done with just a comparison
  modified comparison function, but it turns out it also needs a
  canonicalisation function so that indexing can work
(This used to be commit 7d2bee2c5619f284375ecbed14371c5e8639ed1c)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
a06d66a3a6 r8037: a fairly major update to the internals of ldb. Changes are:
- moved the knowledge of attribute types out of ldb_tdb and into the
   generic ldb code. This allows the ldb_match() message match logic
   to be generic, so it can be used by other backend

 - added the generic ability to load attribute handlers, for
   canonicalisation, compare, ldif read and ldif write. In the future
   this will be used by the schema module to allow us to correctly
   obey the attributetype schema elements

 - added attribute handlers for some of the core ldap attribute types,
   Integer, DirectoryString, DN, ObjectClass etc

 - added automatic registration of attribute handlers for well-known
   attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass'

 - converted the objectSid special handlers for Samba to the new system

 - added more correct handling of indexing in tdb backend based on the
   attribute canonicalisation function

 - added generic support for subclasses, moving it out of the tdb
   backend. This will be used in future by the schema module

 - fixed several bugs in the dn_explode code. It still needs more
   work, but doesn't corrupt ldb dbs any more.
(This used to be commit 944c5844ab441b96d8e5d7b2d151982139d1fab9)
2007-10-10 13:19:01 -05:00
Andrew Tridgell
324de0b36d r8035: added indexing tests. current ldb fails the integer indexing, will be fixed shortly
(This used to be commit a9c32445035a09978c5fdbc189a2767e7650dfc2)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
64307e6351 r8033: - add easier valgrind testing
- add tests for the @SUBCLASSES ltdb special
(This used to be commit ad6e62fdcf0432fcf4d41edb1727cbba1b7528b7)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
baa873b8a1 r8011: arrgh, commit the right version this time
(This used to be commit 5efea40ea63b6951b3bd4362f1ae57f960fefecf)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
34c57c5629 r8010: added testing of wildcard attributes
(This used to be commit 25d3872a6ebbc152a83695e667f5d08e69c8c8ea)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
bed487f6a3 r8009: expanded the ldb test suite. It worried me that some changes I have
pending, which I know break lots of features, still passed our test
suite! Now they don't.
(This used to be commit 5801167c8dfc8a61bfeac396bca8ffd3d5270296)
2007-10-10 13:18:58 -05:00
Andrew Tridgell
c645eba60b r8005: escape '"' characters in ldap expressions. Makes scripting easier.
(This used to be commit 2de986455c9b616132f06a69c2f135019da2bb8b)
2007-10-10 13:18:58 -05:00
Jelmer Vernooij
65cc3f5d5c r7958: More debian packaging updates; packages build now with
a few minor issues.

Move ldb manpages one level higher - there is no longer a need to have
subdirectories.
(This used to be commit e8e3524b2394f4107230715ea38fb619332e0251)
2007-10-10 13:18:54 -05:00
Jelmer Vernooij
fa8d539e0f r7943: Add 'make manpages', fix 'make installman' and 'make uninstallman'.
Not part of the "all" make target yet, as it requires xsltproc
(This used to be commit fd3f4636438cf1d9c0dd802064033271b9e4d935)
2007-10-10 13:18:53 -05:00
Simo Sorce
e1e95277c0 r7937: main file was missing
(This used to be commit 3898cdb0dc4722a7eb60a61b54ef778dab475aed)
2007-10-10 13:18:53 -05:00
Simo Sorce
1702f52498 r7936: new ldb_dn_explode and ldb_dn_casefold functions and co
(This used to be commit 7ccf21ab4eeb9821e457308a239f2103a106fb12)
2007-10-10 13:18:52 -05:00
Andrew Tridgell
6a7119fc83 r7926: poptGetNextOpt() returns int, not char
this was breaking ldbadd on some platforms
(This used to be commit dd0ac3f68d709c0364d992673e76db73398c0369)
2007-10-10 13:18:51 -05:00
Derrell Lipman
1603fd9466 r7897: work in progress
(This used to be commit 8e1431efcf0df797bc50ef584c38fce6a03429b3)
2007-10-10 13:18:47 -05:00
Andrew Tridgell
49736de46a r7873: hopefully fixed build of ldb_explode_dn() on AIX
I'd really rather see this code completely replaced, but I'll leave
that to simo (he has volunteered) :-)
(This used to be commit cc2e08d68e27aa203ccc26e8d544a86de3399877)
2007-10-10 13:18:46 -05:00
Andrew Tridgell
b818ff3ede r7868: canonicalise the message before using ldb_add() in the ldbadd utility.
(This used to be commit 56f4af5f210da472d41d9bcf6918647181f6ad16)
2007-10-10 13:18:45 -05:00
Andrew Tridgell
bdee131f30 r7860: switch our ldb storage format to use a NDR encoded objectSid. This is
quite a large change as we had lots of code that assumed that
objectSid was a string in S- format.

metze and simo tried to convince me to use NDR format months ago, but
I didn't listen, so its fair that I have the pain of fixing all the
code now :-)

This builds on the ldb_register_samba_handlers() and ldif handlers
code I did earlier this week. There are still three parts of this
conversion I have not finished:

 - the ltdb index records need to use the string form of the objectSid
   (to keep the DNs sane). Until that it done I have disabled indexing on
   objectSid, which is a big performance hit, but allows us to pass
   all our tests while I rejig the indexing system to use a externally
   supplied conversion function

 - I haven't yet put in place the code that allows client to use the
   "S-xxx-yyy" form for objectSid in ldap search expressions. w2k3
   supports this, presumably by looking for the "S-" prefix to
   determine what type of objectSid form is being used by the client. I
   have been working on ways to handle this, but am not happy with
   them yet so they aren't part of this patch

 - I need to change pidl to generate push functions that take a
   "const void *" instead of a "void*" for the data pointer. That will
   fix the couple of new warnings this code generates.

Luckily it many places the conversion to NDR formatted records
actually simplified the code, as it means we no longer need as many
calls to dom_sid_parse_talloc(). In some places it got more complex,
but not many.
(This used to be commit d40bc2fa8ddd43560315688eebdbe98bdd02756c)
2007-10-10 13:18:44 -05:00
Simo Sorce
ce2e35309e r7851: We are case preserving let the DN be returned the same the user put it into.
sss
(This used to be commit 5b41e3202456549250e6e5b1c63bd45ea7500fa3)
2007-10-10 13:18:42 -05:00
Derrell Lipman
f1a853664c r7844: eliminate superfluous attribute tables
(This used to be commit 863beef35b769c5a531819c974754aea2a790921)
2007-10-10 13:18:42 -05:00
Andrew Tridgell
9f51b5716d r7834: added comment about the "((" search test
(This used to be commit 42c42f6611fa295ca60782661781d023c4fdaf8b)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
0eb6bc1257 r7833: changed ldbsearch and ldbedit to have command line syntax closer to
ldapsearch. They look for an '=' in the first argument to see if it is
a search expression, and if not then it does an 'all records' search
(This used to be commit 91cc009fedefa7b263b345dfa511800e0f4f66a8)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
3b9eabc2f3 r7832: missed one
(This used to be commit 20c84f5c5219c6f306888771b56e0dfdeb8fd774)
2007-10-10 13:18:41 -05:00
Andrew Tridgell
c97e6081e6 r7831: use cn=TEST as base of test DNs so we don't interfere with potentially real records
(This used to be commit 2a426f654db668f4bfc899771dd11598e295b774)
2007-10-10 13:18:41 -05:00