(ITS#5295) option to allow slapd bind to any available port
by chitrav@us.ibm.com
Full_Name: Chitra Vemkatramani
Version: 2.3.27
OS: Redhat
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (162.83.178.28)
For a project that we are using openldap in, we would like to allow multiple
users to start up ldap servers on the same machine. We would like an option on
the slapd command line asking the server to pick any available port to bind to.
We can then do netstat, find the port and pass that on to the client. Here is
the patch we put in, to allow us to specify -1 for the port, so that the server
will pick any available port. Can you please consider adding this to the server
options ?
--- openldap-2.3.27/libraries/libldap/url.c 2006-04-03 15:49:55.000000000
-0400
+++ /homes/hny1/chitrav/bindport0/url.c 2007-04-19 12:26:47.407806503 -0400
@@ -833,7 +833,7 @@
ludp->lud_next = NULL;
ludp->lud_host = NULL;
- ludp->lud_port = 0;
+ ludp->lud_port = -1;
ludp->lud_dn = NULL;
ludp->lud_attrs = NULL;
ludp->lud_scope = LDAP_SCOPE_DEFAULT;
@@ -1118,7 +1118,7 @@
(*ludpp)->lud_host = NULL;
}
- if ((*ludpp)->lud_port == 0) {
+ if ((*ludpp)->lud_port == -1) {
if( strcmp((*ludpp)->lud_scheme, "ldap") == 0 ) {
(*ludpp)->lud_port = LDAP_PORT;
#ifdef LDAP_CONNECTIONLESS
--- openldap-2.3.27/servers/slapd/daemon.c 2006-05-11 14:33:31.000000000
-0400
+++ /homes/hny1/chitrav/bindport0/daemon.c 2007-04-19 12:35:25.814156154
-0400
@@ -683,7 +683,7 @@
struct sockaddr **sap;
#ifdef LDAP_PF_LOCAL
- if ( port == 0 ) {
+ if ( port == -1 ) {
*sal = ch_malloc(2 * sizeof(void *));
if (*sal == NULL) return -1;
@@ -866,12 +866,12 @@
return -1;
}
- if(! lud->lud_port ) lud->lud_port = LDAP_PORT;
+ if( lud->lud_port == -1 ) lud->lud_port = LDAP_PORT;
#else
l.sl_is_tls = ldap_pvt_url_scheme2tls( lud->lud_scheme );
- if(! lud->lud_port ) {
+ if( lud->lud_port == -1 ) {
lud->lud_port = l.sl_is_tls ? LDAPS_PORT : LDAP_PORT;
}
#endif
15 years, 9 months
(ITS#5294) ldapdelete gives error when too many entries
by chitrav@us.ibm.com
Full_Name: Chitra Vemkatramani
Version: 2.3.27
OS: Redhat
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (162.83.178.28)
The ldapdelete command does not have a sizelimit option. If I have a lot of
entries in my LDAP server and issue an ldapdelete command, the command fails
saying that there are too many entries (default seems to be 500). It would be
useful to have a -z <sizelimit> option for ldapdelete, as for ldapsearch, so
that I can use ldapdelete to delete sets of entries at a time.
thanks
-Chitra
15 years, 9 months
(ITS#5293) ldapdelete issue
by chitrav@us.ibm.com
Full_Name: Chitra Venkatramani
Version: 2.3.27
OS: Redhat
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (162.83.178.28)
I added a set of entries to the LDAP server, with sub directories, such as --
dn: cn=aa,ou=chitrav,o=ibm.com
dn: ou=bb,ou=chitrav,o=ibm.com
dn: cn=bb1,ou=bb,ou=chitrav,o=ibm.com
dn: ou=cc,ou=bb,ou=chitrav,o=ibm.com
dn: cn=cc1,ou=cc,ou=bb,ou=chitrav,o=ibm.com
when I tried to do an ldapdelete command with -r option, I get the following
error for every entry in the server, although all the entries do get deleted.
ldap_search: Server is unwilling to perform (53)
additional info: critical control unavailable in context
On looking at the ldapdelete.c source code, lines 390 and 391 say
c.ldctl_oid = LDAP_CONTROL_SUBENTRIES;
c.ldctl_iscritical = 1;
Marking the iscritical flag to 0, makes the error go away.
I am not sure what this control does. This seems like a bug though.
If so, please let me know what the fix should be, and in which release it will
be available.
Please let me know if you need any more information.
thanks
-Chitra
15 years, 9 months
(ITS#3429) schema download module
by raphael.ouazana@linagora.com
Hi,
Le Sam 15 décembre 2007 04:31, hyc(a)symas.com a écrit :
> I was looking at this code in relation to current HEAD/RE24, and things
have
> changed quite a bit. Given the ability to dynamically load schema into
cn=config, is there still a need for this module? (It is in fact the
changes
> made for dynamic schema manipulation in slapd that causes the
> compatibility
> issues with this module.)
I don't use this module anymore. Dynamic schema loading would be useful
to replace it by allowing replication of schema.
In fact I see only a case where the module is still useful: when I want to
get automatically the schema of some directory which is not very
respectful of LDAP standards, for example by providing attributes without
OID.
Regards,
Raphaël Ouazana.
15 years, 9 months
(ITS#5291) Client timeout dumps core
by daveh@coreng.com.au
Full_Name: Dave Horsfall
Version: 2.4.7
OS: FreeBSD 4.10-STABLE
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (192.65.182.30)
On setting the general client timeout with LDAP_OPT_TIMEOUT and performing
a search on a simulated hung server ("nc -l 389"), I get a coredump:
assertion "r != NULL" failed: file "error.c", line 272
GDB:
(gdb) bt
#0 0x28136748 in kill () from /usr/lib/libc.so.4
#1 0x2817803e in abort () from /usr/lib/libc.so.4
#2 0x28154033 in __assert () from /usr/lib/libc.so.4
#3 0x280bf519 in ldap_parse_result (ld=0x8050000, r=0x0, errcodep=0xbfbfdb2c,
matcheddnp=0x0, errmsgp=0x0, referralsp=0x0, serverctrls=0x0, freeit=0)
at error.c:272
#4 0x280bf455 in ldap_result2error (ld=0x8050000, r=0x0, freeit=0)
at error.c:222
#5 0x280c016d in ldap_search_s (ld=0x8050000, base=0x0, scope=2,
filter=0xbfbff450 "(uid=daveh)", attrs=0xbfbfdbd8, attrsonly=0,
res=0xbfbfdbe0) at search.c:392
#6 0x8049e9b in main (argc=0, argv=0xbfbff8b8) at lget.c:662
15 years, 9 months
(ITS#5289) test028 failed
by dieter@dkluenter.de
Full_Name: Dieter Kluenter
Version: HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (84.142.223.222)
test 028 fails with segmentation fault
gdb output
Reading symbols from
/work/ldap-src/servers/slapd/back-ldap/.libs/back_ldap-2-devel.so.0...done.
Loaded symbols for ../servers/slapd/back-ldap/.libs/back_ldap-2-devel.so.0
Reading symbols from
/work/ldap-src/servers/slapd/overlays/.libs/rwm-2-devel.so.0...done.
Loaded symbols for ../servers/slapd/overlays/.libs/rwm-2-devel.so.0
Core was generated by `/work/ldap-src/servers/slapd/.libs/lt-slapd -Ta -d 0 -f
/work/ldap-src/tests/te'.
Program terminated with signal 11, Segmentation fault.
#0 0xb78926d4 in rwm_cf_gen (c=0xbff812dc) at rwm.c:1771
1771 (struct ldaprwmap *)on->on_bi.bi_private;
(gdb) bt
#0 0xb78926d4 in rwm_cf_gen (c=0xbff812dc) at rwm.c:1771
#1 0x0806eb67 in config_set_vals (Conf=0xb789a228, c=0xbff812dc) at
config.c:314
#2 0x0806f049 in config_add_vals (Conf=0xb789a228, c=0xbff812dc) at
config.c:383
#3 0x080f05be in over_db_config (be=0x8275840, fname=0x822e008
"/work/ldap-src/tests/testrun/slapadd.conf", lineno=98,
argc=2, argv=0x8255648) at backover.c:151
#4 0x0807035f in read_config_file (fname=0x822e008
"/work/ldap-src/tests/testrun/slapadd.conf", depth=0, cf=0x0,
cft=0x81c88a0) at config.c:792
#5 0x080667c4 in read_config (fname=0x822e008
"/work/ldap-src/tests/testrun/slapadd.conf", dir=0x0) at bconfig.c:3455
#6 0x080f5d18 in slap_tool_init (progname=0x818a920 "slapadd", tool=1, argc=10,
argv=0xbff8ac74) at slapcommon.c:523
#7 0x080f3acc in slapadd (argc=10, argv=0xbff8ac74) at slapadd.c:73
#8 0x0805d013 in main (argc=10, argv=0xbff8ac74) at main.c:645
(gdb)
(gdb) down 0xb78926d4
#8 0x0805d013 in main (argc=10, argv=0xbff8ac74) at main.c:645
645 rc = tools[i].func( argc, argv
);
(gdb) down 0x0806eb67
#0 0xb78926d4 in rwm_cf_gen (c=0xbff812dc) at rwm.c:1771
1771 (struct ldaprwmap *)on->on_bi.bi_private;
(gdb)
-Dieter
15 years, 9 months