1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-14 20:23:54 +03:00
Commit Graph

233 Commits

Author SHA1 Message Date
Andrew Bartlett
bb93a7ed5e r26684: Trivial cleanup from Matthias Dieter Wallnöfer, from bug 5090
Andrew Bartlett
(This used to be commit 0016231edd)
2008-01-06 23:27:02 -06:00
Simo Sorce
2d400c1dd1 r26574: Do not call functions in the variable declaration, fix checking for tmp_ctx,
and also makes code more readable and debuggable.

Eliminate silly parenthesys.

Simo.
(This used to be commit 166195b487)
2007-12-24 01:51:04 -06:00
Jelmer Vernooij
e266efffec r26200: Bring back some accidently removed files.
(This used to be commit a71e40ab5d)
2007-12-21 05:46:48 +01:00
Jelmer Vernooij
f2f16b45b5 r26197: Add bindings for libsecurity.
(This used to be commit 8625cd403b)
2007-12-21 05:46:47 +01:00
Andrew Bartlett
37039ea5b0 r26131: Ensure we show the right errors in the NULL base DN case. Based on
bug 5090 by Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>

Andrew Bartlett
(This used to be commit cc2d0c9f15)
2007-12-21 05:46:15 +01:00
Andrew Bartlett
fab68fd4d9 r25965: Remove duplicate block - thanks metze!
Andrew Bartlett
(This used to be commit d7e65da564)
2007-12-21 05:45:21 +01:00
Andrew Bartlett
fe61b63393 r25964: Fix comment and use talloc hirachy in ldb_tdb initialisation.
Andrew Bartlett
(This used to be commit 05cc2a7d96)
2007-12-21 05:45:21 +01:00
Andrew Bartlett
d544879e43 r25959: Add a new special DN to LDB: @OPTIONS
Use the checkBaseOnSearch attribute to control if we should check the
base DN on search requests.

Also ensure we honour any errors in searching, not just errors in the
supplied 'done' callback.

Andrew Bartlett
(This used to be commit deaac92f43)
2007-12-21 05:45:18 +01:00
Jeremy Allison
523445cdaa r25893: Fix ldb, tdb builds (and one warning).
Jeremy.
(This used to be commit 52b26645b0)
2007-12-21 05:44:42 +01:00
Andrew Tridgell
0906096ee4 r25690: - only use a readonly traverse in ldb_search when not in a transaction. When we are in a transaction then we could be in a top level modify operation (such as rename), so we must use a writeable traverse so that the async callbacks can do the modifies while the search is progressing.
- don't do the lockall operation on the tdb during a ldb search if in
  a transaction, as this would prevent modifies by callbacks as well
(This used to be commit aa9ab431e0)
2007-12-21 05:43:15 +01:00
Andrew Bartlett
c64116e158 r25218: After discussion with Simo, remove the subclass support from LDB.
Subclass support was designed to avoid needing to spell out the full
list of objectClasses that an entry was in.  However, Samba4 now
enforces this restriction in the objectClass module, and the way
subclass matching was handled was complex and counter-intuitive in my
opinion (and did not match LDAP).

Andrew Bartlett
(This used to be commit f5ce04b904)
2007-10-10 15:06:56 -05:00
Stefan Metzmacher
c364bbbfa3 r25215: replace talloc_append_string() with talloc_strdup_append_buffer()
metze
(This used to be commit 8f2db3c130)
2007-10-10 15:06:55 -05:00
Andrew Bartlett
6a9a1bd913 r25204: Patch by Andrew Kroeger <andrew@sprocks.gotdns.com> fixing bug #4958 -
rename of ldb entries for a case change (only).

I've modified the testsuite to verify this.

Andrew Bartlett
(This used to be commit 9cccd00dac)
2007-10-10 15:06:52 -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
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643)
2007-10-10 15:05:27 -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
b8d69a7ea2 r23795: more v2->v3 conversion
(This used to be commit 84b468b2f8)
2007-10-10 14:59:14 -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
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 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
Simo Sorce
0f2347e417 r19338: leak on error
(This used to be commit 326389afed)
2007-10-10 14:21:12 -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
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