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

234 Commits

Author SHA1 Message Date
Jelmer Vernooij
b1a7810f3e Remove more function-based inits. 2008-02-20 02:57:07 +01:00
Andrew Bartlett
0016231edd r26684: Trivial cleanup from Matthias Dieter Wallnöfer, from bug 5090
Andrew Bartlett
2008-01-06 23:27:02 -06:00
Simo Sorce
166195b487 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.
2007-12-24 01:51:04 -06:00
Jelmer Vernooij
a71e40ab5d r26200: Bring back some accidently removed files. 2007-12-21 05:46:48 +01:00
Jelmer Vernooij
8625cd403b r26197: Add bindings for libsecurity. 2007-12-21 05:46:47 +01:00
Andrew Bartlett
cc2d0c9f15 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
2007-12-21 05:46:15 +01:00
Andrew Bartlett
d7e65da564 r25965: Remove duplicate block - thanks metze!
Andrew Bartlett
2007-12-21 05:45:21 +01:00
Andrew Bartlett
05cc2a7d96 r25964: Fix comment and use talloc hirachy in ldb_tdb initialisation.
Andrew Bartlett
2007-12-21 05:45:21 +01:00
Andrew Bartlett
deaac92f43 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
2007-12-21 05:45:18 +01:00
Jeremy Allison
52b26645b0 r25893: Fix ldb, tdb builds (and one warning).
Jeremy.
2007-12-21 05:44:42 +01:00
Andrew Tridgell
aa9ab431e0 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
2007-12-21 05:43:15 +01:00
Andrew Bartlett
f5ce04b904 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
2007-10-10 15:06:56 -05:00
Stefan Metzmacher
8f2db3c130 r25215: replace talloc_append_string() with talloc_strdup_append_buffer()
metze
2007-10-10 15:06:55 -05:00
Andrew Bartlett
9cccd00dac 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
2007-10-10 15:06:52 -05:00
Jelmer Vernooij
917bd737cb r25084: Move samba-specific code out of lib/ldb directory. 2007-10-10 15:06:26 -05:00
Jelmer Vernooij
08bb1ef643 r25000: Fix some more C++ compatibility warnings. 2007-10-10 15:05:27 -05:00
Andrew Tridgell
40c0919aaa r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 14:59:15 -05:00
Andrew Tridgell
84b468b2f8 r23795: more v2->v3 conversion 2007-10-10 14:59:14 -05:00
Andrew Bartlett
3f3da9c471 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
2007-10-10 14:59:11 -05:00
Andrew Bartlett
10277f2724 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
2007-10-10 14:59:09 -05:00
Andrew Tridgell
0c3442c68b r23364: add LDB_FLG_NOMMAP flag 2007-10-10 14:53:12 -05:00
Stefan Metzmacher
df6e3bec36 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
2007-10-10 14:53:11 -05:00
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Simo Sorce
50534c84b4 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.
2007-10-10 14:51:30 -05:00
Stefan Metzmacher
393e4eeb82 r21311: fix very ugly "using free'ed memory" bug
This was there since 2005...

metze
2007-10-10 14:48:08 -05:00
Stefan Metzmacher
0c5eb19ebc r20969: remove unused function, found my lcov
metze
2007-10-10 14:44:05 -05:00
Stefan Metzmacher
21fddb643b r20865: remove useless warning, we now always pass the current partition
control as non critical control

metze
2007-10-10 14:43:41 -05:00
Stefan Metzmacher
492c79de13 r20684: if we don't have any indexes, then we should not waste time
to traverse the whole tdb and unpack each record

metze
2007-10-10 14:40:22 -05:00
Andrew Tridgell
65858ebb68 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
2007-10-10 14:29:27 -05:00
Stefan Metzmacher
4c1e4bfeef r20191: fix bug found by the IBM checker
metze
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
b97b8f5dcb 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
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
8dda4342f6 r20168: start separating attributes and syntaxes
metze
2007-10-10 14:29:17 -05:00
Simo Sorce
ea111795f4 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.
2007-10-10 14:29:07 -05:00
Simo Sorce
a2520bcfa9 r20101: Also rename a variable now that the unused parameter is gone 2007-10-10 14:29:06 -05:00
Simo Sorce
cc1bcb8148 r20100: Remove completely unused parameters 2007-10-10 14:29:05 -05:00
Stefan Metzmacher
8655db41c1 r19965: make the output a bit nicer
metze
2007-10-10 14:28:41 -05:00
Stefan Metzmacher
f129d78256 r19964: make debuging easier and report usefull error messages
metze
2007-10-10 14:28:40 -05:00
Simo Sorce
8bbbfa3467 r19911: talloc_apsrintf is not really required here
its faster this way (another 2-4%s)
2007-10-10 14:28:36 -05:00
Simo Sorce
32a6b6c75b r19905: use ldb_dn_new_fmt() to avoid double strdups 2007-10-10 14:28:34 -05:00
Stefan Metzmacher
6b76a7be4a r19884: rename ldb_dn_key -> ltdb_index_key to make more clear what it's for...
metze
2007-10-10 14:28:31 -05:00
Simo Sorce
3929c086d5 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
2007-10-10 14:28:22 -05:00
Simo Sorce
a580c871d3 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.
2007-10-10 14:28:22 -05:00
Simo Sorce
889fb983ba r19531: Make struct ldb_dn opaque and local to ldb_dn.c 2007-10-10 14:24:44 -05:00
Andrew Tridgell
1347ad254e 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
2007-10-10 14:21:26 -05:00
Andrew Tridgell
d7e0768516 r19365: fixed a memory leak in the ldb attribute handling 2007-10-10 14:21:17 -05:00
Andrew Tridgell
8c091bcdec r19363: - don't need to store the baseinfo message after cache load 2007-10-10 14:21:17 -05:00
Andrew Tridgell
3bf76db42d 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
2007-10-10 14:21:17 -05:00
Simo Sorce
326389afed r19338: leak on error 2007-10-10 14:21:12 -05:00
Andrew Tridgell
0824b3b8c1 r19324: fixed a leak on deleting records when no index is in place 2007-10-10 14:21:09 -05:00
Andrew Tridgell
e03ed5822a r19322: fix a minor memory leak in the ltdb cache code 2007-10-10 14:21:08 -05:00