Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
182903d9
Commit
182903d9
authored
17 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#4987
parent
03308148
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES
+1
-0
1 addition, 0 deletions
CHANGES
doc/man/man5/slapo-constraint.5
+38
-14
38 additions, 14 deletions
doc/man/man5/slapo-constraint.5
servers/slapd/overlays/constraint.c
+475
-292
475 additions, 292 deletions
servers/slapd/overlays/constraint.c
with
514 additions
and
306 deletions
CHANGES
+
1
−
0
View file @
182903d9
...
...
@@ -7,6 +7,7 @@ OpenLDAP 2.4.8 Engineering
Fixed slapd non-atomic signal variables (ITS#5248)
Fixed slapd overlay ordering when moving to slapd.d (ITS#5284)
Fixed slapd-ldif delete (ITS#5265)
Added slapo-constraint cross-attribute constraints (ITS#4987)
Added slapo-translucent local searching (ITS#5283)
Fixed test047 to skip if rwm is not available (ITS#5292)
Build Environment
...
...
This diff is collapsed.
Click to expand it.
doc/man/man5/slapo-constraint.5
+
38
−
14
View file @
182903d9
.TH SLAPO-CONSTRAINT 5 "RELEASEDATE" "OpenLDAP LDVERSION"
.\" Copyright 2005-2006 Hewlett-Packard Company
.\" Copyright 2006-2007 The OpenLDAP Foundation All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.\" $OpenLDAP$
.SH NAME
slapo-constraint \- Attribute Constraint Overlay to slapd
.SH SYNOPSIS
ETCDIR/slapd.conf
.SH DESCRIPTION
The constraint overlay is used to en
force a regular expression
constraint
on all values of specified attributes.
Attributes can
The constraint overlay is used to en
sure that attribute values match
some
constraint
s beyond basic LDAP syntax.
Attributes can
have multiple constraints placed upon them, and all must be satisfied
when modifying an attribute value under constraint.
.LP
...
...
@@ -25,33 +27,55 @@ directive.
.B constraint_attribute <attribute_name> <type> <value>
Specifies the constraint which should apply to the attribute named as
the first parameter.
At the moment only one type of constraint is supported -
.B
regex.
Two types of constraint are currently supported -
.B regex
and
.BR uri .
The parameter following the
.B
regex
.B regex
type is a Unix style regular expression (See
.B
regex(7))
.BR regex (7)
). The parameter following the
.B uri
type is an LDAP URI. The URI will be evaluated using an internal search.
It must not include a hostname, and it must include a list of attributes
to evaluate.
Any attempt to add or modify an attribute named as part of the
constraint overlay specification which does not fit the
regular
expression
constraint listed will fail with a
constraint overlay specification which does not fit the
constraint listed will fail with a
LDAP_CONSTRAINT_VIOLATION error.
.SH EXAMPLES
.B
.LP
.RS
.nf
overlay constraint
constraint_attribute mail regex ^[:alnum:]+@mydomain.com$
constraint_attribute title uri
ldap:///dc=catalog,dc=example,dc=com?title?sub?(objectClass=titleCatalog)
.fi
A specification like the above would reject any
.B
mail
.B mail
attribute which did not look like
.B
<alpha-numeric string>@mydomain.com
It would also reject any
.B title
attribute whose values were not listed in the
.B title
attribute of any
.B titleCatalog
entries in the given scope.
.RE
.SH FILES
.TP
ETCDIR/slapd.conf
default slapd configuration file
.SH SEE ALSO
.BR slapd.conf (5).
.SH ACKNOWLEDGEMENTS
This module was written in 2005 by Neil Dunbar of Hewlett-Packard and subsequently
extended by Howard Chu and Emmanuel Dreyfus.
.so ../Project
This diff is collapsed.
Click to expand it.
servers/slapd/overlays/constraint.c
+
475
−
292
View file @
182903d9
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment