1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

932 Commits

Author SHA1 Message Date
Andrew Tridgell
6ac7ea5027 r17749: more HPUX madness
(This used to be commit 444e92890f)
2007-10-10 14:16:36 -05:00
Stefan Metzmacher
7852524532 r17748: make the casts much easier to understand
metze
(This used to be commit 5992f3b918)
2007-10-10 14:16:36 -05:00
Stefan Metzmacher
7a76b20d4f r17747: ldb's make test should not try to install something
metze
(This used to be commit ccf9ad0d2f)
2007-10-10 14:16:36 -05:00
Andrew Tridgell
461ff1ecc9 r17746: the automatic archive creation in make breaks on 3 platforms. Lets try
manual archives and see if they work a bit better ....
(This used to be commit 15ec8c3741)
2007-10-10 14:16:36 -05:00
Andrew Tridgell
8ad26badea r17745: got rid of the final asprintf() in ldb
(This used to be commit 21377a6076)
2007-10-10 14:16:35 -05:00
Stefan Metzmacher
0749ab0400 r17743: fix compiler warnings
metze
(This used to be commit 694a56b0ae)
2007-10-10 14:16:35 -05:00
Andrew Tridgell
d95354300c r17741: tru64 uses inttypes.h not stdint.h.
ain't standards wonderful?
(This used to be commit 5eb59e5be0)
2007-10-10 14:16:35 -05:00
Andrew Tridgell
0a98d90995 r17740: get rid of dependence on asprintf(), using talloc_asprintf() instead
(This used to be commit 0e350ea0c1)
2007-10-10 14:16:34 -05:00
Andrew Tridgell
57f587729d r17739: forgot to add replace/*
(This used to be commit ceb09f50b7)
2007-10-10 14:16:34 -05:00
Andrew Tridgell
309ef90690 r17738: solving the seemingly trivial problem of timegm() being missing on
some systems requires quite a large change in ldb. The core problem is
that ldb doesn't have its own equivalent of lib/replace/, so we have
no sane place to put things like timegm.c

This patch moves part of lib/replace/ from Samba4 into ldb, and the
next patch will remove those parts from Samba4. We will probably need
to similarly move parts of lib/replace/ into lib/talloc/ and lib/tdb/,
so that at each level the libraries have replacements for the
functions they need, but higher level libraries don't need to
re-include replacements if a lower level library already replaces the
function
(This used to be commit c2f6c217fb)
2007-10-10 14:16:34 -05:00
Andrew Tridgell
1f7a813199 r17735: a (probably useless) attempt to workaround stupidity in HPs version of
make
(This used to be commit b85b1f5926)
2007-10-10 14:16:34 -05:00
Andrew Tridgell
8cbf9b64dc r17734: tru64 needs these for standalone build
(This used to be commit b735ad8cfa)
2007-10-10 14:16:33 -05:00
Andrew Tridgell
96adaec729 r17733: doxygen is way too noisy to build every time, and it doesn't do
dependencies. If someone can fix it to only rebuild when something
changes, then feel free to re-enable it by default. Otherwise use
"make doxygen" if you are in need of a doxygen fix ....
(This used to be commit e9ab8d9f48)
2007-10-10 14:16:33 -05:00
Andrew Tridgell
f1da198449 r17732: after some help from Jelmer, changed builddocs.sh not to rely on
either an internet connection, or a list of xsl paths
(This used to be commit 7f3c699d0f)
2007-10-10 14:16:33 -05:00
Andrew Tridgell
48032446a6 r17731: try to cope with freebsd handling of .a dependencies
(This used to be commit 1ad1d5f37e)
2007-10-10 14:16:33 -05:00
Andrew Tridgell
99309fac5c r17730: cast dlsym result to try to avoid a compiler crash on hpux
(This used to be commit 217cff9f00)
2007-10-10 14:16:33 -05:00
Andrew Tridgell
c09f6050f7 r17729: remove the dependence on an internet connection for building
standalone ldb by only running xsltproc if we can find a local copy of
the required stylesheets
(This used to be commit 16be09e0d6)
2007-10-10 14:16:32 -05:00
Andrew Tridgell
8e36c42846 r17726: not having slapd installed isn't a ldb test failure
(This used to be commit 33ccb93647)
2007-10-10 14:16:32 -05:00
Andrew Tridgell
28e1409720 r17725: VPATH and builds out of the source directory causes problems with the
AIX 5.1 version of make. Putting a direct dependency on $(OBJS) works
around this, and should be harmless on other systems
(This used to be commit 6a7182b599)
2007-10-10 14:16:32 -05:00
Andrew Tridgell
5b9633e40d r17724: don't rely on strnlen() as MacOSX 10.4 doesn't have it. Someday apple
will realise that buffer overflows are bad ....
(This used to be commit 0a6968b71b)
2007-10-10 14:16:32 -05:00
Andrew Tridgell
2fe39a82bf r17722: better to use talloc_vasprintf() than vasprintf() directly, as it
depends on less libc functions
(This used to be commit a05101d83b)
2007-10-10 14:16:32 -05:00
Andrew Tridgell
ba8ed91a75 r17721: fixed the dlopen and MODULESDIR handling in the standalone build
(This used to be commit a40e8c210a)
2007-10-10 14:16:31 -05:00
Andrew Tridgell
10d8142e5d r17720: in standalone ldb build, some systems need sys/stat.h and a defn of
comparison_fn_t
(This used to be commit 99915268e6)
2007-10-10 14:16:31 -05:00
Andrew Tridgell
e7f56e45b2 r17719: ldb_cmdline needs to be static for cc on solaris
(This used to be commit db4d99f35b)
2007-10-10 14:16:31 -05:00
Andrew Tridgell
7c5bb2bce7 r17718: don't consider a slapadd failure in the ldap backend tests as a ldb
failure
(This used to be commit 72cdf93b5a)
2007-10-10 14:16:31 -05:00
Stefan Metzmacher
02515a7613 r17714: fix compiler warnings
metze
(This used to be commit cea06e105a)
2007-10-10 14:16:30 -05:00
Stefan Metzmacher
cc973cbd77 r17711: fix compiler warnings
metze
(This used to be commit f3dc51fef5)
2007-10-10 14:16:29 -05:00
Andrew Tridgell
d8f2434296 r17708: make the automated testing of the ldb ldap backend more portable
(This used to be commit bf88bc5de6)
2007-10-10 14:16:29 -05:00
Andrew Bartlett
b2658f0dd6 r17707: Match the output (aside from dividers) the output of
ol-schema-migrate.pl in the schema output.

Andrew Bartlett
(This used to be commit 8f624fd175)
2007-10-10 14:16:28 -05:00
Andrew Tridgell
b2dd4b3e15 r17706: remove the dependence on gnu make in the standalone build
(This used to be commit 07fa357f3f)
2007-10-10 14:16:28 -05:00
Andrew Tridgell
d5c4606798 r17702: test for gcc, and only enable gcc flags if true
(This used to be commit 6495620d18)
2007-10-10 14:16:27 -05:00
Andrew Tridgell
8c53215884 r17701: doxygen (if installed!) needs to be run in the src directory
(This used to be commit bd1bd1c5ce)
2007-10-10 14:16:27 -05:00
Andrew Bartlett
3d33bc10ed r17700: Despite our best hopes, the way module initialisation tends to happen,
we make searches before things are initialised.  Cope with this.

Andrew Bartlett
(This used to be commit daa1a61891)
2007-10-10 14:16:27 -05:00
Andrew Bartlett
cda3a37d76 r17698: The original code assumed that &data->context was a valid talloc
pointer.

This only works when this is the only structure member, but when I
added a new context pointer, it failed.

Andrew Bartlett
(This used to be commit 5bcfa12cef)
2007-10-10 14:16:27 -05:00
Andrew Tridgell
1d1f100a73 r17697: - enable test for slapd
- include popt.m4
(This used to be commit 55748bb382)
2007-10-10 14:16:26 -05:00
Andrew Tridgell
787dbed6c3 r17696: attempt to allow ldb to use an external popt directory, so we can
point it at the popt sources in the samba source tree when building in
the build farm
(This used to be commit 13e14e0f8d)
2007-10-10 14:16:26 -05:00
Andrew Tridgell
66758e092b r17695: added installcheck target
(This used to be commit 7cca1f83f4)
2007-10-10 14:16:26 -05:00
Andrew Tridgell
70da14f025 r17693: only install man pages if we have managed to generate them with
xsltproc
(This used to be commit 3e48177dd1)
2007-10-10 14:16:26 -05:00
Andrew Tridgell
be99212aec r17692: - don't try and run ldap tests unless we have slapd
- fix manpages install
(This used to be commit 9bc751d1f1)
2007-10-10 14:16:25 -05:00
Andrew Bartlett
3e83b0fac4 r17691: Make the structure more public, so we have somewhere for calling
modules to put private data.

Andrew Bartlett
(This used to be commit ba00f45357)
2007-10-10 14:16:25 -05:00
Andrew Tridgell
c2bc9bdda1 r17689: build works, this should fix install ....
(This used to be commit 9a7c1df956)
2007-10-10 14:16:25 -05:00
Andrew Tridgell
c21e51b19a r17688: the commit/test cycle for getting this to work in the build farm sure
is tedious! nearly there I hope .....
(This used to be commit d0412765ba)
2007-10-10 14:16:25 -05:00
Andrew Tridgell
c4e83e8efc r17687: remove circular dependency
(This used to be commit b12fd256ff)
2007-10-10 14:16:24 -05:00
Andrew Tridgell
35817c01a8 r17679: - fix 'make test-ldap' to skip ldb specials
- allow ldb to be built in a separate build directory, using:

     /some/path/to/ldb/configure
     make

  this will make it much easier to put ldb in the build farm without
  interfering with the build farm builds of tdb and talloc
(This used to be commit 580ed6730d)
2007-10-10 14:16:22 -05:00
Andrew Tridgell
862ba26172 r17678: don't free result message twice
(This used to be commit e390881819)
2007-10-10 14:16:22 -05:00
Simo Sorce
071aa999ab r17614: Our first "client side' ldb module.
This module has been created with the purpose of being used
for searches against ldap servers without the need to handle
the control manually

You can test it by passing -o modules:paged_searches to ldbsearch

The page search size is set to 500 objects.

Simo.
(This used to be commit 07d377f3c2)
2007-10-10 14:16:17 -05:00
Simo Sorce
2b4249e7ba r17613: style fix
(This used to be commit 86fc149ca8)
2007-10-10 14:16:16 -05:00
Andrew Bartlett
2faae939ce r17601: Fix declaration after statement.
Andrew Bartlett
(This used to be commit 05c276568a)
2007-10-10 14:16:16 -05:00
Andrew Bartlett
49b335c756 r17600: Finish the schema conversion tool, and add a mapping file, used to map
OIDs and skip built-in attributes.

Andrew Bartlett
(This used to be commit cb2b9d800d)
2007-10-10 14:16:16 -05:00
Andrew Bartlett
c35420160e r17599: Improvements to the AD-like to OpenLDAP format schema conversion utility.
We now read the objectClasses, and sort them into order, so that
OpenLDAP will load them.  We do this by walking down the 'subClassOf'
chain.  This should also be used in the objectClass module to sort the
objectClass list, and to populate the @SUBCLASS records.

Andrew Bartlett
(This used to be commit 22dec7b62a)
2007-10-10 14:16:16 -05:00
Simo Sorce
f41fc00624 r17596: apply patch from Martin
(This used to be commit e9d101bc3c)
2007-10-10 14:16:15 -05:00
Andrew Bartlett
04b2dfd935 r17582: Fix dependenies for oLschema2ldif.
Andrew Bartlett
(This used to be commit 113ef01320)
2007-10-10 14:15:39 -05:00
Andrew Bartlett
f28774e370 r17581: Add tool to convert AD schema back to OpenLDAP's schema formatting.
Andrew Bartlett
(This used to be commit 391f472df7)
2007-10-10 14:15:39 -05:00
Andrew Bartlett
7de75a991b r17580: Add a new tools to convert back from AD-like schema to OpenLDAP.
Add attribute syntax mapping to the existing OpenLDAP -> AD tool.

Andrew Bartlett
(This used to be commit ba1c652bae)
2007-10-10 14:15:39 -05:00
Andrew Tridgell
9f7da6fea0 r17579: make ldb build g++ friendly
(This used to be commit 403cbd3355)
2007-10-10 14:15:38 -05:00
Andrew Bartlett
c846d461fa r17542: In using ldb_map, I ran across some very odd behaviours when we search
for objectClass=xyz.  The code has been warning at me 'no
covert_operator set', and indeed this is the case.  (It then proceeds to
strip this as a search expression)

In this commit, I have implemented a convert_operator for objectClass,
by pretending it is a simple MAP_CONVERT operator for the search
requests.

I also have changed the logic for when we should bail out.  I can only
see reason to bail out on the search if we have both local and remote
trees.  How can a remote-only search be un-splittable?

Andrew Bartlett
(This used to be commit 656e58672c)
2007-10-10 14:15:35 -05:00
Andrew Bartlett
8f42f1292c r17526: Move timestamp generation into the objectGUID module. It probably
needs to be renamed (operation_add?).

This allows me to match the behaviour and substitute with the
entryUUID module for remote LDAP connections.

Andrew Bartlett
(This used to be commit af02b4d7c6)
2007-10-10 14:15:33 -05:00
Andrew Bartlett
027583e6de r17525: This is a merge from the Google Summer of Code 2006 project by Martin Kühl
<mkhl@samba.org>.

Martin took over the work done last year by Jelmer, in last year's
SoC.  This was a substanital task, as the the ldb modules API changed
significantly during the past year, with the addition of async calls.

This changeset reimplements and enables the ldb_map ldb module and
adapts the example module and test case, both named samba3sam, to the
implementation.

The ldb_map module supports splitting an ldb database into two parts
(called the "local" and "remote" part) and storing the data in one of
them (the remote database) in a different format while the other acts
as a fallback.
This allows ldb to e.g. store to and load data from a remote LDAP
server and present it according to the Samba4 schema while still
allowing the LDAP to present and modify its data separately.

A complex example of this is the samba3sam module (by Jelmer
Vernooij), which maps data between the samba3 and samba4 schemas.

A simpler example is given by the entryUUID module (by Andrew
Bartlett), which handles some of the differences between AD and
OpenLDAP in operational attributes.  It principally maps objectGUID,
to and from entryUUID elements.  This is also an example of a module
that doesn't use the local backend as fallback storage.

This merge also splits the ldb_map.c file into smaller, more
manageable parts.
(This used to be commit af2bece4d3)
2007-10-10 14:15:33 -05:00
Simo Sorce
a23b63a8e5 r17516: Change helper function names to make more clear what they are meant to do
(This used to be commit ad75cf8695)
2007-10-10 14:15:31 -05:00
Simo Sorce
8492a45f8a r17515: Fix warnings
(This used to be commit 5f78645150)
2007-10-10 14:15:31 -05:00
Simo Sorce
faed817506 r17514: Simplify the way to set ldb errors and add another
helper function to set them.
(This used to be commit 260868bae5)
2007-10-10 14:15:31 -05:00
Simo Sorce
71041a5007 r17504: Do not use the invented unixID but use the rfc2307 uidNumber and gidNumber attributes instead
Do not change unixName right now, we don't have an attribute to use in the posixGroup class,
and I think we should remove its usage altogether and look up users and groups by their uid/gid only.

Simo.
(This used to be commit d57b521aad)
2007-10-10 14:15:30 -05:00
Simo Sorce
39018ab902 r17503: Add a useful function to search for a DN
(This used to be commit 8c6efd7b55)
2007-10-10 14:15:30 -05:00
Andrew Bartlett
ecfdd5fc6c r17474: Allow the partitions module to load modules for specific backends.
Andrew Bartlett
(This used to be commit c016db2187)
2007-10-10 14:15:27 -05:00
Andrew Bartlett
11685acd1d r17473: Split loading a list of modules and initialising them into a seperate
function.

Andrew Bartlett
(This used to be commit bed17cc579)
2007-10-10 14:15:27 -05:00
Stefan Metzmacher
c3e837eaaf r17432: display more GUID values nicely,
they all have rangeLower=16 rangeUpper=16
and attribute syntax 2.5.5.10

metze
(This used to be commit 932f8bec21)
2007-10-10 14:15:25 -05:00
Stefan Metzmacher
3a083f8f53 r17430: implement the LDAP_SERVER_PERMISSIVE_MODIFY control in the client
metze
(This used to be commit 96259f0f24)
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
12050962f6 r17429: implement the LDAP_SERVER_SHOW_DELETED control in the client
metze
(This used to be commit 40dc7c1787)
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
8ac0237eba r17420: add client support for the LDAP_SERVER_DOMAIN_SCOPE control
metze
(This used to be commit 84e74a759c)
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
817610f385 r17419: add client support for the LDAP_SERVER_SEARCH_OPTIONS support.
with this you can limit a search to a specific partitions
or a search over all partitions without getting referrals.
(Witch is the default behavior on the Global Catalog Port)

metze
(This used to be commit 4ccd0f8171)
2007-10-10 14:15:24 -05:00
Stefan Metzmacher
b4028ca104 r17418: add client support for the LDAP_SERVER_SD_FLAGS control
metze
(This used to be commit 23759a1e9b)
2007-10-10 14:15:23 -05:00
Stefan Metzmacher
07cb71ba50 r17416: display the attributeSecurityGUID nicely.
this attriute is used to group multiple attribute
to a propertySet for access control.

metze
(This used to be commit 96e9d46091)
2007-10-10 14:15:23 -05:00
Stefan Metzmacher
0f6c285fa8 r17415: the ldif handlers can't do search as this now blocks foerever
because the handlers are called within the async callbacks
in side the main search.

Also it makes no sense to give the sddl encoder the sid of the primary
domain when we need a description of a real security_descriptor,
this only makes sense for the defaultSecurityDescriptor...

metze
(This used to be commit 92f133f1ef)
2007-10-10 14:15:23 -05:00
Simo Sorce
9481764b19 r17398: avoid a memleak when we are returned 0 results and make a more creative use of memory contexts
(This used to be commit fc97b5dc8c)
2007-10-10 14:15:22 -05:00
Andrew Bartlett
bf5e85ba25 r17397: Add const, and use a more local memory context.
Andrew Bartlett
(This used to be commit 59fc8031ec)
2007-10-10 14:15:21 -05:00
Simo Sorce
eb16bc612a r17370: Fix tdb searches, we need to return an LDAP_REPLY_DONE packet when done.
Awesome how this didn't break everything around...
(This used to be commit 1b3b617659)
2007-10-10 14:15:20 -05:00
Andrew Bartlett
f685635e87 r17368: Add 'const' to ldb_match_msg().
Andrew Bartlett
(This used to be commit 54eda4b859)
2007-10-10 14:15:19 -05:00
Simo Sorce
b1b9617d1c r17350: Avoid a couple of memleaks, unnecessary code and use a more linear style
(This used to be commit 97c4d41a30)
2007-10-10 14:15:18 -05:00
Andrew Bartlett
b94b9d8c3d r17349: We can't just return sucess here, modules below us expect the async
reply rules to be followed.

Add code to do a fake async callback on the skipped records.

Andrew Bartlett
(This used to be commit 26bc7dbed9)
2007-10-10 14:15:17 -05:00
Andrew Bartlett
ce20796be2 r17304: Improve ldb_tdb error strings a bit more.
Andrew Bartlett
(This used to be commit 38bd4f6179)
2007-10-10 14:15:09 -05:00
Andrew Bartlett
09b861f45b r17301: Add a new function to copy a list of attributes, while adding one to
the end.

Andrew Bartlett
(This used to be commit 2a87ed1111)
2007-10-10 14:15:08 -05:00
Andrew Bartlett
2d65c9ada5 r17300: Try to fix some segfaults in ldb_ildap module, when the remote server
drops the connection.  The reconnect code needs to be hooked in here.

Andrew Bartlett
(This used to be commit 778debedea)
2007-10-10 14:15:08 -05:00
Andrew Bartlett
e3df3cd55f r17225: Fix the build by fixing the spelling of START-TLS.
Andrew Bartlett
(This used to be commit 4827a6b171)
2007-10-10 14:10:21 -05:00
Simo Sorce
e248caed12 r17195: Start thinking how to implement extended operations.
Ad supports three extended operations:
- start tls
- dynamic objects
- fast binds

none of these are a priority.
(This used to be commit 523e8f3ed4)
2007-10-10 14:10:18 -05:00
Simo Sorce
49f68caed2 r17186: "async" word abuse clean-up part 2
(This used to be commit c6aa60c7e6)
2007-10-10 14:10:17 -05:00
Simo Sorce
c93817b36d r17185: Oh, I wanted to do this for sooo long time.
Finally acknowledge that ldb is inherently async and does not have a dual personality anymore
Rename all ldb_async_XXX functions to ldb_XXX except for ldb_async_result, it is now ldb_reply
to reflect the real function of this structure.

Simo.
(This used to be commit 25fc735404)
2007-10-10 14:10:16 -05:00
Stefan Metzmacher
4611244abd r17113: build tdb and ldb standalone with the same sizes of 'off_t' as from samba
metze
(This used to be commit 5c1e6c08c7)
2007-10-10 14:10:13 -05:00
Stefan Metzmacher
761450c66e r17112: - fix the build of the ldap ldb backend with newer openldap header files.
- use the correct timeout variable (simo you should do a standalone build before commiting:-)

metze
(This used to be commit ac9d69d257)
2007-10-10 14:10:13 -05:00
Andrew Bartlett
624544f065 r17031: When I first revived the objectclass sorting module, simo complained
that it should handle the add without a search.

Now that I'm working on better behaviour with an LDAP backend, I've
fixed the module to do just that.  For an ADD, and a MODIFY with the
REPLACE flag, we do not need the search step.

Andrew Bartlett
(This used to be commit 87573e2ee4)
2007-10-10 14:10:09 -05:00
Andrew Bartlett
32ab518767 r16972: Replace the sequence_number function pointer in ldb with the ldb flags.
The function pointer was meant to be unused, this patch fixes
partition.c to use ldb_sequence_number().  (No backend provided the
pointer any more).

Set the flags onto the ldb structure, so that all backends opened by
the partitions module inherit the flags.

Set the read-ony flag when accessed as the global catalog

Modify the LDAP server to track that this query is for the global
catalog (by incoming port), and set a opqaue pointer.

Next step is to read that opaque pointer in the partitions module.

Andrew Bartlett
(This used to be commit a1161cb30e)
2007-10-10 14:10:04 -05:00
Andrew Bartlett
e071f4abd2 r16965: Take a better stab at comparison functions between string and binary
forms of the objectGUID and objectSID attributes.

Andrew Bartlett
(This used to be commit e7894b49b3)
2007-10-10 14:10:04 -05:00
Andrew Bartlett
e29e30d068 r16937: Add const, to make it clear that it is invalid to talloc_free() the DN
at this point.

Andrew Bartlett
(This used to be commit f7fb168ab6)
2007-10-10 14:10:02 -05:00
Andrew Bartlett
8d62a6ba2c r16936: Correct comment in this comparison function
Andrew Bartlett
(This used to be commit d64987a288)
2007-10-10 14:10:02 -05:00
Andrew Bartlett
2caa112ae4 r16932: Consistanly use the macro for these DNs and attributes.
Andrew Bartlett
(This used to be commit dd6ca33422)
2007-10-10 14:10:01 -05:00
Andrew Bartlett
35fda6c5f3 r16916: Implement metze's proposed changes to the tdb logging API.
This clearly links the log function with its private pointer, and
makes the argument list for tdb_open_ex a bit shorter.

Andrew Bartlett
(This used to be commit 5d5503e8d8)
2007-10-10 14:09:59 -05:00
Andrew Bartlett
977e44c556 r16908: Set an error string if we can't find a backend for an operation.
Andrew Bartlett
(This used to be commit 6a8c9af9ba)
2007-10-10 14:09:58 -05:00
Andrew Bartlett
1f1b34b3e8 r16832: I should be more careful (and test!) when trying to make compilers and
static checkers happy...

Andrew Bartlett
(This used to be commit ae7ec0d553)
2007-10-10 14:09:49 -05:00
Andrew Bartlett
3ed1e8ff3c r16829: Fix a number of issues raised by the IBM checker, or gcc warnings.
In particular, this removes one use of the LDB_DN_NULL_FAILED macro,
which was being used on more than DNs, had an embedded goto, and
confused the IBM checker.

In the password_hash code, ensure that sambaAttr is not, before
checking the number of values.

In GENSEC, note that this switch value can't occour.  This seems to be
the only way to quiet both the IBM checker and gcc, as well as cope
with possibly invalid inputs.

Andrew Bartlet
(This used to be commit 3e58350ec2)
2007-10-10 14:09:48 -05:00
Andrew Bartlett
44e6f21393 r16825: Make ldb_sainity_check() set an error string. This makes it much
easier to chase down what modules or application code gets wrong.

Ensure not to leave memory allocated on failure in ldb_search()

Andrew Bartlett
(This used to be commit 0828739951)
2007-10-10 14:09:47 -05:00
Simo Sorce
a3f606f6ca r16784: - make some function in ldb static, they not need to be exported anywhere
- fix a bad segfault
  Andrew please make test before committing.

Simo.
(This used to be commit b9b6bb3e89)
2007-10-10 14:09:45 -05:00
Andrew Bartlett
d3fee429ae r16774: This patch modifies the tdb API to allow the logging function to be used
as part of ldb.

This allows tdb failures to be passed all the way up to Samba's DEBUG
system, which allowed easier debugging.

Unfortunately I had to extend the tdb API, as the logging function
didn't have a context pointer.

I've worked over the 'debug levels' in TDB.  Most of them were 0,
which didn't seem right, as some were trace-like messages.  We didn't
see any of these previously, except when accessing TDB directly.

Andrew Bartlett
(This used to be commit 58898092c1)
2007-10-10 14:09:45 -05:00
Andrew Bartlett
f77c410084 r16264: Add, but do not yet enable, the partitions module.
This required changes to the rootDSE module, to allow registration of
partitions.  In doing so I renamed the 'register' operation to
'register_control' and 'register_partition', which changed a few more
modules.

Due to the behaviour of certain LDAP servers, we create the baseDN
entry in two parts: Firstly, we allow the admin to export a simple
LDIF file to add to their server.  Then we perform a modify to add the
remaining attributes.

To delete all users in partitions, we must now search and delete all
objects in the partition, rather than a simple search from the root.
Against LDAP, this might not delete all objects, so we allow this to
fail.

In testing, we found that the 'Domain Controllers' container was
misnamed, and should be 'CN=', rather than 'OU='.

To avoid the Templates being found in default searches, they have been
moved to CN=Templates from CN=Templates,${BASEDN}.

Andrew Bartlett
(This used to be commit b49a4fbb57)
2007-10-10 14:09:09 -05:00
Andrew Bartlett
a42365befc r16172: Translate the ldb error codes into appropriate messages for the
transaction cases.

Andrew Bartlett
(This used to be commit 28883f7193)
2007-10-10 14:09:04 -05:00
Gerald Carter
e3a6c6be79 r16100: Patch from Michael Wood <mwood@icts.uct.ac.za>: s/then/than/ for correct grammar
(This used to be commit 26a2fa97e4)
2007-10-10 14:08:59 -05:00
Tim Potter
7d7e43d94f r16090: Fix standalone build after the rename of enum ldb_request_type in
r15944.

Hey idra I think a better rename would be to keep the LDB_REQ suffix
here to remain consistent with the other enums (e.g ldb_reply_type,
ldb_async_wait_type and ldb_async_state).
(This used to be commit d44ee8c43b)
2007-10-10 14:08:58 -05:00
Tim Potter
43e9053d95 r16089: Make doxygen target work if $DOXYGEN variable is empty.
(This used to be commit 8f44d0a2d6)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
d912d6fcef r16087: Fix silly cut-and-paste typo that cost me much of my afternoon...
This only affects my new partitions module, which I will post soon,
but should be fixed anyway.

Andrew Bartlett
(This used to be commit 8912c4e057)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
f4f194aad1 r16086: Ensure we can never dereference NULL pointers, and that describe what
these two DN comparison functions do.

Andrew Bartlett
(This used to be commit 733b64a733)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
6664ac8886 r16085: Set the error string if we fail to find a valid op to execute. Helps
in chasing down bugs :-)

Andrew Bartlett
(This used to be commit 9ede8edbaf)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
c79f37fa1a r16084: Add private prototype for new ldb_connect_backend() function.
Andrew Bartlett
(This used to be commit 6841262230)
2007-10-10 14:08:57 -05:00
Andrew Bartlett
247af0d569 r16083: Make it possible to initialise a backend module, without it setting up
the whole ldb structure.

Because the sequence number was a fn pointer on the main ldb context,
turn it into a full request (currently sync).

Andrew Bartlett
(This used to be commit fbe7d0ca90)
2007-10-10 14:08:57 -05:00
Simo Sorce
2452d41b22 r16071: tdb has nested transactions
change the code to exploit that in ldb

I still have to reintroduce transactions when you call ldb_request directly,
I have some plans I hop to be able to develop in the next weekend
(This used to be commit 3511120602)
2007-10-10 14:08:56 -05:00
Andrew Bartlett
4f619f4874 r16067: Remove const, it isn't required and just causes a warning.
Andrew Bartlett
(This used to be commit 272a095728)
2007-10-10 14:08:56 -05:00
Andrew Bartlett
efddd37af8 r16066: The OSX AD plugin uses objectCategory searches a lot, and uses them
both fully qualified and in the 'short' form.  Now we test and support
this query format.

Andrew Bartlett
(This used to be commit 9ddcfacbce)
2007-10-10 14:08:55 -05:00
Andrew Bartlett
5c3cbdbb13 r16062: objectCategory is a DN, and needs to be matched as such.
Andrew Bartlett
(This used to be commit 1a868b451a)
2007-10-10 14:08:55 -05:00
Andrew Bartlett
66f77c4ebf r16053: Allow entries without an objectClass. We need this to permit the
cn=rootDSE entry.

(it was also crashing, as 'ac' wasn't initialised at this point)

Andrew Bartlett
(This used to be commit 8455aafb15)
2007-10-10 14:08:53 -05:00
Simo Sorce
ca5accf224 r16036: Add a couple of new functions to corretly deal with timeouts.
Check timeouts are correctly verified.
Some minor fixed and removal of unused code.
(This used to be commit b52e5d6a0c)
2007-10-10 14:08:52 -05:00
Andrew Bartlett
b31c685ec2 r16028: Re-add the objectclass module, in the new async scheme.
Add a test to show that we need this, and to prove it works (for add
at least).

Andrew Bartlett
(This used to be commit f72079029a)
2007-10-10 14:08:51 -05:00
Andrew Bartlett
e3482ffeed r16007: If no error string was setup by the backend, ensure that we always get
at least a generic error, even when inside a transaction.

This helps debugging ldb/js interactions a lot...

Andrew Bartlett
(This used to be commit b607acf6f0)
2007-10-10 14:08:49 -05:00
Stefan Metzmacher
c27a242130 r15981: we need to initialize 'ret' before 'goto failed'
metze
(This used to be commit 941f93f93f)
2007-10-10 14:08:46 -05:00
Stefan Metzmacher
bd22992274 r15979: some farmating...
metze
(This used to be commit 53ec76d8d2)
2007-10-10 14:08:46 -05:00
Stefan Metzmacher
3dcbe5702d r15978: - pass the error code back to the caller...
- we were giving OPERATIONS_ERROR in all cases:-(
- we now pass ALREADY_EXIST fine to the caller,
  and the code in libnet_site.c is happy again.
- this bug wasn't noticed for a long time because
  the ldb_ildap code always passed SUCCESS to it's caller

metze
(This used to be commit 7b9d711920)
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
5cc28a0365 r15964: fix error handling in ldb_ildap backend
metze
(This used to be commit 54e5aeff87)
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
a6c4541fdf r15963: fix warnings
metze
(This used to be commit 11b49a4405)
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
8d0d05ddfd r15955: fix whitespaces
metze
(This used to be commit a3d1ce6d3b)
2007-10-10 14:08:44 -05:00
Simo Sorce
17936b09db r15945: Check ltdb_modified results
(This used to be commit bbda863f07)
2007-10-10 14:08:43 -05:00
Simo Sorce
2d19dca9c8 r15944: rename LDB_ASYNC_ADD -> LDB_ADD, LDB_ASYNC_MODIFY -> LDB_MODIFY, etc...
(This used to be commit 55d97ef88f)
2007-10-10 14:08:43 -05:00
Simo Sorce
0c7b82e5f6 r15942: Remove the sync internal ldb calls altogether.
This means that some modules have been disabled as well as they
have not been ported to the async interface

One of them is the ugly objectclass module.
I hope that the change in samldb module will make the MMC happy
without the need of this crappy module, we need proper handling
in a decent schema module.

proxy and ldb_map have also been disabled
ldb_sqlite3 need to be ported as well (currenlty just broken).
(This used to be commit 51083de795)
2007-10-10 14:08:43 -05:00
Simo Sorce
03703a58d7 r15932: Remove per request creds
They have never benn used and make little sense too imo
(This used to be commit f0c1d08d50)
2007-10-10 14:08:41 -05:00
Simo Sorce
3a4d7eb2c0 r15927: Optimize ldb module traverse while keeping the API intact.
I was sick of jumping inot each module for each request,
even the ones not handle by that module.
(This used to be commit 7d65105e88)
2007-10-10 14:08:41 -05:00
Simo Sorce
3308a23850 r15922: password_hash.c has proven to be a good way to research how to build an async module
change asq.c to be more readble
(This used to be commit 9197187c42)
2007-10-10 14:08:40 -05:00
Simo Sorce
90a5e19e03 r15913: Error passing in the async code is not in agood shape
Start enhancing it and fix some problems with incorrect evalutaion of the codes

Implement rdn rename (async only)
(This used to be commit 6af1d738b9)
2007-10-10 14:08:39 -05:00
Andrew Tridgell
971d30bb20 r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617)
2007-10-10 14:08:32 -05:00
Simo Sorce
71152824ef r15847: We probably want to keep the global init
(This used to be commit 35df457fe6)
2007-10-10 14:08:31 -05:00
Simo Sorce
f1655e0298 r15846: An async version of ldbsearch
(This used to be commit 2c1af6556a)
2007-10-10 14:08:31 -05:00
Simo Sorce
8081e4f402 r15795: Try to use the async code by default
It passess all my tests, but I still need to work on a lot of stuff.
Shouldn't impact anybody else work, so I want to commit now and see what happens

Will work to remove the old code from modules and backends soon, and make some
more restyling in ldb internals.

So, if there is something you don't like in this desgin please speak now.

Simo.
(This used to be commit 8b2a563e71)
2007-10-10 14:08:21 -05:00
Simo Sorce
bc12d3bccc r15786: another fix in rdn_name
(This used to be commit 202ce2a947)
2007-10-10 14:08:20 -05:00
Simo Sorce
5e3bb665ca r15762: It make no sense for rdn_name to implement modify, it will need to implement rename ...
(This used to be commit bf260f2a84)
2007-10-10 14:08:15 -05:00
Simo Sorce
6d0969aa1a r15761: Fix-as-you-go ...
Testing various async paths and uncovering bugs
(This used to be commit 099d873ea5)
2007-10-10 14:08:15 -05:00
Jelmer Vernooij
ddb43d8eea r15592: Remove unused header
(This used to be commit 7d3cbfb157)
2007-10-10 14:06:01 -05:00
Simo Sorce
aa7a02d45f r15582: Commit some forgotten stuff that have been setting on my private tree fro long
(This used to be commit 7c050b541e)
2007-10-10 14:06:00 -05:00
Jelmer Vernooij
172a83d724 r15573: Fix build of systems that have iconv headers in non-standard locations
Split of system/locale.h header from system/iconv.h

Previously, iconv wasn't being used on these systems
(This used to be commit aa6d66fda6)
2007-10-10 14:05:58 -05:00
Tim Potter
684aa5adef r15389: Add some better torture tests for LdbMessage.
Fix up behaviour of Ldb.__setitem__() function.  It should overwrite the
element data.

Add wrapper for ldb_msg_sanity_check().
(This used to be commit d67e055f86)
2007-10-10 14:05:31 -05:00
Tim Potter
827cdb949b r15388: Fix cut&paste typo.
(This used to be commit 88e854929f)
2007-10-10 14:05:31 -05:00
Andrew Bartlett
fe93126096 r15372: Don't look at possibly undefined controls in failure cases.
Andrew Bartlett
(This used to be commit 04f383048a)
2007-10-10 14:05:28 -05:00
Jelmer Vernooij
47bf79eac5 r15370: Fix more dependencies for shared libs
(This used to be commit 9a518661fb)
2007-10-10 14:05:27 -05:00
Tim Potter
5abd8940f9 r15348: Start adding a dict interface and tests to LdbMessage class.
(This used to be commit 7e30e8ba57)
2007-10-10 14:05:23 -05:00
Tim Potter
ec4421d126 r15346: Doc.
(This used to be commit ccd5c19ad6)
2007-10-10 14:05:21 -05:00
Tim Potter
b729cc8211 r15343: Some small cleanups.
Remove LdbMessage.close() method as it's not necessary.
(This used to be commit c9ed165c17)
2007-10-10 14:05:21 -05:00
Stefan Metzmacher
ed173c9693 r15315: - reenable the ildap backend
- this fixes the make test panics

jelmer: why have you disabled it in
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15295 ?

metze
(This used to be commit 658fb2b842)
2007-10-10 14:05:11 -05:00
Jelmer Vernooij
b00c236906 r15301: Use static libraries internally. This required a few hacks in the build
system - these should be removed later on.
(This used to be commit 0654739166)
2007-10-10 14:05:07 -05:00
Jelmer Vernooij
ab8fd44603 r15300: Only enable SWIG shared libs if python is available
(This used to be commit d9f1c19f58)
2007-10-10 14:05:04 -05:00
Jelmer Vernooij
620d759f49 r15298: Fix the build using a few hacks in the build system.
Recursive dependencies are now forbidden (the build system
will bail out if there are any).

I've split up auth_sam.c into auth_sam.c and sam.c. Andrew,
please rename sam.c / move its contents to whatever/wherever you think suits
best.
(This used to be commit 6646384aaf)
2007-10-10 14:05:04 -05:00
Jelmer Vernooij
8d137d9785 r15295: Fix some dependencies
Move unistr-specific code to lib/charset/. Remove _m from some places where it's not needed.
(This used to be commit 03224e1124)
2007-10-10 14:05:03 -05:00
Jelmer Vernooij
0d5587b5d1 r15274: Drop default EXT_LIB_ prefix for external libraries. Fixes issues with local
(empty) libpopt.a overriding global one
(This used to be commit 2f06305e53)
2007-10-10 14:05:00 -05:00
Stefan Metzmacher
d562cac5c4 r15246: flags need to represented as bits 0x01,0x02,0x04,0x08,0x10,...
metze
(This used to be commit 96da29263b)
2007-10-10 14:04:24 -05:00
Simo Sorce
8c653b5b54 r15245: forgot one header
(This used to be commit 32da3f5d22)
2007-10-10 14:04:24 -05:00
Simo Sorce
f7312bf373 r15242: allow to use LDB_FLG_RECONNECT
(This used to be commit cdd14c2a27)
2007-10-10 14:04:23 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
Tim Potter
8fe1aa195b r15178: Fix ldb function calls after big swig rename.
Add close() methods to Ldb and LdbMessage classes.

Start adding dict interface to LdbMessage.
(This used to be commit 8be846a3c3)
2007-10-10 14:04:13 -05:00
Tim Potter
5ea77ad66b r15177: Wrap ldb_strerror() function.
(This used to be commit af2b709f94)
2007-10-10 14:04:12 -05:00
Andrew Bartlett
2283810356 r15176: Ensure we don't segfault when we try and delete @FOO records.
Don't try and steal the result of a search on failure, it has already
been talloc_free()'ed by the ildb code.

Andrew Bartlett
(This used to be commit a99bd2e033)
2007-10-10 14:04:12 -05:00
Tim Potter
859817e30f r15113: Add a ldb_strerror() function.
(This used to be commit 456a1de2b9)
2007-10-10 14:04:09 -05:00
Tim Potter
611a058440 r15110: Start rewriting higher level ldb wrapper.
(This used to be commit 80853c7ddd)
2007-10-10 14:04:09 -05:00
Tim Potter
a204089c25 r15109: Wrap ldb_global_init()
(This used to be commit f70ed998a7)
2007-10-10 14:04:09 -05:00
Tim Potter
84c6dea9b7 r15097: Add constants for ldb errors.
Add wrappers for ldb_dn_explode() and ldb_dn_linearize().
(This used to be commit 84774902a1)
2007-10-10 14:04:08 -05:00
Tim Potter
cfbcb93d7c r15096: Fix typo.
(This used to be commit 85de6e32b8)
2007-10-10 14:04:08 -05:00
Tim Potter
3f52210e7b r15095: Fix up typemap for struct ldb_val so that ldb_msg_add_value() wrapper
works properly.
(This used to be commit 75176b188b)
2007-10-10 14:04:08 -05:00
Tim Potter
aa8ced4512 r15092: Remove some swig stuff that didn't work out and the %rename call.
Add wrappers for some of the ldb_msg_* functions.
(This used to be commit ca7c94675e)
2007-10-10 14:04:08 -05:00
Tim Potter
bd41ecdcd0 r15091: Raise LdbError instead of IOError when ldb function calls return an
error.
(This used to be commit e13c6d7c49)
2007-10-10 14:04:08 -05:00
Tim Potter
7dbbc960a0 r15065: Remove duplicate prototype.
(This used to be commit 9d9df34d94)
2007-10-10 14:04:05 -05:00
Tim Potter
96247e8059 r14970: Add configure stuff for Python to tdb and ldb standalone builds.
(This used to be commit 5e14e79489)
2007-10-10 14:00:48 -05:00
Tim Potter
8c23f133c4 r14968: Move tdb and ldb swig wrappers in to lib/tdb and lib/ldb directories.
(This used to be commit fa8d0dc14a)
2007-10-10 14:00:48 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -05:00
Jelmer Vernooij
e90d88106a r14660: Install ldb_errors.h
(This used to be commit 438636c475)
2007-10-10 13:59:06 -05:00
Jelmer Vernooij
07bdbd4592 r14606: Fix paths in developer mode. This allows 'make quicktest' to work when
building with --enable-dso
(This used to be commit 614f062748)
2007-10-10 13:59:00 -05:00
Jelmer Vernooij
e67c24159b r14604: Support 'aliases' for ldb modules
(This used to be commit 73889a327c)
2007-10-10 13:58:59 -05:00
Jelmer Vernooij
dab516d3e7 r14603: Fix building of ejs modules as shared libs
Fix calling of ejs_exception() without requiring --export-dynamic
(This used to be commit 8575e9a490)
2007-10-10 13:58:59 -05:00
Jelmer Vernooij
d64ccc0176 r14599: Pass ACLs down the registry layer.
(This used to be commit 6cdefd8945)
2007-10-10 13:58:59 -05:00
Jelmer Vernooij
508f2f5506 r14594: Fix some dependencies (required for shared library build)
(This used to be commit 06f7a8c692)
2007-10-10 13:58:58 -05:00
Jelmer Vernooij
bb1909e15e r14592: Add support for loading shared modules to LDB.
(This used to be commit f10fae23f0)
2007-10-10 13:58:58 -05:00
Jelmer Vernooij
72a1d08cfe r14590: Fix ldb standalone build...
(This used to be commit 3a6ed4e2df)
2007-10-10 13:58:56 -05:00
Jelmer Vernooij
184955ffd7 r14572: Give libraries saner names, remove some .pc files, make some things
subsystems in case a library doesn't make sense.
(This used to be commit ed382873fd)
2007-10-10 13:58:49 -05:00
Jelmer Vernooij
b785a7c40c r14492: Fix shared libs - set SO_VERSION to 0 everywhere for now.
(This used to be commit 4682bc5ce0)
2007-10-10 13:57:32 -05:00
Jelmer Vernooij
71b4fd9792 r14477: Remove the NOPROTO property - it's no longer used as proto.h is gone.
(This used to be commit 9c37f847d3)
2007-10-10 13:57:30 -05:00
Andrew Tridgell
2e959619c1 r14436: mixing of boolean expressions and integers isn't allowed
(This used to be commit 6f7d09262d)
2007-10-10 13:57:24 -05:00
Andrew Tridgell
90e27768ef r14433: sort_result must be initialised when we call do_result
(This used to be commit a33f6a9832)
2007-10-10 13:57:23 -05:00
Andrew Tridgell
737d05bfb3 r14431: don't call qsort with a null array
(This used to be commit 2c33f577ad)
2007-10-10 13:57:23 -05:00
Andrew Tridgell
24c76df166 r14430: ret can be NULL at the end of this loop
(This used to be commit b607be9cda)
2007-10-10 13:57:22 -05:00
Simo Sorce
2d774763f0 r14391: rdn_name -> async
(This used to be commit 0bc3caa918)
2007-10-10 13:57:18 -05:00
Simo Sorce
611bad9de3 r14364: operational -> async (untested)
(This used to be commit b112eb774f)
2007-10-10 13:57:15 -05:00
Jelmer Vernooij
7a121583b4 r14349: Kill proto.h!
Prototypes are now spread over multiple headers, usually one per subsystem.
This change is required to allow proper header dependencies later on,
without recompiling Samba each time the mtime of any source file changes.
(This used to be commit 3da79bf909)
2007-10-10 13:57:14 -05:00
Simo Sorce
b1bf44a4e1 r14344: More helpful messages on error for command line specified controls
fixes in paged_results
asq -> async
(This used to be commit fbd3475440)
2007-10-10 13:57:13 -05:00
Jelmer Vernooij
e153a8099e r14327: Replace MAJOR_VERSION/MINOR_VERSION/RELEASE_VERSION with two parameters:
- VERSION: should contain the current version. Will be made part of the filename.
 - SO_VERSION: should contain the latest version that this on is compatible to. Will be used for setting the soname of the shared library.

Fix sonames and use them on platforms that support them
Remove symlinking code. ldconfig will take care of creating the symlinks now
that we set the soname.
(This used to be commit 7871b07e21)
2007-10-10 13:57:12 -05:00
Simo Sorce
99dfc7e4d4 r14227: We are passing the wrong pointer here
(This used to be commit 22c1b36355)
2007-10-10 13:57:05 -05:00
Simo Sorce
6e74d83565 r14163: Remove LDB_WAIT_ONCE, we can hardly guarante we
get anything if not waiting for all, keeping this
value may just lead to false expectations.

You either make blocking call waiting for ALL results
transforming this in a sync call, or either you loop
expecting from 0 to all results being returned at any
time on any of these loops.

It should be clear also that when you may receive results
at any time as soon as you call ldb_request.
Your callback may have received all results even before
calling ldb_async_wait the first time.

Simo.
(This used to be commit 6f041068b5)
2007-10-10 13:56:56 -05:00
Simo Sorce
54f26ea2cf r14162: Minor fixes on sort
Initial work on async paged_results
(This used to be commit 72523eae7f)
2007-10-10 13:56:56 -05:00
Simo Sorce
3baf060604 r14161: return early if we know the job is already finished
(This used to be commit 09f6f552d7)
2007-10-10 13:56:56 -05:00
Jelmer Vernooij
c6519ad9c0 r14109: Modulify the smbcalls subsystem.
(This used to be commit d538eac9db)
2007-10-10 13:56:51 -05:00
Jelmer Vernooij
3ccea395aa r14108: Make the Doxyfiles a bit shorter...
(This used to be commit 1004e1521a)
2007-10-10 13:56:51 -05:00