Re: commit: ldap/servers/slapd/slapi slapi_overlay.c

2005-07-27 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: Modified Files: slapi_overlay.c 1.28 - 1.29 pb in slapi_op_func was freed uninitialized if preop_type==0 !internal_op Don't know if I fixed that in the right place. I NULLed out pb before doing goto cleanup: cleanup: if ( !internal_op ) {

Re: commit: ldap/servers/slapd/back-monitor init.c

2005-08-09 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: init.c 1.111 - 1.112 more (in)sanity stuff I haven't looked closely, but I imagine cleaner fix would be to move parts of monitor_back_db_destroy (bi-bi_db_destroy) to bi-bi_destroy. Or maybe parts of monitor_back_initialize to monitor_back_db_init

Re: OPENLDAP_AC

2005-08-24 Thread Hallvard B Furuseth
Kurt D. Zeilenga writes: At 01:58 AM 8/24/2005, Howard Chu wrote: Anyway, after fixing the OL_PTHREAD_TRY macro it appears that this configure script runs OK on my SuSE 9.2 x86_64 system. make test is running now, looks OK. ./configure --help shows that there is a problem with

slapadd -q (quick mode)

2005-08-26 Thread Hallvard B Furuseth
The description of '-q' in slapadd(5) says: enable quick (fewer integrity checks) mode. Does fewer consistency checks on the input data, and no consistency checks when writing the database. Improves the load time but if any errors or interruptions occur the resulting database will

Re: slapadd -q (quick mode)

2005-08-26 Thread Hallvard B Furuseth
Quanah Gibson-Mount writes: [EMAIL PROTECTED] wrote: slapadd -q has been entirely safe for me as long. The point of that paragraph is that if you kill slapadd, or an error occurs during the slapadd, you will need to wipe the database and start over. Apart from that, it is completely safe. ;)

Re: slapadd -q (quick mode)

2005-08-26 Thread Hallvard B Furuseth
Howard Chu writes: Though actually I would like an option for more LDIF error checking too: Adding whatever check ldapadd does which is convenient to add to slapadd, including a verify function in overlays like unique, to be called for each entry after the database is built and indexed.

Re: Please test OPENLDAP_REL_ENG_2_3

2005-08-29 Thread Hallvard B Furuseth
tests/data/slapd-valsort.conf is missing, for test042. tests/data/slapd-aci.conf is missing. If it is copied from HEAD, slapd dumps core in test041: #0 0x080a807b in parse_acl (be=0x82b75a8, fname=0x828b008 ./testrun/slapd.1.conf, lineno=54, argc=6, argv=0x82b48f0, pos=-1) at

slap tool support for back-null

2005-08-30 Thread Hallvard B Furuseth
I'll add support for slapadd, slapcat etc to the null backend. I actually found a use for it recently:-) -- Hallvard

Back-config attribute names

2005-08-31 Thread Hallvard B Furuseth
Backends can have options with the same name but very different semantics, and so far this seems to be reflected in back-config attribute names. That could get messy, in particular with contrib or private backend modules written using some other backend as a template. I think a config

LDAP Debug messages severity levels

2005-09-14 Thread Hallvard B Furuseth
slapd is often too silent when something fails. One may need -d -1 or something to find out what is wrong - and then useful messages can drown in others. Also, if OpenLDAP is configured with --disable-debug, often we get no error messages at all. That's plain wrong - fatal error messages are not

How to rebuild configure

2005-09-14 Thread Hallvard B Furuseth
How do I build configure in HEAD now? autoconf-2.59 + this patch? http://lists.gnu.org/archive/html/autoconf/2005-08/msg00076.html Subject:Re: [Fwd: libtool AC_ARG_WITH and autoconf 2.59] From: Howard Chu [EMAIL PROTECTED] To: autoconf@gnu.org Date: Thu, 25 Aug 2005

Re: Thread debugging wrapper

2005-09-17 Thread Hallvard B Furuseth
I wrote: I've been sitting on a thread debugging package for a while now, and it seems to have stabilized. I'll commit it soon unless someone thinks it should be done differently. ...committed to HEAD. -- Hallvard

Re: Threaded AVL routines

2005-09-21 Thread Hallvard B Furuseth
Which uses of AVLs need optimzation? A better speedup in some cases should be to replace them with hash tables, splay trees, skip lists or something. Maybe there is a package out there which has the same interface to several such data structures, so we easily can plug in different ones for

Re: commit: ldap/tests run.in

2005-09-29 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: Modified Files: run.in 1.40 - 1.41 Source scripts/defines.sh _after_ the variables it uses have been set Erm, that referred to some private variables of mine:-) Oh well, the change doesn't hurt. -- Hallvard

Updating the test suite (Was: commit: ldap/tests run.in)

2005-09-30 Thread Hallvard B Furuseth
Pierangelo Masarati writes: In any case this is mainly a hack to allow importing the project under AEGIS; I don't either like having to source defines.sh twice only to get few directories. Maybe directories should simply be set up in run and passed to defines.sh thru the environment? I

Re: Updating the test suite

2005-09-30 Thread Hallvard B Furuseth
Pierangelo Masarati writes: Hallvard B Furuseth writes: * Factor a lot of code out to shell functions in defines.sh. (...) Shell functions are fairly portable now, and in any case OpenLDAP uses build/shtool which uses shell functions. (...) You seem to be fairly optimistic about

Re: Updating the test suite (Was: commit: ldap/tests run.in)

2005-09-30 Thread Hallvard B Furuseth
Walter Franzini writes: Hallvard B Furuseth wrote: Pierangelo Masarati writes: I suppose ./run could run the scripts by sourcing them instead: test -x $SCRIPT (. $SCRIPT) Then the clean operations at the end of ./run will never be executed. No, the () puts the script in a subprocess

Re: Updating the test suite

2005-09-30 Thread Hallvard B Furuseth
Pierangelo Masarati writes: test040 is currently specific to back-hdb because only back-hdb supports subtree rename (it could be moved to a backend-specific add-on to test005) That's true. Though if back-newWonderfulDatabase is implemented someday and also supports subtree rename, test005

Re: Updating the test suite (Was: commit: ldap/tests run.in)

2005-09-30 Thread Hallvard B Furuseth
Howard Chu writes: I guess it would be nice to fix things so we don't have to edit the scripts and mess up our commits, but how do you set up the variables in a script that invokes slapd (or any program) multiple times, and you only want special treatment for one specific invocation? Well...

Re: commit: ldap/tests/scripts defines.sh

2005-10-01 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: Modified Files: defines.sh 1.129 - 1.130 allow writable dirs to be user-relocated -DATADIR=./testdata PROGDIR=./progs -TESTDIR=./testrun -SCHEMADIR=./schema +DATADIR=${USER_DATADIR-./testdata} +TESTDIR=${USER_TESTDIR-./testrun}

Re: testsuite inconsistencies

2005-10-03 Thread Hallvard B Furuseth
I'm trying to maintain OpenLDAP software using Aegis. One of the constraints imposed by Aegis is that the integration directory can not be modified by the testsuite. Looking at the various scripts under tests/ it seems to me that the solution for my problem is to set TESTDIR=/tmp/.

ldap tool result codes (was: commit: ldap/tests/scripts test007-replication test018-syncreplication-persist)

2005-10-04 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: test007-replication 1.67 - 1.68 test018-syncreplication-persist 1.35 - 1.36 ldapmodify doesn't return an LDAP error code How did we miss that for so long? The ldapmodify source code looks like it intends to return a result code, though. And it does

Re: ldap tool result codes

2005-10-05 Thread Hallvard B Furuseth
Pierangelo Masarati writes: To: Hallvard B Furuseth [EMAIL PROTECTED] Maybe we should change all the LDAP tools to always return some LDAP error code, and some special code when it cannot or when an LDAP code does not make sense? The point is: LDAP error codes are integers, while command

Re: ITS#3985 test039 hangs on Windows

2005-10-07 Thread Hallvard B Furuseth
Howard Chu writes: On the other hand, when exactly is it possible for a single request to have more than one result message? SearchResultEntry/Reference and the newer IntermediateResponse. I seem to remember there was an extended search result or something once which was removed due to lack of

Re: ITS#3985 test039 hangs on Windows

2005-10-07 Thread Hallvard B Furuseth
Kurt D. Zeilenga writes: What about the case where ldap_result(3) is called for any and all? The message chained returned could contain responses from multiple requests. ldap_result() should return responses to one specific request. ldap_result(,msgid=LDAP_RES_ANY,,) may pick any outstanding

Re: PATCH: back-sock

2005-10-13 Thread Hallvard B Furuseth
Howard Chu writes: It certainly sounds like an improvement over back-shell, and there may be some value in keeping the perl interpreter outside the slapd process. Yes: And slapd won't crash if a Perl routine crashes. And perl can be run as a user with none of slapd's privileges, so one need not

Terminal escape sequences from configure/make test

2005-10-15 Thread Hallvard B Furuseth
The terminal escape sequences from 'make test outfile' can be a bit annoying. It's not hard to say 'TERM=dumb make test outfile', but I forget it now and then. I'd like to wrap the code to find terminal escape sequences in configure and 'make test' in 'if test -t 1', which checks if file

Re: commit: ldap/servers/slapd backglue.c proto-slap.h slapcommon.c

2005-10-15 Thread Hallvard B Furuseth
Howard Chu writes: OK, suppose we add a -g option that disables glue completely? Fine. Or possibly -G, since I have a vague feeling that uppercase is more common for options that negate what they are named for. -- Hallvard

Re: ber_int_options.lbo_valid ?

2005-11-12 Thread Hallvard B Furuseth
Howard Chu writes: This field is gratuitously set to LBER_INITIALIZED throughout some heavily used liblber routines. There appears to be only one place where the value is ever checked (in ber_set_option). What will you replace it with? Its function seems to be (slightly simplified): When a

Re: A clean way to detect if a ldap_pvt_thread_mutex is locked (best would be also to know who's the owner of the lock :)

2006-03-29 Thread Hallvard B Furuseth
Pierangelo Masarati writes: I fear yet more few minor concurrency issues in libldap; I'd like to be able to assert if a mutex is locked from inside library functions, and it would be great to also know who's locking it. What I'd do is #define ISLOCKED(m) \ ( ldap_pvt_mutex_trylock(

Re: A clean way to detect if a ldap_pvt_thread_mutex is locked (best would be also to know who's the owner of the lock :)

2006-03-31 Thread Hallvard B Furuseth
One thing which is missing is pthread_once() to protect init functions. I'll commit one for pthreads and a default version, unless someone protests. Then e.g. ldap_int_initialize() can use that - and if two threads call it at the same time, one will wait for the other's initialization to

Re: A clean way to detect if a ldap_pvt_thread_mutex is locked (best would be also to know who's the owner of the lock :)

2006-03-31 Thread Hallvard B Furuseth
Pierangelo Masarati writes: Well, what I really need as a baseline is if some mutex is not locked at all. If it's not, then it's an error. If it is, it's an error only if it's not owned by the caller. Can you give an example of some code which needs this? I can't offhand think of an problem

Re: A clean way to detect if a ldap_pvt_thread_mutex is locked (best would be also to know who's the owner of the lock :)

2006-03-31 Thread Hallvard B Furuseth
Pierangelo Masarati writes: I fear yet more few minor concurrency issues in libldap; I'd like to be able to assert if a mutex is locked from inside library functions, Duh... please ignore my previous message. I forgot you said _assert_. Well, that one isn't hard. define an

Re: tpool cleanup?

2006-04-01 Thread Hallvard B Furuseth
Pierangelo Masarati writes: Playing with Hallvard's thread debugging code I came into something that looks strange: slapd does tpool init/cleanup fine, while tools don't. (...) We discussed a related issue some time ago. The whole init/cleanup stuff in slapd is skewed. main() does

Re: A clean way to detect if a ldap_pvt_thread_mutex is locked (best would be also to know who's the owner of the lock :)

2006-04-01 Thread Hallvard B Furuseth
Pierangelo Masarati writes: On Fri, 2006-03-31 at 20:09 +0200, Hallvard B Furuseth wrote: Or more generally, use my thr_debug.c package and extend ldap_debug_thread_cond_t with the thread ID and info about whether the mutex is locked. Get thread ID with ldap_pvt_thread_self(), compare

Re: tpool cleanup?

2006-04-03 Thread Hallvard B Furuseth
Pierangelo Masarati writes: Another issue that's happening right now is that ldap_pvt_thread_exit() may be called even if no ldap_pvt_thread_pool_submit() was issued (e.g. try starting slapd and killing it before any operation is run); this causes the thread debug build to fail with slapd

test008-concurrency loglevel -1

2006-04-06 Thread Hallvard B Furuseth
Any reason why test008-concurrency uses loglevel -1 instead of $LVL (${SLAPD_DEBUG-261}) from defines.sh? A little excessive when for hosts with little disk space... -- Hallvard

Re: commit: ldap/servers/slapd result.c

2006-04-20 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: result.c 1.292 - 1.293 re-fix ITS#4495 working around atoi() limitations Wow, that was a lot of debug messages:-) Still needs work though, e.g. strip whitespace from all input lines. output code: $RC output info:urgle And I imagine that we could

Re: tpool cleanup?

2006-04-29 Thread Hallvard B Furuseth
Howard Chu writes: I now see this message when slapd exits: == thr_debug: Leaked 2 unexited threads, 46 mutexes. == Of course, running with tracethreads shows that slapd created and joined only 2 threads, so there isn't really any thread leak. This message doesn't seem to mean anything then.

Re: commit: ldap/libraries/libldap_r rmutex.c threads.c

2006-04-29 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: threads.c 1.19 - 1.20 rmutex_lock etc.: caller supplies thread id Why is the kludge to pull symbol definitions in necessary - and if it's necessary there, why doesn't the library need to be full of similar kludges for other symbol definitions? --

Re: commit: ldap/libraries/libldap_r rmutex.c threads.c

2006-05-01 Thread Hallvard B Furuseth
Howard Chu writes: This is just a quickie to get the functionality working. It doesn't though:-) Opheader.oh_tid (alias Operation.o_tid) is never set, yet overlays/accesslog.c uses the value as the owner thread ID. Did it exist once and get replaced with the 'ctx' things, or something like

Re: commit: ldap/libraries/libldap_r rmutex.c threads.c

2006-05-02 Thread Hallvard B Furuseth
Howard Chu writes: Hallvard B Furuseth wrote: Opheader.oh_tid (alias Operation.o_tid) is never set, yet overlays/accesslog.c uses the value as the owner thread ID. (...) Hm, I don't know what happened with oh_tid, but I think it would be better to actually set it, in case others need

Re: tpool cleanup?

2006-05-02 Thread Hallvard B Furuseth
Luke Howard writes: Yes, memory debuggers like Valgrind can show a stack trace of where the resource was created. thr_debug can't do that, so the output is more informative when it provokes Valgrind instead. On Linux you can call backtrace_symbols_fd() to get a backtrace from within your

Re: commit: ldap/servers/slapd slappasswd.c

2006-05-11 Thread Hallvard B Furuseth
[Pierangelo Masarati] What about a -n (much like sophisticated echo implementations) to avoid breaking existing usage? Actually it's not simple vs sophisticated, but the SysV echo foo\c vs. BSD echo -n foo. Except today we've got such mixtures of SysV + BSD that it is hard to tell. [Aaron

Reference counts?

2006-05-16 Thread Hallvard B Furuseth
Just a loose idea... Ownership often seems a bit hairy to keep track of, like ITS#4550 just now. I've been wondering if it would ease things up to add reference counts to some objects, but I don't know just when it would be useful... Maybe berval-like constant strings instead of

strange ppolicy doc

2006-05-25 Thread Hallvard B Furuseth
man slapo-ppolicy, option ppolicy_hash_cleartext, says: It is recommended that when this option is used that compare, search, and read access be denied to all directory users. Huh? It would make sense to me if it said ...when this option is *not* used ... read access *to userPassword*

back-config OIDs

2006-05-25 Thread Hallvard B Furuseth
Attribute (OLcfgDbAt:0.1 NAME 'olcDbDirectory') has different definitions in back-ldif and back-bdb: No SINGLE-VALUE in back-ldif. Looks like a likely bug to reappear when other common attributes are added. I suggest that OIDs in the common namespace are defined in bconfig.c (in this case with

Re: large multivalued attributes

2006-08-18 Thread Hallvard B Furuseth
I wrote: In any case, it's a nice feature that e.g. phone numbers in an entry can be returned in the preferred order. So if it doesn't get cumbersome, I would prefer to be able to turn a don't reorder feature on in slapd.conf. I mean, turn it on for individual attributes. -- Hallvard

Re: large multivalued attributes

2006-08-18 Thread Hallvard B Furuseth
Kurt D. Zeilenga writes: At 12:09 PM 8/16/2006, Howard Chu wrote: This issue has been around for a long time, and I think we're going to need to deal with it soon, as we see sites creating groups with thousands of members. Yup. Our site currently has 6 with 2 members, 7 more with 5000.

rootdn - admindn?

2007-01-06 Thread Hallvard B Furuseth
I've had it with explaining that the suffix is the root of the database which is not the rootdn which is not the Unix user root. Any hope of renaming rootdn and rootpw to admindn and adminpw, with rootdn/pw as backwards-compatible and eventually undocumented aliases? -- Hallvard

Re: rootdn - admindn?

2007-01-10 Thread Hallvard B Furuseth
Michael Ströder writes: On 2:00:38 am 2007-01-10 Kurt D. Zeilenga [EMAIL PROTECTED] wrote: At 11:50 AM 1/6/2007, Hallvard B Furuseth wrote: I've had it with explaining that the suffix is the root of the database which is not the rootdn which is not the Unix user root. Any hope of renaming

Re: RE24

2007-02-02 Thread Hallvard B Furuseth
Pierangelo Masarati wrote: Howard Chu wrote: On a side-note, when I was benchmarking the connection manager I found it useful to doctor up back-null to actually return an entry in response to search requests. If anyone else would find this useful, I can commit that patch. For a similar need,

Re: commit: ldap/libraries/libldap result.c

2007-02-06 Thread Hallvard B Furuseth
Howard Chu writes: Pierangelo Masarati wrote: [EMAIL PROTECTED] wrote: Update of /repo/OpenLDAP/pkg/ldap/libraries/libldap Modified Files: result.c 1.149 - 1.150 Log Message: Fairly sure this is what the TIMEOUT option should always have been for Not strictly related, but does it

Re: commit: ldap/libraries/libldap result.c

2007-02-06 Thread Hallvard B Furuseth
Howard Chu writes: Hallvard B Furuseth wrote: Do you mean ldap_get_option()? It generally returns malloced data, IIRC. undocumented just means the code has been the documentation, so I presume a change will break any old code which uses it. Yes to all of the above. But since

Re: commit: ldap/servers/slapd sasl.c sl_malloc.c connection.c proto-slap.h

2007-02-14 Thread Hallvard B Furuseth
Howard Chu writes: The documentation for this feature presents a bit of a problem, since most of the functionality of librewrite is documented in slapo-rwm(5). When SLAP_AUTH_REWRITE is defined (which it is, whenever --enable-rewrite is used) then all of librewrite's capabilities really

Re: (ITS#4879) URL parse/unparse troubles

2007-04-03 Thread Hallvard B Furuseth
Howard Chu writes: It's almost aggravating enough to make me switch to pure DAP and leave all of this cruft behind. Mebbe it's time to add a config switch somewhere to set all of slapd and the libraries to default to DCE/X.500 format DNs, and define a new xdap URL scheme to go with it. DNs

Kill KR C support?

2007-06-14 Thread Hallvard B Furuseth
As far as I can tell, OpenLDAP has been unusable with KR C since openldap-2.0: lber.h in that release had prototypes unprotected by LDAP_P() in struct sockbuf_io. They've been there ever since. So LDAP_P() can go. Don't know which other not-strict-ISO support is still useful - I note lber.h has

Re: Kill KR C support?

2007-06-14 Thread Hallvard B Furuseth
Kurt Zeilenga writes: On Jun 14, 2007, at 9:44 AM, Hallvard B Furuseth wrote: As far as I can tell, OpenLDAP has been unusable with KR C since openldap-2.0: lber.h in that release had prototypes unprotected by LDAP_P() in struct sockbuf_io. They've been there ever since. So LDAP_P() can go

Re: commit: ldap/servers/slapd/back-perl SampleLDAP.pm

2007-06-15 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: For ITS#4995, add clarification comments How about perlModulePath /directory/with/this/module ? -- Regards, Hallvard

Re: commit: ldap/servers/slapd/back-perl SampleLDAP.pm

2007-06-15 Thread Hallvard B Furuseth
Gavin Henry writes: I've run Perl::Critic over this and fixed/updated to latest Perl Best Practices. We might as well have an up to date sample. Do you mind if I commit my changes? My impression is that back-perl hovers on the verge of code rot, and any change is likely for the better. As

Re: Status of ldbm in HEAD?

2007-06-15 Thread Hallvard B Furuseth
Pierangelo Masarati writes: doc/man/man5/slapd-ldbm.5 (obviously ;-) ) we could leave that file in place, just stating that it's no longer available and that slapd-bdb(5) slapd-hdb(5) is the suggested replacement. Sounds good. -- Regards, Hallvard

Re: test043 failure

2007-06-21 Thread Hallvard B Furuseth
Luca Scamoni writes: I'm seeing failure with current HEAD. Anyone else? Yes. ITS#4839 http://www.openldap.org/its/?findid=4839. -- Regards, Hallvard

Re: commit: ldap/servers/slapd/back-perl SampleLDAP.pm

2007-06-22 Thread Hallvard B Furuseth
Dagobert Michelsen writes: Am 19.06.2007 um 17:22 schrieb Hallvard B Furuseth: Is there a max number of Perl interpreters per backend? I suppose you mean per database. Right. There is exactly one interpreter in use for each active connection and each configured back-perl database because

Re: commit: ldap/servers/slapd/back-perl SampleLDAP.pm

2007-07-01 Thread Hallvard B Furuseth
I wrote: Gavin Henry writes: I've run Perl::Critic over this and fixed/updated to latest Perl Best Practices. We might as well have an up to date sample. Do you mind if I commit my changes? My impression is that back-perl hovers on the verge of code rot, and any change is likely for the

Re: commit: ldap/servers/slapd/back-perl SampleLDAP.pm

2007-07-01 Thread Hallvard B Furuseth
Gavin Henry writes: Nope, you are right. My mistake. It does work, but should be: print {*STDERR} Here in new\n; (...) See: http://search.cpan.org/~thaljef/Perl-Critic-1.06/lib/Perl/Critic/Policy/InputOutput/RequireBracedFileHandleWithPrint.pm Heh. Capital-letter STDERR stands out enough

Re: Alphabetised defines.sh?

2007-07-05 Thread Hallvard B Furuseth
Gavin Henry writes: I've been trying to follow defines.sh to find a few variables. Is there any reason the individual sections aren't alphabetised? Some variables cannot be sorted (e.g. DBDIR1 is set from DBDIR1A), and some variables are grouped logically within a section (e.g. P*SRSLAVECONF

slapd memory alloc/free functions

2007-07-06 Thread Hallvard B Furuseth
#define LDAP_MEMORY_DEBUG and SLAP_NO_SL_MALLOC breaks slapd in a number of places. Some of the fixes are straightforward, but others require more sweeping changes - or leaving LDAP_MEMORY_DEBUG useless, which it has been for some time anyway. However the LDAP_MEMORY_DEBUG troubles match a

Re: slapd memory alloc/free functions

2007-07-06 Thread Hallvard B Furuseth
oops, typos: it out. (First stage: /free/ch_free/ in slapd, #define CH_FREE in all sorry, s/free/ch_free/. Since it can be a bit hard to keep track of which memory comes from where, ch_free() fetches the current thread's context if passed a NULL context. It fetches the current

Re: authPassword (RFC 3112) implemented?

2007-07-15 Thread Hallvard B Furuseth
Pierangelo Masarati writes: AFAIK, the attribute and so is recognized, but it's not implemented (nor won't, as it is no longer needed). If it's no longer needed - what has changed? I thought it was invented because the existing scheme of '{hash method}' in userPassword broke the LDAP standard.

recommend loglevel 256 (statslog)

2007-07-24 Thread Hallvard B Furuseth
Bug reports with huge logs but without loglevel 256 can be amazingly useless... I'll commit this change to slapd.conf(5): @@ -559,3 +559,3 @@ .B (0x100 stats) -stats log connections/operations/results +connections, LDAP operations, results (recommended) .TP @@ -615,3 +616,6 @@ level is

Re: commit: ldap/servers/slapd entry.c

2007-08-03 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: Tag: OPENLDAP_REL_ENG_2_3 entry.c 1.129.2.13 - 1.129.2.14 import fix to ITS#5071 This (/* require ';binary' when appropriate (ITS#5071) */) is a functionality change which can prevent people from upgrading. I don't think that belongs so late in RE23's

Re: commit: ldap/servers/slapd entry.c

2007-08-09 Thread Hallvard B Furuseth
Pierangelo Masarati writes: This (/* require ';binary' when appropriate (ITS#5071) */) is a functionality change which can prevent people from upgrading. I don't think that belongs so late in RE23's life cycle. You can't load a certificate without ';binary' using ldapadd/ldapmodify; this

Re: Choosing OID for overlay config

2007-08-10 Thread Hallvard B Furuseth
Gavin Henry writes: What's the best practice for choosing the numbers in OLcfgOvAt:14.1 Above is taken from translucent.c Not sure what you mean. OLcfgOvAt:14.1 is an attribute type defined in translucent.c, you shouldn't take OIDs below it. If you want to add another config attribute to

Re: Indent?

2007-08-10 Thread Hallvard B Furuseth
Gavin Henry writes: Do any of you use indent or similar for cleaning up OpenLDAP code and have a ~/.my_rules to share? I don't know how to make indent output OpenLDAP's spacing around parens. And I'm not sure what the rules are anyway. Space inside but not outside parens in function calls,

Re: BerkeleyDB versions

2007-08-15 Thread Hallvard B Furuseth
Howard Chu writes: If support for 4.2 is dropped in the next 2.4 beta, what is the earliest version we think we will support? We already disallow use of 4.3 due to its instability, so 4.4 would be the minimum. What's the best BerkeleyDB version to use with OpenLDAP 2.3 anyway? -- Hallvard

tab-width (was: commit: ldap/servers/slapd backend.c bconfig.c proto-slap.h)

2007-08-16 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: Modified Files: backend.c 1.384 - 1.385 Just noticed your indentation... Note that OpenLDAP code looks best when edited and displayed with tab-width 4, not 8. -- Hallvard

Re: late declaration of variable (2.3, backglue.c)

2007-08-23 Thread Hallvard B Furuseth
Buchan Milne writes: I need the patch below (since 2.3.37, maybe before) to be able to compile backglue.c on gcc 2.9x. (...) - int rc; BackendDB *b0 = op-o_bd; op-o_bd = glue_back_select( b0, dn ); + int rc; That breaks on C90 compilers. Declaration after

Re: late declaration of variable (2.3, backglue.c)

2007-08-23 Thread Hallvard B Furuseth
Pierangelo Masarati writes: I guess you need the reverse: the declaration of rc is incorrectly placed after the invocation of glue_back_select() in current 2.3 code. Ooh. I looked at HEAD:-) -- Hallvard

memberOf attribute (was: commit: ldap/servers/slapd/overlays memberof.c Makefile.in)

2007-08-24 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: memberof.c NONE - 1.1 Your 'memberOf' attribute definition says { ( 1.2.840.113556.1.2.102 (...) EQUALITY distinguishedNameMatch /* added */ USAGE directoryOperation /* questioned */ /*

Re: HEADS UP: Attribute changes

2007-09-21 Thread Hallvard B Furuseth
Howard Chu writes: This is the first stage in a larger transition, to using sorted arrays for multivalued attributes. I haven't quite decided how the next steps will play out just yet. (...) We can also implement this without any user-visible change, if we keep an auxiliary ordering array,

Re: HEADS UP: Attribute changes

2007-09-21 Thread Hallvard B Furuseth
Howard Chu writes: Add a slapd.conf directive which inserts an implicit X-ORDERED 'VALUES' in an already existing attribute definition. (...) OK, that makes sense. Except it's not the same as X-ORDERED 'VALUES' behavior. (...) Yes, I guess that should have been the opposite, an

Re: Handling bad cn=config updates

2007-10-13 Thread Hallvard B Furuseth
Howard Chu writes: The Modify operation has already completed though, there's nothing to return an error message to by then. I see. We do as much pre-checking as possible to validate the syntax of changes before committing them. But here you've got an input with perfectly valid syntax. The

Re: Handling bad cn=config updates

2007-10-15 Thread Hallvard B Furuseth
Howard Chu wrote: Hallvard B Furuseth wrote: So let me step back a bit: I'd like slapd to send the ModifyResponse _after_ the change has taken effect (or failed to take effect). That's actually the way it has been implemented. Just that in this case, we weren't validating the olcDbDirectory

Re: Handling bad cn=config updates

2007-10-16 Thread Hallvard B Furuseth
Howard Chu writes: Hallvard B Furuseth wrote: (...) Though that's one thing which needs some documentation - how careful should one be with cn=config changes? That seems like a pretty silly question. cn=config is so potentially dangerous that in OpenLDAP 2.3 we restricted it to only be usable

Re: more perf numbers

2007-11-16 Thread Hallvard B Furuseth
Howard Chu writes: 2.3.39 back-null got 27k auths/sec vs 2.4(.7)'s 36k/sec. 33% gain, obviously back-hdb requires more CPU... Which hash method in userPassword? I'm writing this on a host which needs 12 seconds to do 27k crypt(password, $md5-salt$hash)-calls. -- Hallvard

Re: ordered indexing for integers

2007-11-20 Thread Hallvard B Furuseth
I wrote: for larger absoulte values: same, but for the sake of speed read the value as hex, so we only need read the first digits (skipping initial zeros). whoops, I meant only the first bytes of the value-as-hex will be included in the index key. -- Hallvard

Re: commit: ldap/doc/man/man8 slapindex.8

2007-11-21 Thread Hallvard B Furuseth
[EMAIL PROTECTED] writes: slapindex.8 1.28 - 1.29 Document truncate mode Please clarify the doc of this. I mean, I had no idea slapindex had a non-truncate mode. Does slapindex by default not delete old indexes, or does is mean something else? When should one _not_ use truncate mode?

Re: commit: ldap/doc/man/man8 slapindex.8

2007-11-21 Thread Hallvard B Furuseth
Howard Chu writes: Hallvard B Furuseth wrote: Does slapindex by default not delete old indexes Right. It only adds new data by default. (...) In BerkeleyDB, you cannot use truncate mode with transactions. So in the default mode (without -q), back-bdb/hdb silently removes the truncate flag

Re: Empty DN () String Value?

2007-11-26 Thread Hallvard B Furuseth
Michael Ströder writes: It really depends on what you want to express. Note that represents the rootDSE or root naming context. So would reference something existing or well-defined. IMHO NULL (or None in Python) would better signal something undefined or none-existing. Yes. There is one

Re: commit: ldap/servers/slapd connection.c daemon.c proto-slap.h syncrepl.c

2007-11-27 Thread Hallvard B Furuseth
Howard Chu writes: The -O2 build is faster from about 4 to 24 client threads. From 28 on up, the nonoptimized code is faster at every load level. I was originally using gcc 4.1.2 but I'm seeing the same result now using gcc 4.2.2. Also, slapd is only configured with 8 worker threads in all of

Re: ordered indexing for integers

2007-11-30 Thread Hallvard B Furuseth
Still wrong. Current ordering: indexvalue(hex value) 04 -2147483648 (-0x8000) 040001 -2147483647 (-0x7fff) 044000 -1073741824 (-0x4000) 046000 -9126805504 (-0x22000) 047000 -268435456

Re: ordered indexing for integers

2007-11-30 Thread Hallvard B Furuseth
Finally had a look at the implementation of this (in RE24). It is wrong. The following values produces these indexes, ordered as: 0: 048000 +1: 048001 -1: 0480ff +257: 048101 -257: 048000feff To get the correct ordering,

Re: ordered indexing for integers

2007-12-01 Thread Hallvard B Furuseth
Howard Chu writes: Hallvard B Furuseth wrote: Got crashes due to a write after 'tmp', incremented size by 1. Haven't looked at why yet, or whether that's the complete fix. That should never happen. Do you have the backtrace from when the write occurred? No, got memory corruption later

Re: ordered indexing for integers

2007-12-01 Thread Hallvard B Furuseth
Howard Chu writes: Hallvard B Furuseth wrote: I wrote: Also the index is wrong for huge numbers. At some point the indexing should just give up and use max/min values, but I suppose at least cryptograpy-sized numbers should be usefully indexed. I.e. at least two length bytes. I wonder

RE24 test008 - invalid credentials

2007-12-02 Thread Hallvard B Furuseth
RE24 passes all tests on RedHat x86_64, but should test008 spew out 'slapd-bind PID=: ldap_sasl_bind_s: Invalid credentials (49)'? testrun/ and typescript: http://folk.uio.no/hbf/test008out.tbz. Configured: --with-tls --with-cyrus-sasl --enable-crypt --enable-aci --enable-unique

Re: ordered indexing for integers

2007-12-02 Thread Hallvard B Furuseth
Howard Chu writes: This code is wrong: (..) On most 32 bit machines the if( chop ...) comparison must always fail, since ber_slen_t is only 32bits. You should do the test before multiplying chop by 3. No, chop already fits in ber_slen_t, since it is a ber_len_t/7*3. The check is for overflow

Re: ordered indexing for integers

2007-12-02 Thread Hallvard B Furuseth
Howard Chu writes: Passing structures by value may be perfectly legal now, but we never do it in this source base. Why start now? We don't? OK, it's fine to do two struct copies instead inside the function. -- Regards, Hallvard

Re: ordered indexing for integers

2007-12-02 Thread Hallvard B Furuseth
Howard Chu writes: I think you misunderstood. No, I wrote too briefly. No matter what you're actually testing for, there is no way you're going to get a TRUE result from comparing ( signed 32 bit integer 0x7fff ). Right, and chop = (max ber_len_t)/2. so the test is a no-op on

test008 failed in HEAD

2007-12-03 Thread Hallvard B Furuseth
http://folk.uio.no/hbf/test008out2.tbz ldapsearch.flt = ldif.flt + cn=James A Jones 4,ou=People,dc=example,dc=com

Re: test008 failed in HEAD

2007-12-04 Thread Hallvard B Furuseth
If you are using gcc, it might help to compile BDB and/or OpenLDAP without -O and see if that helps. The gcc mailinglist and comp.programming.threads recently discussed a some gcc optimizations that are invalid for threaded code. E.g. gcc can turn things like static or extern int v; ... if

  1   2   3   >