mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-03 20:40:05 -05:00
ITS#10356 libldap: implement LDAP_OPT_REFHOPLIMIT
This commit is contained in:
parent
585e6aa9a5
commit
76e1492809
4 changed files with 28 additions and 4 deletions
|
|
@ -295,10 +295,17 @@ or
|
|||
.BR outvalue
|
||||
must be
|
||||
.BR "int *" .
|
||||
.\".TP
|
||||
.\".B LDAP_OPT_REFHOPLIMIT
|
||||
.\"This option is OpenLDAP specific.
|
||||
.\"It is not currently implemented.
|
||||
.TP
|
||||
.B LDAP_OPT_REFHOPLIMIT
|
||||
Set the maximum number of referrals to chase for a request.
|
||||
.BR invalue
|
||||
must be
|
||||
.BR "const int *" ;
|
||||
.BR outvalue
|
||||
must be a
|
||||
.BR "int *" .
|
||||
They cannot be NULL.
|
||||
This option is OpenLDAP specific.
|
||||
.TP
|
||||
.B LDAP_OPT_RESTART
|
||||
Determines whether the library should implicitly restart connections (FIXME).
|
||||
|
|
|
|||
|
|
@ -208,6 +208,10 @@ Note that the command line tools
|
|||
.\".B RESTART <on/true/yes/off/false/no>
|
||||
.\"Determines whether the library should implicitly restart connections (FIXME).
|
||||
.TP
|
||||
.B REFHOPLIMIT <integer>
|
||||
Specified the maximum number of referrals to follow when performing a
|
||||
request. The number should be a positive integer. The default is 5.
|
||||
.TP
|
||||
.B SIZELIMIT <integer>
|
||||
Specifies a size limit (number of entries) to use when performing searches.
|
||||
The number should be a non-negative integer. \fISIZELIMIT\fP of zero (0)
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ static const struct ol_attribute {
|
|||
{0, ATTR_OPT_INT, "VERSION", NULL, LDAP_OPT_PROTOCOL_VERSION},
|
||||
{0, ATTR_KV, "DEREF", deref_kv, /* or &deref_kv[0] */
|
||||
offsetof(struct ldapoptions, ldo_deref)},
|
||||
{0, ATTR_INT, "REFHOPLIMIT", NULL,
|
||||
offsetof(struct ldapoptions, ldo_refhoplimit)},
|
||||
{0, ATTR_INT, "SIZELIMIT", NULL,
|
||||
offsetof(struct ldapoptions, ldo_sizelimit)},
|
||||
{0, ATTR_INT, "TIMELIMIT", NULL,
|
||||
|
|
|
|||
|
|
@ -216,6 +216,11 @@ ldap_get_option(
|
|||
rc = LDAP_OPT_SUCCESS;
|
||||
break;
|
||||
|
||||
case LDAP_OPT_REFHOPLIMIT:
|
||||
* (int *) outvalue = lo->ldo_refhoplimit;
|
||||
rc = LDAP_OPT_SUCCESS;
|
||||
break;
|
||||
|
||||
case LDAP_OPT_SIZELIMIT:
|
||||
* (int *) outvalue = lo->ldo_sizelimit;
|
||||
rc = LDAP_OPT_SUCCESS;
|
||||
|
|
@ -836,6 +841,7 @@ ldap_set_option(
|
|||
|
||||
/* options which cannot withstand invalue == NULL */
|
||||
case LDAP_OPT_DEREF:
|
||||
case LDAP_OPT_REFHOPLIMIT:
|
||||
case LDAP_OPT_SIZELIMIT:
|
||||
case LDAP_OPT_TIMELIMIT:
|
||||
case LDAP_OPT_PROTOCOL_VERSION:
|
||||
|
|
@ -881,6 +887,11 @@ ldap_set_option(
|
|||
rc = LDAP_OPT_SUCCESS;
|
||||
break;
|
||||
|
||||
case LDAP_OPT_REFHOPLIMIT:
|
||||
lo->ldo_refhoplimit = * (const int *) invalue;
|
||||
rc = LDAP_OPT_SUCCESS;
|
||||
break;
|
||||
|
||||
case LDAP_OPT_SIZELIMIT:
|
||||
/* FIXME: check value for protocol compliance? */
|
||||
lo->ldo_sizelimit = * (const int *) invalue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue