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
f6e4f202
Commit
f6e4f202
authored
18 years ago
by
Pierangelo Masarati
Browse files
Options
Downloads
Patches
Plain Diff
test for ITS#4587; another bit of fix for that
parent
adba963c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
servers/slapd/acl.c
+5
-0
5 additions, 0 deletions
servers/slapd/acl.c
tests/data/acl.out.master
+0
-1
0 additions, 1 deletion
tests/data/acl.out.master
tests/data/slapd-acl.conf
+1
-0
1 addition, 0 deletions
tests/data/slapd-acl.conf
tests/scripts/test006-acls
+41
-0
41 additions, 0 deletions
tests/scripts/test006-acls
with
47 additions
and
1 deletion
servers/slapd/acl.c
+
5
−
0
View file @
f6e4f202
...
...
@@ -700,6 +700,11 @@ acl_mask_dn(
/* check if the target is an attribute. */
if
(
val
==
NULL
)
return
1
;
/* a DN must be present */
if
(
BER_BVISEMPTY
(
opndn
)
)
{
return
1
;
}
/* target is attribute, check if the attribute value
* is the op dn.
*/
...
...
This diff is collapsed.
Click to expand it.
tests/data/acl.out.master
+
0
−
1
View file @
f6e4f202
...
...
@@ -68,7 +68,6 @@ member: cn=Jane Doe,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=John Doe,ou=Information Technology Division,ou=People,dc=example,dc
=com
member: cn=Mark Elliot,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com
member: cn=James A Jones 2,ou=Information Technology Division,ou=People,dc=exa
mple,dc=com
member: cn=Jennifer Smith,ou=Alumni Association,ou=People,dc=example,dc=com
...
...
This diff is collapsed.
Click to expand it.
tests/data/slapd-acl.conf
+
1
−
0
View file @
f6e4f202
...
...
@@ -110,6 +110,7 @@ access to dn.children="ou=Alumni Association,ou=People,dc=example,dc=com"
#access to attrs=member,uniquemember dn.subtree="dc=example,dc=com"
access
to
attrs
=
member
,
uniquemember
by
dn
.
exact
=
"cn=James A Jones 1,ou=Alumni Association,ou=People,dc=example,dc=com"
selfwrite
by
dnattr
=
member
selfwrite
by
dnattr
=
uniquemember
selfwrite
by
*
read
...
...
This diff is collapsed.
Click to expand it.
tests/scripts/test006-acls
+
41
−
0
View file @
f6e4f202
...
...
@@ -103,6 +103,47 @@ $LDAPSEARCH -h $LOCALHOST -p $PORT1 \
-D
"
$BJORNSDN
"
-w
bjorn
\
-b
"
$BABSDN
"
-s
base
"(objectclass=*)"
cn
>>
$SEARCHOUT
2>&1
# check selfwrite access (ITS#4587). Two attempts are made:
# 1) delete someone else (should fail)
# 2) delete self (should succeed)
#
$LDAPMODIFY
-D
"
$JAJDN
"
-h
$LOCALHOST
-p
$PORT1
-w
jaj
>>
\
$TESTOUT
2>&1
<<
EOMODS
dn: cn=All Staff,ou=Groups,dc=example,dc=com
changetype: modify
delete: member
member:
$BABSDN
EOMODS
RC
=
$?
case
$RC
in
50
)
;;
0
)
echo
"ldapmodify should have failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
-1
;;
*
)
echo
"ldapmodify failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
;;
esac
$LDAPMODIFY
-D
"
$JAJDN
"
-h
$LOCALHOST
-p
$PORT1
-w
jaj
>>
\
$TESTOUT
2>&1
<<
EOMODS
dn: cn=All Staff,ou=Groups,dc=example,dc=com
changetype: modify
delete: member
member:
$JAJDN
EOMODS
RC
=
$?
if
test
$RC
!=
0
;
then
echo
"ldapmodify failed (
$RC
)!"
test
$KILLSERVERS
!=
no
&&
kill
-HUP
$KILLPIDS
exit
$RC
fi
#
# Check group access. Try to modify Babs' entry. Two attempts:
# 1) bound as "James A Jones 1" - should fail
...
...
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