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

1290 Commits

Author SHA1 Message Date
Jelmer Vernooij
2e5f023a69 r25093: Use system-provided ldb library if available. Note that this only means using the ldb library from the system - the custom command-line tools for Samba 4 will still be built even if they are already provided by the system.
(This used to be commit 8aab673df5)
2007-10-10 15:06:27 -05:00
Jelmer Vernooij
08ff1a50f2 r25085: Define LDB_MODULESDIR for standalone build.
(This used to be commit 1ba883c62e)
2007-10-10 15:06:26 -05:00
Jelmer Vernooij
4a4cdc990c r25084: Move samba-specific code out of lib/ldb directory.
(This used to be commit 917bd737cb)
2007-10-10 15:06:26 -05:00
Jelmer Vernooij
ed2a1c718a r25081: Add modules_dir member to ldb_context that is used rather than a global
modulesdir setting. Samba always sets this to lp_modulesdir()/ldb
(This used to be commit e672380d21)
2007-10-10 15:06:25 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643)
2007-10-10 15:05:27 -05:00
Andrew Bartlett
90e83d73f9 r24567: Try much harder not to leak memory when comparing objectCategory entires.
Andrew Bartlett
(This used to be commit 8cfa1f898e)
2007-10-10 15:02:16 -05:00
Andrew Bartlett
e10577585d r24566: Remove trailing newlines in ldb_debug(), these are not required.
Andrew Bartlett
(This used to be commit 2ed782f7ca)
2007-10-10 15:02:16 -05:00
Andrew Bartlett
0eb3ee3204 r24459: Fix up ldap.js and test_ldb.sh to test the domain_scope control, and
to test the behaviour of objectCategory=user searches.

It turns out (thanks to a hint on
http://blog.joeware.net/2005/12/08/147/) that objectCategory=user maps
into objectCategory=CN=Person,... (by the defaultObjectCategory of
that objectclass).

Simplify the entryUUID module by using the fact that we now set the DN
as the canoncical form of objectCategory.

Andrew Bartlett
(This used to be commit b474be9507)
2007-10-10 15:01:53 -05:00
Andrew Bartlett
49c42e2550 r24261: Fix the standalone ldb build after I moved the objectclass module out.
Andrew Bartlett
(This used to be commit c4c3afcdcb)
2007-10-10 15:01:32 -05:00
Andrew Bartlett
10c1480d16 r24259: Rework the objectclass module to use the new schema, rather than the
ldb_subclass list.

Next step will be to have this module also set the objectCategory and
default ntSecurityDescriptor

Andrew Bartlett
(This used to be commit 0f7135a468)
2007-10-10 15:01:31 -05:00
Andrew Bartlett
b7f9e85db1 r23993: Attempt to fix bug #4808, reported by mwallnoefer@yahoo.de. The issue
is that when we all ldb_msg_add_empty(), we might realloc() the
msg->elements array.  We need to ensure the source pointer (when
copying an element from the same msg) is still valid, or the data
copied.

Andrew Bartlett
(This used to be commit 0fbea30577)
2007-10-10 15:01:16 -05:00
Andrew Bartlett
69c0923c5e r23809: Don't give users the fantasy that we can control choice of GENSEC
security mechanisms at the moment.  I'll put this back when I
implement the functionality.

Andrew Bartlett
(This used to be commit 9a38ddc86f)
2007-10-10 14:59:21 -05:00
Andrew Tridgell
cd1217ff5f r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 5c9b19271e)
2007-10-10 14:59:18 -05:00
Andrew Tridgell
b8875bee5f r23800: LGPL is now called GNU Lesser General Public License
not GNU Library General Public License
(This used to be commit 01e3fe7533)
2007-10-10 14:59:17 -05:00
Andrew Tridgell
e1c15c74af r23799: updated old Franklin Street FSF addresses to new URL
(This used to be commit db92b76a00)
2007-10-10 14:59:16 -05:00
Andrew Tridgell
6c973f4e8c r23798: updated old Temple Place FSF addresses to new URL
(This used to be commit 40c0919aaa)
2007-10-10 14:59:15 -05:00
Andrew Tridgell
4b71c210d5 r23796: main COPYING file for samba4, plus some formatting varients
(This used to be commit 76c6bfdeb5)
2007-10-10 14:59:14 -05:00
Andrew Tridgell
b8d69a7ea2 r23795: more v2->v3 conversion
(This used to be commit 84b468b2f8)
2007-10-10 14:59:14 -05:00
Andrew Tridgell
95f930d875 r23794: convert more code from LGPLv2+ to LGPLv3+
(This used to be commit 9d37f1ec07)
2007-10-10 14:59:13 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Bartlett
2d2cde7d95 r23762: Fix DN renames over LDAP, and instrument the partition module. Add a
test to prove the behaviour of LDAP renames etc.

Fix LDB to return correct error code when failing to rename one DN
onto another.

Andrew Bartlett
(This used to be commit 3f3da9c471)
2007-10-10 14:59:11 -05:00
Tim Potter
f6052143ad r23753: Fix bitrot afflicting the ldb Python swig bindings.
(This used to be commit 0141db0fc4)
2007-10-10 14:59:10 -05:00
Andrew Bartlett
b0db52b63a r23737: Validate that we object to duplicate values in an add or replace.
We can't ever allow duplicates, even if the client sends them

Andrew Bartlett
(This used to be commit 10277f2724)
2007-10-10 14:59:09 -05:00
Andrew Bartlett
3a78f7323a r23703: Start to get Samba4 to again work with LDAP backends, after I turned
on metze's schema work.

Andrew Bartlett
(This used to be commit 3111bbdf64)
2007-10-10 14:59:06 -05:00
Andrew Bartlett
e9d19477e4 r23560: - Activate metze's schema modules (from metze's schema-loading-13 patch).
- samba3sam.js: rework the samba3sam test to not use objectCategory,
  as it's has special rules (dnsName a simple match)
- ldap.js: Test the ordering of the objectClass attributes for the baseDN
- schema_init.c: Load the mayContain and mustContain (and system...) attributes when
  reading the schema from ldb
- To make the schema load not suck in terms of performance, write the
  schema into a static global variable
- ldif_handlers.c: Match objectCategory for equality and canonicolisation
  based on the loaded schema, not simple tring manipuation
- ldb_msg.c: don't duplicate attributes when adding attributes to a list
- kludge_acl.c: return allowedAttributesEffective based on schema results
  and privilages

Andrew Bartlett
(This used to be commit dcff83ebe4)
2007-10-10 14:53:27 -05:00
Andrew Bartlett
c30e91863c r23557: Ensure that we don't reorder the objectClass list, if we don't have
any subclasses loaded yet, or none are applicable.

This fixes MMC so that it at least displays the Samba domain as a
domain, but there is still work to be done.

Andrew Bartlett
(This used to be commit b96b7b623d)
2007-10-10 14:53:26 -05:00
Andrew Tridgell
d89e6c774b r23364: add LDB_FLG_NOMMAP flag
(This used to be commit 0c3442c68b)
2007-10-10 14:53:12 -05:00
Stefan Metzmacher
57dd8aeee7 r23339: merge from SAMBA_3_0:
fix a crash bug...I wonder why only HP-UX 11.00 ans 11.11 noticed
it via a SIGBUS...

I missed to remove the samba3 specifc code path to tdb_open_ex()
when I synced lib/tdb/ with samba4. The explicit cast in on tdb_open_ex()
dropped the compiler warning :-(

metze
(This used to be commit df6e3bec36)
2007-10-10 14:53:11 -05:00
Andrew Bartlett
5fb459e4fa r23177: Add in a new provision-backend script. This helps set up the OpenLDAP or Fedora DS backend.
This required a new mkdir() call in ejs.

We can now provision just the schema for ad2oLschema to operate on
(with provision_schema(), without performing the whole provision, just
to wipe it again (adjustments to 'make test' to come soon).

Andrew Bartlett
(This used to be commit 01d54d13dc)
2007-10-10 14:53:00 -05:00
Stefan Metzmacher
fe1d56dd3b r22989: allow '@foo' attributes searchable as we allow '@foo' attributes
in all other places too...

metze
(This used to be commit 4e32aafb9e)
2007-10-10 14:52:36 -05:00
James Peach
66cc0b1e21 r22952: Make sure we look at extra_cflags when building custom targets.
(This used to be commit 2d990cd374)
2007-10-10 14:52:31 -05:00
Stefan Metzmacher
2dacfdf099 r22789: fix loading of internal samba4 modules
metze
(This used to be commit f6740c8b7a)
2007-10-10 14:52:17 -05:00
Jelmer Vernooij
cc26fe9b74 r22762: Some ldb_map changes:
* Change license to LGPL, so it can be used by non-Samba users of
LDB (cleared with Martin as well).

* Include ldb_map in standalone build.

* Move ldb_map to its own directory
(This used to be commit a90202abca)
2007-10-10 14:52:15 -05:00
Jelmer Vernooij
31b47acf52 r22750: dlopen() is always available now (and returns a correct error if not supported by the system), thanks to libreplace.
(This used to be commit 1152a4f56d)
2007-10-10 14:52:09 -05:00
Stefan Metzmacher
56ab0cd77c r22746: fix the build of the sqlite module
metze
(This used to be commit cd958034df)
2007-10-10 14:52:08 -05:00
Stefan Metzmacher
84ea1aa3fc r22723: fix compiler warnings
metze
(This used to be commit d8440f0579)
2007-10-10 14:52:07 -05:00
Stefan Metzmacher
9dba7d7613 r22722: fix dependencies
metze
(This used to be commit 0397eca102)
2007-10-10 14:52:07 -05:00
Simo Sorce
31d28c5b8c r22696: Make sure this is an ascii char
spotted by Volker
(This used to be commit e24812016f)
2007-10-10 14:52:02 -05:00
Volker Lendecke
d6121458b0 r22694: It seems that AIX 5.3 with XLC has difficulties with <ctype.h>. This is
an attempt to work around this: Maybe it helps if we include other stuff
first.

This raises a question however: Do we want the DN handling to be locale
dependent? isalpha() can return different things depending on the
current locale.
(This used to be commit 75ba82dee0)
2007-10-10 14:52:02 -05:00
Jelmer Vernooij
bb71fc3856 r22687: use DESTDIR.
(This used to be commit 0b34da929f)
2007-10-10 14:52:02 -05:00
Jelmer Vernooij
9b03417172 r22684: Fix native Samba build.
(This used to be commit 582e743e68)
2007-10-10 14:52:01 -05:00
Jelmer Vernooij
e0e8fc3db4 r22682: Fix standalone ldb build when parent directory name != ldb.
(This used to be commit 532f28724d)
2007-10-10 14:52:01 -05:00
Jelmer Vernooij
52fb06edc2 r22681: Fix standalone ldb build when parent directory name != ldb.
(This used to be commit 1093875d59)
2007-10-10 14:52:00 -05:00
Jelmer Vernooij
9fc5647043 r22668: Fix ldb build
(This used to be commit 331a0f608f)
2007-10-10 14:51:59 -05:00
Jelmer Vernooij
1477b7a24f r22665: Change version back to 0.9.
(This used to be commit 5037373c4c)
2007-10-10 14:51:59 -05:00
Jelmer Vernooij
f239b809b4 r22642: Allow standalone build to work without tdb or talloc checked out, but
provided by the system.
(This used to be commit bdde740551)
2007-10-10 14:51:57 -05:00
Jelmer Vernooij
42cf31f3c6 r22600: Update bzr ignores, put right version in .pc files, prepare for support of system versions of tdb, talloc.
(This used to be commit 9b991ce9ca)
2007-10-10 14:51:50 -05:00
Jelmer Vernooij
2ea1896591 r22598: Simplify includes for replace.
(This used to be commit e72cec408e)
2007-10-10 14:51:49 -05:00
Jelmer Vernooij
c9cf06b146 r22596: Set _CFLAGS variables rather than putting knowledge in the ldb Makefile.
This should make it easier to allow use of system tdb or talloc libs using
pkg-config.
(This used to be commit a3ec90a263)
2007-10-10 14:51:48 -05:00
Jelmer Vernooij
b0411352a8 r22595: Add version numbers.
(This used to be commit 54cc097e0f)
2007-10-10 14:51:48 -05:00
Andrew Bartlett
6736106581 r22559: Make the ad2OLschema tool case insensitive.
Andrew Bartlett
(This used to be commit ddcca38c65)
2007-10-10 14:51:44 -05:00
Andrew Bartlett
f34c57f4fc r22557: Simo has long bugged me that the paths in the sam.ldb partitions were
not relative to the location of the sam.ldb, but instead
lp_private_dir().

This fixes that issue.

Andrew Bartlett
(This used to be commit c0fd6f6339)
2007-10-10 14:51:43 -05:00
Andrew Bartlett
17078a46b8 r22497: Support renaming objectclasses and attributes for the LDAP backend.
OpenLDAP is fussy about operational attributes in user-supplied
schema.

Andrew Bartlett
(This used to be commit d7cd4b768a)
2007-10-10 14:51:33 -05:00
Andrew Bartlett
47e0c78bac r22476: The OID match is used very oddly in AD, as it is often used for fields
that contain attribute names and objectClasses.  Make it a case
insensitive string for now.

Andrew Bartlett
(This used to be commit 9908a05ef7)
2007-10-10 14:51:31 -05:00
Andrew Bartlett
1222a1c456 r22475: Rather than segfault, show the name of the malformed entry.
Andrew Bartlett
(This used to be commit e1536014a0)
2007-10-10 14:51:30 -05:00
Andrew Bartlett
f72d4bfea1 r22474: If ldb does not return sucess, then the res variable may not be valid.
It *should* just be NULL from the initialisation above, but I've had
this not be the case...

Andrew Bartlett
(This used to be commit a2848dbf1f)
2007-10-10 14:51:30 -05:00
Simo Sorce
9ec83ae25d r22471: Convert more code to use proper LDB error codes.
This is a 1 to 1 convertion, next step is to make this
code report an error if the basedn is not used, hopefully
avoiding an  explicit search on the base object in the most
common cases.
(This used to be commit 50534c84b4)
2007-10-10 14:51:30 -05:00
Stefan Metzmacher
44760c3e6f r22404: more dependencies which should be private
metze
(This used to be commit e0e35965d1)
2007-10-10 14:51:14 -05:00
Stefan Metzmacher
bb36705c8d r22226: move discard_const macros to librelace
metze
(This used to be commit c2cfee6d25)
2007-10-10 14:50:40 -05:00
James Peach
dec40d3463 r22028: Fix include path for the srcidr != builddir case.
(This used to be commit a6141d40b1)
2007-10-10 14:49:42 -05:00
Andrew Bartlett
3370f2f2d7 r21761: - Give more detail on LDAP client library failures (make it clear
where the error is from)

- Make default error string more consistant

Andrew Bartlett
(This used to be commit 7f115579d2)
2007-10-10 14:49:24 -05:00
Andrew Bartlett
f80d21069b r21760: Try to pin down were some errors are coming from. Ensure we at least
name the module.

Andrew Bartlett
(This used to be commit 2e85b1583b)
2007-10-10 14:49:23 -05:00
Andrew Bartlett
847102c6ca r21736: Fix the smbclient test to do something more interesting with the last
few authentication tests.  Now that the tests correctly 'fail', I was
able to fix the credentials subsystem to honour USER and PASSWD.

To get --machine-pass working, I needed ldb to always load it's static
modules, so I put this in ldb_connect().

Andrew Bartlett
(This used to be commit 3430d8c072)
2007-10-10 14:49:20 -05:00
Andrew Bartlett
e2aa39b024 r21553: Remove bogus comment.
(This used to be commit 7c5529729b)
2007-10-10 14:48:55 -05:00
Andrew Bartlett
7dc7156bd7 r21496: A number of ldb control and LDAP changes, surrounding the
'phantom_root' flag in the search_options control

- Add in support for LDB controls to the js layer
- Test the behaviour
- Implement support for the 'phantom_root' flag in the partitions module
- Make the LDAP server set the 'phantom_root' flag in the search_options control
  - This replaces the global_catalog flag passed down as an opaque pointer
- Rework the string-format control parsing function into
  ldb_parse_control_strings(), returning errors by ldb_errorstring()
  method, rather than with printf to stderr
- Rework some of the ldb_control handling logic

Andrew Bartlett
(This used to be commit 2b3df7f38d)
2007-10-10 14:48:44 -05:00
Stefan Metzmacher
b92c5d454e r21354: fix comment
metze
(This used to be commit 545f769c2f)
2007-10-10 14:48:18 -05:00
Stefan Metzmacher
f14c66ca30 r21311: fix very ugly "using free'ed memory" bug
This was there since 2005...

metze
(This used to be commit 393e4eeb82)
2007-10-10 14:48:08 -05:00
Andrew Bartlett
20df8d8305 r21305: Change the skel module a little, so make it names clearer.
Andrew Bartlett
(This used to be commit 26758fc24c)
2007-10-10 14:48:07 -05:00
Stefan Metzmacher
97666f12a4 r20969: remove unused function, found my lcov
metze
(This used to be commit 0c5eb19ebc)
2007-10-10 14:44:05 -05:00
Stefan Metzmacher
784f11bd85 r20952: when a component is changed we need to rebuild the linearized string
metze
(This used to be commit beb816fb78)
2007-10-10 14:43:59 -05:00
Stefan Metzmacher
545f97f94e r20865: remove useless warning, we now always pass the current partition
control as non critical control

metze
(This used to be commit 21fddb643b)
2007-10-10 14:43:41 -05:00
Stefan Metzmacher
fb9dabe39e r20852: add a function to add a ldb control to a ldb_request
metze
(This used to be commit f0bf86ed66)
2007-10-10 14:43:40 -05:00
Stefan Metzmacher
7057be5ec1 r20772: fix segfault caused by ldb_set_default_dns() from init_context hook of the root dse module
metze
(This used to be commit a201d3fc4d)
2007-10-10 14:40:51 -05:00
Stefan Metzmacher
0c29f6d56d r20761: let ldb modules call ldb_set_default_dns()
metze
(This used to be commit 224a31cdbf)
2007-10-10 14:40:47 -05:00
Stefan Metzmacher
7dd80e872d r20731: we need the complex memmove() handling for removing an attribute only in one place
metze
(This used to be commit dfdfdd6cef)
2007-10-10 14:40:33 -05:00
Stefan Metzmacher
930fca1c97 r20684: if we don't have any indexes, then we should not waste time
to traverse the whole tdb and unpack each record

metze
(This used to be commit 492c79de13)
2007-10-10 14:40:22 -05:00
Simo Sorce
d38a7a39fa r20670: Make the logic more clear
(This used to be commit 906630f18e)
2007-10-10 14:40:19 -05:00
Simo Sorce
f400fc4d0d r20669: Simplifing more
(This used to be commit 03de577059)
2007-10-10 14:40:19 -05:00
Simo Sorce
a1a5d12c13 r20656: This way the process flow should be much more readable.
We need to make it easier, but this should be a step in
the right direction.
(This used to be commit ad58177ee4)
2007-10-10 14:37:27 -05:00
Stefan Metzmacher
22f473b22b r20598: add comments and make clear that the void *data element for extended operations
needs to be NULL or a valid talloc pointer as talloc_get_type() will be called on it.

metze
(This used to be commit 5731617ea9)
2007-10-10 14:37:12 -05:00
Stefan Metzmacher
b931e66835 r20596: add prototypes for the ldb_extended functions
metze
(This used to be commit 8d3a3117c3)
2007-10-10 14:37:12 -05:00
Stefan Metzmacher
23edd6071a r20588: handle extended operations in the ldb_next_request() call
metze
(This used to be commit b98ca57a65)
2007-10-10 14:37:09 -05:00
Stefan Metzmacher
b5eb73280e r20583: implement the frontend calls for extended operations
metze
(This used to be commit cfcd05adc0)
2007-10-10 14:37:08 -05:00
Stefan Metzmacher
bc4821a4ce r20582: use void *data in the ldb_extended struct to match what we have in ldb_control
add a request element for extended requests

metze
(This used to be commit 530b3cd250)
2007-10-10 14:37:07 -05:00
Stefan Metzmacher
f29ea516f9 r20581: - the ldb modules have explicit hooks for extended operations
so call them
- reorder the request operations first all with explixit hooks

metze
(This used to be commit aababcbb05)
2007-10-10 14:37:07 -05:00
Andrew Bartlett
3a6da3c60f r20467: Don't segfault if we don't have an OID map
(This used to be commit c0276c373c)
2007-10-10 14:35:53 -05:00
Andrew Bartlett
b4c1e62259 r20464: Make it clear what does the process group stuff
(This used to be commit 27750e0b5f)
2007-10-10 14:35:53 -05:00
Stefan Metzmacher
71bc79caab r20462: add functions to handle UTCTime strings
metze
(This used to be commit 49c7da812c)
2007-10-10 14:35:52 -05:00
Andrew Bartlett
0311a5396b r20459: LDB map cleanup:
- Replace 'return 0' with return LDB_SUCCESS in more places.

- Do not return NULL attribute values, these are not permitted.
  Instead, fail the whole conversion.

- Cleanup old comments.

Andrew Bartlett
(This used to be commit f28cf842da)
2007-10-10 14:35:51 -05:00
Andrew Bartlett
c8fd1a6f2e r20373: When adding a base to a "" DN, don't precede it with a comma (,)
Andrew Bartlett
(This used to be commit ef1ca30180)
2007-10-10 14:30:18 -05:00
Stefan Metzmacher
6f68945f7d r20320: add missing prototypes
metze
(This used to be commit b9d0ea3954)
2007-10-10 14:29:39 -05:00
Stefan Metzmacher
c65b5a6f87 r20319: fix compiler warnings
metze
(This used to be commit 3769270a6a)
2007-10-10 14:29:39 -05:00
Stefan Metzmacher
ff322519af r20317: store references to all important naming contexts.
add ldb_get_config_basedn(), ldb_get_schema_basedn()
and ldb_get_root_basedn()

metze
(This used to be commit e28cb83904)
2007-10-10 14:29:38 -05:00
Stefan Metzmacher
525447821e r20316: fix compiler warning
metze
(This used to be commit 58cbbaa4b4)
2007-10-10 14:29:38 -05:00
Andrew Tridgell
13b7d54535 r20234: metze pointed out that we are re-loading the cache records on each
write. We should only be doing this if another process writes and
changes the seqnum. This avoids the extra cache loads
(This used to be commit 65858ebb68)
2007-10-10 14:29:27 -05:00
Stefan Metzmacher
0e2ebecf18 r20198: let the IBM checker ignore the warning about a missing break
statement...

metze
(This used to be commit 6b20123c10)
2007-10-10 14:29:22 -05:00
Stefan Metzmacher
f0eaae956f r20192: I assume a 'break' is the correct thing to do here,
simo,tridge: please check this.

found by the IBM checker

metze
(This used to be commit 5ac373c8b8)
2007-10-10 14:29:21 -05:00
Stefan Metzmacher
c8c023ea62 r20191: fix bug found by the IBM checker
metze
(This used to be commit 4c1e4bfeef)
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
f4fa06ca00 r20190: fix the ldb_ldap backend
metze
(This used to be commit 6b7eb5d68e)
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
a3c0f3035d r20189: remove unused struct element
metze
(This used to be commit d20d1872d5)
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
8e7d87babc r20188: move back to an default attribute handler and not use the '*' attribute
to not conflict with the one that maybe added via the @ATTRIBUTES object

this is just to make the test-tdb-feature.sh torture test happy

There's still a bug when a attribute is registered multiple time
without removing old ldb_schema_attribute instances. But this bug
was there before my changes too and was just triggered by my changes

metze
(This used to be commit 70c4a36743)
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
bc58f6fa36 r20187: fix the build on systems without sqlite3
metze
(This used to be commit 216713d9a0)
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
538e3bf654 r20185: - SMB_ENABLE() needs upper case YES/NO
- fix compilation of the ldb_sqlite3 module

metze
(This used to be commit 39c41be0ac)
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
c69717755a r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct.

the default attribute handler is now registered dynamicly as "*"
attribute, instead of having its own code path.

ldb_schema_attribute's can be added to the ldb_schema given a
ldb_schema_syntax struct or the syntax name

we may also need to introduce a ldb_schema_matching_rule,
and add a pointer to a default ldb_schema_matching_rule
in the ldb_schema_syntax.

metze
(This used to be commit b97b8f5dcb)
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
e55ff42229 r20168: start separating attributes and syntaxes
metze
(This used to be commit 8dda4342f6)
2007-10-10 14:29:17 -05:00
Stefan Metzmacher
4e93962ea5 r20130: remove one more talloc_get_type()
metze
(This used to be commit 024dacb3b0)
2007-10-10 14:29:12 -05:00
Stefan Metzmacher
1a82770112 r20129: remove unused structure elements
metze
(This used to be commit 53805a8562)
2007-10-10 14:29:12 -05:00
Stefan Metzmacher
8cdacd9f82 r20128: get rid of more talloc_get_type() calls
metze
(This used to be commit cb89f0b8d5)
2007-10-10 14:29:11 -05:00
Stefan Metzmacher
ecc8ef51cb r20127: - allocate ldb_handle under ldb_request! fix a mem leak
- pass ldb_request to init_lldb_handle()
- remove some useless talloc_get_type() calls

metze
(This used to be commit a7397c4d2b)
2007-10-10 14:29:11 -05:00
Stefan Metzmacher
43637dfb9d r20126: fix talloc hierachy and make lldb a child of module
metze
(This used to be commit 1e3bb18026)
2007-10-10 14:29:11 -05:00
Stefan Metzmacher
2986313a68 r20125: fix some ugly mem leaks in the ldb_ildb backend
metze
(This used to be commit db85b7840c)
2007-10-10 14:29:10 -05:00
Stefan Metzmacher
21327c4320 r20123: - avoid some more talloc_get_type() calls
- pass down ldb_request

metze
(This used to be commit b0b9e83fed)
2007-10-10 14:29:10 -05:00
Stefan Metzmacher
a2976633ff r20122: pass ildb to ildb_request_noop()
metze
(This used to be commit cf9aade216)
2007-10-10 14:29:10 -05:00
Stefan Metzmacher
e13088f2b7 r20121: pass down the ldb_request struct to ildb_request_send(),
also pass ildb instead of module, to avoid multiple talloc_get_type() calls

metze
(This used to be commit 03029d4fed)
2007-10-10 14:29:10 -05:00
Stefan Metzmacher
ddfb73568a r20120: fix the talloc hierachy and make ildb a child of module
metze
(This used to be commit b85d5cb7a4)
2007-10-10 14:29:09 -05:00
Simo Sorce
2cd08c14a0 r20106: Optional ONE Level indexing for ldb_tdb
To activate it you must modify the @INDEXLIST object adding
the attribute @IDXONE: 1

Ldb test included

Simo.
(This used to be commit ea111795f4)
2007-10-10 14:29:07 -05:00
Simo Sorce
784fd1a230 r20101: Also rename a variable now that the unused parameter is gone
(This used to be commit a2520bcfa9)
2007-10-10 14:29:06 -05:00
Simo Sorce
5dd224f260 r20100: Remove completely unused parameters
(This used to be commit cc1bcb8148)
2007-10-10 14:29:05 -05:00
Volker Lendecke
dec69975f5 r20046: Add ldb_search_exp_fmt and port comment to 4
(This used to be commit 879dfed8d8)
2007-10-10 14:28:54 -05:00
Simo Sorce
ea212eb00f r20034: Start using ldb_search_exp_fmt()
(This used to be commit 4f07542143)
2007-10-10 14:28:51 -05:00
Simo Sorce
07b7d84f06 r20033: Never commit before testing
Never commit before testing
Never commit before testing

:-)
(This used to be commit fdd6ce6b7e)
2007-10-10 14:28:51 -05:00
Simo Sorce
5e583a96d4 r20032: Add ldb_search_exp_fmt()
This functions adds support of a memory context to hook the results to
and a printf style exp_fmt partameter to easily build expressions at once.
(This used to be commit 2a2e181e4b)
2007-10-10 14:28:50 -05:00
Stefan Metzmacher
2f1fa42fe8 r20023: handle <SID=...> <WKGUID=...> dn's also in ldb_dn_new_fmt()
metze
(This used to be commit 01e3a5080a)
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
875a920ac2 r19966: we don't need 2 versions of this functions
metze
(This used to be commit 98ab0af4ae)
2007-10-10 14:28:41 -05:00
Stefan Metzmacher
aee9e6c7cd r19965: make the output a bit nicer
metze
(This used to be commit 8655db41c1)
2007-10-10 14:28:41 -05:00
Stefan Metzmacher
6045b6f314 r19964: make debuging easier and report usefull error messages
metze
(This used to be commit f129d78256)
2007-10-10 14:28:40 -05:00
Stefan Metzmacher
8534186530 r19954: allow more special dn's:
this works now against w2k3:

bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<GUID=44087590-dd95-435c-adc1-ec20a50807be>" -s base
bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<SID=S-1-5-21-769185814-1958994947-1641909093-513>" -s base
bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<WKGUID=AB8153B7768811D1ADED00C04FD8D5CD,DC=w2k3,dc=vmnet1,dc=vm,dc=base>" -s base

and we should try to implement this in the server too...

metze
(This used to be commit 3c087c8970)
2007-10-10 14:28:40 -05:00
Simo Sorce
2ee7e831f2 r19911: talloc_apsrintf is not really required here
its faster this way (another 2-4%s)
(This used to be commit 8bbbfa3467)
2007-10-10 14:28:36 -05:00
Simo Sorce
921a596cd4 r19910: Make better use of our set of talloc utility functions
(This used to be commit b1197dbeeb)
2007-10-10 14:28:35 -05:00
Simo Sorce
8ec78bcbbf r19909: Make this one double as fast
(This used to be commit 67b88e49b8)
2007-10-10 14:28:35 -05:00
Simo Sorce
096aa31e94 r19907: this function is used a lot
use a binary search to get the right handler
(This used to be commit 789e1088c9)
2007-10-10 14:28:35 -05:00
Simo Sorce
4f8b4a8ef1 r19906: ldb_attr_cmp is used a lot
remove unneded overhead of a function call
(This used to be commit 3ca2586762)
2007-10-10 14:28:34 -05:00
Simo Sorce
baa8ed2015 r19905: use ldb_dn_new_fmt() to avoid double strdups
(This used to be commit 32a6b6c75b)
2007-10-10 14:28:34 -05:00
Simo Sorce
5bbe9101cf r19904: port fies from samba3
(This used to be commit 49d1559d36)
2007-10-10 14:28:34 -05:00
Volker Lendecke
eee64196a3 r19901: Fix a potential NULL dereference
(This used to be commit 75e6fb9654)
2007-10-10 14:28:33 -05:00
Volker Lendecke
a98d02c2f4 r19897: Fix klokwork ids 2278 and 2279
(This used to be commit 44e6d39e0e)
2007-10-10 14:28:33 -05:00
Simo Sorce
c05c41d352 r19888: make it possible to use default attrib handlers from extensions
list more DN attributes as part of samba attribute handlers
(nCName moved here)
(This used to be commit 627ed8b516)
2007-10-10 14:28:32 -05:00
Simo Sorce
5b258c3b9d r19887: return "" string only if the dn is a valid one
(This used to be commit 056f90798f)
2007-10-10 14:28:32 -05:00
Simo Sorce
ac6fec2f86 r19886: ncName is specific to samba, not the generic ldb engine
(This used to be commit 505afb18fb)
2007-10-10 14:28:32 -05:00
Stefan Metzmacher
6d074bcd4b r19885: special dn's were not casefolded before rev 19831,
act like this again...

also when we already have a casefoled value we should not call ldb_dn_casefold_internal()

metze
(This used to be commit cbf4eb1672)
2007-10-10 14:28:32 -05:00
Stefan Metzmacher
2ad51046e3 r19884: rename ldb_dn_key -> ltdb_index_key to make more clear what it's for...
metze
(This used to be commit 6b76a7be4a)
2007-10-10 14:28:31 -05:00
Simo Sorce
f4e6be00ac r19871: simplify more
(This used to be commit e9ddb18c83)
2007-10-10 14:28:29 -05:00
Simo Sorce
5ab439893b r19870: Simplify code
(This used to be commit c1737f9a52)
2007-10-10 14:28:28 -05:00
Simo Sorce
353b968025 r19869: fix memleaks
(This used to be commit 3a662a2d98)
2007-10-10 14:28:28 -05:00
Jelmer Vernooij
60e7b4d995 r19863: Create -uninstalled.pc files. This should reenable compilation and running
of the pidl testsuite as part of the testsuite.
(This used to be commit db237ad52f)
2007-10-10 14:28:27 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5)
2007-10-10 14:28:22 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3)
2007-10-10 14:28:22 -05:00
Stefan Metzmacher
a7127ad79e r19743: merge from samba3:
remove old unused schema module

metze
(This used to be commit 3c16951b0d)
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
982f7f9b44 r19742: fix compiler warnings
metze
(This used to be commit 4edeef56dc)
2007-10-10 14:28:18 -05:00
Stefan Metzmacher
ab7411714b r19740: fix compiler warning
metze
(This used to be commit 666e674504)
2007-10-10 14:28:17 -05:00
Andrew Bartlett
e4955030bc r19733: More work to fix ldb_map. With the wildcard present,
map_attr_find_local() always returns, which is exactly what we don't
want.  Instead, rely on the overwrite behaviour.

Andrew Bartlett
(This used to be commit 9b9b7bae16)
2007-10-10 14:28:16 -05:00
Andrew Bartlett
adae413042 r19731: Modify the ldb_map infrustructure to always map from requested
attributes to backend (remote) attributes.

We can't do a reverse mapping safely where the remote attribute may be
a source for multiple local attributes.  (We end up with the wrong
attributes returned).

In doing this, I've modified the samba3sam.js test to be more
realistic, and fixed some failures in the handling of primaryGroupID.

I've added a new (private) helper function ldb_msg_remove_element() to
avoid a double lookup of the element name.

I've also re-formatted many of the function headers, to fit into
standard editor widths.

Andrew Bartlett
(This used to be commit 186766e309)
2007-10-10 14:28:15 -05:00
Stefan Metzmacher
c046f2e7a3 r19720: - don't pass a pointer reference to ldb_search_default_callback()
as it's ugly when it free's the callers memory on failure!

- only steal the controls on a LDB_REPLY_EXTENDED, LDB_REPLY_DONE
  and ignore them on LDB_REPLY_ENTRY, LDB_REPLY_REFERRAL as we currently
  have not way to return them in a ldb_result (we should fix this!)

metze
(This used to be commit 47da62b15a)
2007-10-10 14:28:13 -05:00
Stefan Metzmacher
a39db63030 r19719: don't use 'new' as var name samba3 doesn't like it...
metze
(This used to be commit 7a4f46c1c9)
2007-10-10 14:28:13 -05:00
Stefan Metzmacher
38272577f1 r19714: - add an explicit default target (needs to be the first target in the Makefile)
- let 'make nss' work alone

metze
(This used to be commit 5685b6c8a2)
2007-10-10 14:28:12 -05:00
Andrew Bartlett
9d39abf947 r19683: Guard GUID_from_string from walking off the end.
Andrew Bartlett
(This used to be commit 1c3e9b27a7)
2007-10-10 14:25:31 -05:00
Jelmer Vernooij
c81f2930a2 r19676: Fix some more dependencies.
(This used to be commit 8768bec81f)
2007-10-10 14:25:29 -05:00
Jelmer Vernooij
dbe5084f8e r19636: Add URLs to ldb and talloc pkg-config files.
Always build and install .pc files as they make sense for static libs
as well.
(This used to be commit 82cb91e2dd)
2007-10-10 14:25:22 -05:00
Andrew Bartlett
13dbee3ffe r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
(This used to be commit 2b569c42e0)
2007-10-10 14:25:00 -05:00
James Peach
7218b3b878 r19578: Fix trivial typ0.
(This used to be commit 664b4a84b6)
2007-10-10 14:24:55 -05:00
Jelmer Vernooij
8f89522a3f r19570: Fix dependencies in pkg-config files.
(This used to be commit 1b04669852)
2007-10-10 14:24:54 -05:00
Simo Sorce
9ec6f0a3a1 r19532: oops forgot this
(This used to be commit 9af225e319)
2007-10-10 14:24:45 -05:00
Simo Sorce
b7774527fa r19531: Make struct ldb_dn opaque and local to ldb_dn.c
(This used to be commit 889fb983ba)
2007-10-10 14:24:44 -05:00
Andrew Bartlett
74adb98b65 r19521: Fix memory leak.
Andrew Bartlett
(This used to be commit cf1b0cc19f)
2007-10-10 14:24:44 -05:00
Andrew Bartlett
abe0c30aba r19520: Try not to read past the end of the ldb buffer.
Andrew Bartlett
(This used to be commit 3a103149a6)
2007-10-10 14:24:43 -05:00
Jelmer Vernooij
4fa24df98d r19507: Merge my DSO fixes branch. Building Samba's libraries as shared libraries
works again now, by specifying --enable-dso to configure.
(This used to be commit 7a01235067)
2007-10-10 14:24:41 -05:00
Simo Sorce
cc22f65d7b r19490: better to check the return result
(This used to be commit abdc4edbb8)
2007-10-10 14:24:38 -05:00
Simo Sorce
7f833458ca r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth argument.
This is a pointer to an element pointer. If it is not null it will be
filled with the pointer of the manipulated element.
Will avoid double searches on the elements list in some cases.
(This used to be commit 0fa5d4bc22)
2007-10-10 14:24:38 -05:00
Volker Lendecke
3cee746a3f r19485: Fix Coverity # 319
(This used to be commit d12bdb6133)
2007-10-10 14:24:37 -05:00
Simo Sorce
a326893159 r19461: Make sqlite3 work again (semi-async)
Still not all tests pass
(This used to be commit cbfc7305ad)
2007-10-10 14:21:36 -05:00
Simo Sorce
766193da3f r19460: currently building when there is an existing previous build in place is broken
(This used to be commit 59ac5cf96b)
2007-10-10 14:21:36 -05:00
Simo Sorce
8e82a76105 r19459: Do not build nss by default (it probably works only on linux)
Fix warning with standalone.sh if build exists
(This used to be commit d74fac5740)
2007-10-10 14:21:35 -05:00
Simo Sorce
566c7481d9 r19458: Some info on the "schema"
(This used to be commit 724d8fb153)
2007-10-10 14:21:35 -05:00
Simo Sorce
d29c54385a r19457: committed by mistake, this binary is available from here anyway:
http://www.samba.org/ftp/unpacked/junkcode/nsstest.c
(This used to be commit 48e38abe71)
2007-10-10 14:21:35 -05:00
Simo Sorce
803a6dbaca r19456: Add an example application for ldb using the tdb backend
(This used to be commit 778198f279)
2007-10-10 14:21:35 -05:00
Simo Sorce
002338283f r19455: forgot this
(This used to be commit 2b770885cd)
2007-10-10 14:21:34 -05:00
Simo Sorce
92ec8e5c1e r19454: In standalone build init asq too
(This used to be commit e58b03cd66)
2007-10-10 14:21:34 -05:00
Simo Sorce
21e63dca9b r19453: Expose helper functions
(This used to be commit ee86e88e4f)
2007-10-10 14:21:34 -05:00
Simo Sorce
5203031007 r19452: Warn but don't die if registering against the rootdse is not possible
(This used to be commit 4ad2eba2aa)
2007-10-10 14:21:33 -05:00
Andrew Tridgell
4b9eee02c4 r19402: - use the new tdb_lockall_read() to make ldb_search() more efficient,
by avoiding chain locks on each tdb_fetch() within the search

- use the tdb_get_seqnum() call to avoid re-reading the @BASEINFO
  record when it hasn't changed.

These speed up the LOCAL-DBSPEED test for ldb from 7k ops/sec to a bit
over 11k ops/sec
(This used to be commit 1347ad254e)
2007-10-10 14:21:26 -05:00
Simo Sorce
946225b683 r19375: very basic helper script to build ldb standalone
(This used to be commit b4c8bf7398)
2007-10-10 14:21:19 -05:00
Simo Sorce
8c015370d2 r19370: Handle errors if talloc_reference fails
(This used to be commit 05134a90e3)
2007-10-10 14:21:18 -05:00
Andrew Tridgell
0cf42c464e r19365: fixed a memory leak in the ldb attribute handling
(This used to be commit d7e0768516)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
1865044d5c r19363: - don't need to store the baseinfo message after cache load
(This used to be commit 8c091bcdec)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
e36ea2e8eb r19362: - don't need to store the baseinfo message after cache load
- set better names on talloc structures in ldb modules, making leaks
  easier to track down
(This used to be commit 3bf76db42d)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
5535b43efd r19361: added a comment
(This used to be commit 1581babfb5)
2007-10-10 14:21:16 -05:00
Simo Sorce
0f2347e417 r19338: leak on error
(This used to be commit 326389afed)
2007-10-10 14:21:12 -05:00
Simo Sorce
549dd10f0f r19332: ldb_parse_tree leaks
(This used to be commit 3e0e2787c1)
2007-10-10 14:21:11 -05:00
Andrew Tridgell
64eed1e78e r19327: fixed a leak in ldif_canonicalise_objectCategory()
(This used to be commit 5cc92d915b)
2007-10-10 14:21:10 -05:00
Andrew Tridgell
91c33d44b6 r19324: fixed a leak on deleting records when no index is in place
(This used to be commit 0824b3b8c1)
2007-10-10 14:21:09 -05:00
Andrew Tridgell
888458d434 r19323: fixed a leak in the ldif parse code
(This used to be commit 06387e1cf2)
2007-10-10 14:21:08 -05:00
Andrew Tridgell
7f00bee3dc r19322: fix a minor memory leak in the ltdb cache code
(This used to be commit e03ed5822a)
2007-10-10 14:21:08 -05:00
Simo Sorce
1b8e6fa6e9 r19314: Commit tridge's fixes for a big mem leak in ltdb I introduced
when the code has been changed to be async.
With the other committed fixes now this works.
(This used to be commit 49fc640b5c)
2007-10-10 14:21:07 -05:00
Simo Sorce
508a04fe57 r19312: This should fix a nasty bug with values and names being freed before the results where used.
Seem that el is hanging out of a request, and the target is put on the final results.

Still one to catch and fix, but this seem to cure most of them
(This used to be commit bfeaa08fde)
2007-10-10 14:21:07 -05:00
Andrew Bartlett
e0294c9f66 r19310: Add another conflicting oid
Cope with there being no attributes to skip in the ad2oLscheam tool

Andrew Bartlett
(This used to be commit 942d7ad0c3)
2007-10-10 14:21:06 -05:00
Simo Sorce
3cabd0dcae r19305: Potential memleak on the ldb_context if we don't use a temp mem context
(This used to be commit c989dfbe18)
2007-10-10 14:21:05 -05:00
Simo Sorce
59b66744f7 r19299: Fix possible memleaks
(This used to be commit 6fad80bb09)
2007-10-10 14:21:04 -05:00
Andrew Tridgell
d0ba572fab r19289: fixed a memory leak in ldb_dn_string_compose()
(This used to be commit 669aa1424c)
2007-10-10 14:21:02 -05:00
Andrew Tridgell
04140ac3c7 r19274: fix ldbdel and ldbmodify to return an error if the underlying ldb call
fails
(This used to be commit 330a722f13)
2007-10-10 14:21:00 -05:00
Andrew Tridgell
2ad8e1443d r19273: - fixed error handling with the ldap backend
- propogate errors to the ldbadd command line tool

- use the rdn_name module when testing the tdb backend to allow the
  same test code to correctly test the ldap and non-ldap backends
(This used to be commit dd82c474a1)
2007-10-10 14:21:00 -05:00
Andrew Bartlett
fa67b43ae8 r19264: Clarify behaviour in ldb_search_callback() and provide more
information when modules fail to load.

Andrew Bartlett
(This used to be commit 512ef62f4a)
2007-10-10 14:20:59 -05:00
Stefan Metzmacher
bbc056e067 r19196: merge from samba3:
pass always a mem_ctx to functions and a ldb_context where needed

metze
(This used to be commit 67a6a41ba3)
2007-10-10 14:20:52 -05:00
Stefan Metzmacher
c403dd11fb r19188: merge from samba3:
fix compiler warnings

metze
(This used to be commit dc139d8715)
2007-10-10 14:20:51 -05:00
Stefan Metzmacher
47f90dde40 r19146: merge from samba3:
talloc_reference() can fail

metze
(This used to be commit 542cd5d029)
2007-10-10 14:20:43 -05:00
Volker Lendecke
109bf77ea3 r19134: Merge the second set of C++ warning fixes from Samba3. I'll leave r19132 to
metze to merge until the questions have been answered.

Volker
(This used to be commit e946717bf6)
2007-10-10 14:20:38 -05:00
Simo Sorce
f7005d48d2 r19129: Add comment to clarify behavior
(This used to be commit 7180f38e9e)
2007-10-10 14:20:37 -05:00
Stefan Metzmacher
d544f8a6de r19123: - pass LDFLAGS from configure to Makefile
which should fix the build on Tru64 in the build farm.

Thanks to Bjoern Jacke for finding this!

metze
(This used to be commit 165722a16c)
2007-10-10 14:20:37 -05:00
Andrew Tridgell
31e50ccae7 r19114: fixed another checker warning and a possible error on allocation
failure
(This used to be commit bc02f7ef96)
2007-10-10 14:20:36 -05:00
Andrew Tridgell
f1f807e66b r19113: fixed another checker warning.
(This used to be commit d12550af01)
2007-10-10 14:20:35 -05:00
Andrew Tridgell
36246a191c r19112: fixed a checker warning.
In case you haven't noticed, lots of our packages now run the IBM
checker in the build farm on 'snab'
(This used to be commit b39a79f17c)
2007-10-10 14:20:35 -05:00
Volker Lendecke
06ac3dbd9a r19079: talloc_array can fail
(This used to be commit 441ad8a45c)
2007-10-10 14:20:34 -05:00
Volker Lendecke
ecd970abb6 r19076: ldb_dn_copy_partial can fail
(This used to be commit 78aa689a74)
2007-10-10 14:20:33 -05:00
Volker Lendecke
c56585e5fe r19075: Fix a potential NULL dereference
(This used to be commit 84ae80b39b)
2007-10-10 14:20:33 -05:00
Volker Lendecke
9bbc8736e7 r19074: Merge from 3_0: Fix a potential NULL dereference.
Volker
(This used to be commit af72af684b)
2007-10-10 14:20:33 -05:00
Simo Sorce
118dae99de r19069: The sequence number is a 64 bit unsigned integer
Well spotted Volker
(This used to be commit f4239ef598)
2007-10-10 14:20:33 -05:00
Volker Lendecke
19df909135 r19068: Fix a potential NULL dereference
(This used to be commit 2dff8ee8cc)
2007-10-10 14:20:33 -05:00
Andrew Tridgell
bf86ece6cb r19009: ensure that data values from ldap libs are null terminated, to allow
ldb_msg_find_attr_as_string() to work correctly.

Thanks to Jim Myers for spotting this!
(This used to be commit b2076c1a7e)
2007-10-10 14:20:28 -05:00
Andrew Bartlett
c2a2c2456d r18978: Fix bug found by:
http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/

The issue here is that if the UTF8 conversion fails, because this
isn't actually UTF8 data, then we need to do a binary compare instead.

Andrew Bartlett
(This used to be commit a113e47784)
2007-10-10 14:20:26 -05:00
Andrew Tridgell
4c3b07b654 r18942: add a ldb_set_create_perms() function in ldb. I didn't call it
ldb_set_umask() (which is what we had discussed) as it doesn't
actually set the umask (in effect it sets the inverse of the umask -
the perms to be used for the file)
(This used to be commit 7e2ec87590)
2007-10-10 14:20:22 -05:00
Andrew Tridgell
4e7c9367a7 r18939: don't rely on the umask being right in ldb creation. Both Samba3 and
Samba4 smbd force the umask to 0, which meant we ended up with ldb
being world writable.

This isn't really an ideal fix, as it means ldb no longer honors umask
(as it should do, like all good libraries).

Unfortunately the 'proper' fix is too complex for now

this also merges a tiny code style fix from s4 to s3
(This used to be commit 1a42f38dfd)
2007-10-10 14:20:22 -05:00
Andrew Tridgell
26ece8f697 r18910: Change ldb_msg_add_string() to not actually add an attribute if the
string is zero length. This allows callers to not have to worry about
creating an invalid ldap attribute.

See extensive discussion on samba-technical list :-)
(This used to be commit 7a1db8c2a4)
2007-10-10 14:20:20 -05:00
Stefan Metzmacher
95340f8afb r18903: merge from samba3:
define HAVE_LDB_LDAP and HAVE_LDB_SQLITE3

metze
(This used to be commit 4e2f5ba490)
2007-10-10 14:20:19 -05:00
Volker Lendecke
1b8d6b3e7d r18894: Merge const fixes from 3_0
(This used to be commit 4ce447223c)
2007-10-10 14:20:19 -05:00
Simo Sorce
5e1e97a20d r18882: make style consistent
(This used to be commit a141ee9473)
2007-10-10 14:20:18 -05:00
Simo Sorce
df83913eb1 r18881: remove wrong check and statement.
to manipulate rootDSE we use ldb_dn_new() as base and that has 0 elements.
(This used to be commit 3e131177da)
2007-10-10 14:20:18 -05:00
Volker Lendecke
51f27dc3f1 r18851: Some C++ warnings
(This used to be commit 69f05f288c)
2007-10-10 14:20:16 -05:00
Andrew Tridgell
088c24e4e6 r18840: make these compatible with g++ warnings
(This used to be commit bcfa93954f)
2007-10-10 14:20:15 -05:00
Andrew Tridgell
45ca27699c r18834: get the log context code right
(This used to be commit b6bb5d7b77)
2007-10-10 14:19:16 -05:00
Andrew Tridgell
0b5e01c19b r18832: fixed standalone build
(This used to be commit 1ebc098b67)
2007-10-10 14:19:15 -05:00
Andrew Tridgell
58619eebc1 r18831: minor build changes for samba3. The logging changes will be removed
when the tdb api is updated
(This used to be commit 6ace943fac)
2007-10-10 14:19:15 -05:00
Andrew Tridgell
6c86ed60fc r18830: ensure backends aren't added twice (needed for samba3)
(This used to be commit 54b864b491)
2007-10-10 14:19:15 -05:00
Andrew Bartlett
77db3973c4 r18781: Move the usnCreated and usnChanged handling around again.
This moves these attributes from objectguid into an optional backend
(objectguid), used by ltdb.  For OpenLDAP, the entryUUID module
converts entryCSN into usnChanged.

This also changes the sequence number API, and uses 'time based'
sequence numbers, when an LDAP or similar backend is detected.

To assist this, we also store the last modified time in the TDB,
whenever we change a value.

Andrew Bartlett
(This used to be commit 72858f8594)
2007-10-10 14:19:11 -05:00
Simo Sorce
8d1b32083e r18777: add helper functions to create an ldb_request structure
(This used to be commit bcbe82873f)
2007-10-10 14:19:11 -05:00
Andrew Bartlett
df98ee6558 r18770: Avoid crashes and fix up other issues in the client-side paged_searches module.
In particular, we must query the remote server to find out if paged
searches are supported, not the local ldb.

This patch also removes the ue of bool, and returns it to LDB error codes.

Andrew Bartlett
(This used to be commit d36d05858b)
2007-10-10 14:19:10 -05:00
Andrew Tridgell
1188fa1a18 r18602: updated web page for new ldb build method
(This used to be commit 36c35262f2)
2007-10-10 14:18:55 -05:00
Andrew Tridgell
ee528dc0f2 r18596: removed superfluous semicolon
(This used to be commit 4f3628dea6)
2007-10-10 14:18:54 -05:00
Simo Sorce
9dd6cac44a r18591: Better defaults for share creation
Fix logic error in paged_results
(This used to be commit 34ce1f8e1b)
2007-10-10 14:18:53 -05:00
Andrew Tridgell
182ab7107c r18539: 'make distclean' should delete config.cache
(This used to be commit 5a8becb1be)
2007-10-10 14:18:43 -05:00
Andrew Tridgell
1d7a878c8b r18538: we need a pipe here, not a logical OR
also fix cn name for this record, and ensure tests/tmp is created
(This used to be commit 588c91f06b)
2007-10-10 14:18:43 -05:00
Andrew Tridgell
0e9147029f r18536: fixed the loading of external binary files from ldif into ldb
(This used to be commit fbe13ed83e)
2007-10-10 14:18:43 -05:00
Andrew Tridgell
fafa8c3e47 r18535: move the AC_CANONICAL_HOST and host specific flag tests into
libreplace. This should fix the standalone build of tdb on HPUX, where
we need to blacklist mmap.

Unfortunately this requires that we have a copy of config.guess and
config.sub in each of our project subdirectories. I tried to find a
way to use something like AC_CONFIG_AUX_DIR($libreplacedir) and just
put config.{guess,sub} in the lib/replace/ directory, but I couldn't
figure out how to do that in a way that kept autoconf happy for each
of our separate builds. Any autoconf guru out there see a way to do
this?
(This used to be commit 823cd3ab35)
2007-10-10 14:18:42 -05:00
Jelmer Vernooij
e9c465621e r18515: Remove calls to "time" for now as some sh implementations don't have it,
causing this test to fail.
(This used to be commit fc3f41a4ab)
2007-10-10 14:18:40 -05:00
Andrew Bartlett
595c141a69 r18504: Handle mappings for RENAME and KEEP attributes better. We don't need
to mess with the values in these cases.

Where we do convert the values, try and convert substrings.  This
isn't going to be perfect, but we should try rather than segfault.

This also avoids using the wrong arm of the union for the attribute
name

The change in the entryUUID module is to correct the case of
sAMAccountName, due to the case sensitive ldap.js test.

Andrew Bartlett
(This used to be commit 81d9a692c1)
2007-10-10 14:18:40 -05:00
Andrew Bartlett
1e4f5a096c r18495: More work on the LDAP backend (which now passes a lot of our tests!)
This adds a list of attributes that are in our wildcard seaches, but
the remote server requires to be explicitly listed.  This also cleans
up the handling of wildcards in ldb_map to be more consistant.

Also fix the partitions module to rebase the search, if on the GC
port, we do a subtree search.  (Otherwise backends can rightly
complain that the search is not in their scope).

Andrew Bartlett
(This used to be commit bc58792b71)
2007-10-10 14:18:38 -05:00
Stefan Metzmacher
d08fb7b1cc r18485: include libreplace.m4 in the aclocal.m4 files
and use the macros in configure.ac

metze
(This used to be commit 95d33e4d71)
2007-10-10 14:18:36 -05:00
Andrew Tridgell
05cdd9ccaf r18439: 2nd try at a talloc_move() api. This type with the ** ptr interface
exposed.

Unfortunately this generates a large number of type punning
warnings. We'll have to find some magic to hide those.
(This used to be commit 254cbf09de)
2007-10-10 14:18:29 -05:00
Andrew Tridgell
24fe49a3d1 r18438: I should have examined these uses of talloc_move() more
carefully. Most of them are OK, but a couple were not.
(This used to be commit b0de283882)
2007-10-10 14:18:29 -05:00
Andrew Tridgell
12e7682e7b r18437: added a 'make valgrindtest' target for ldb
(This used to be commit 4c33c6bb97)
2007-10-10 14:18:29 -05:00