Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Dragoș Haiduc
OpenLDAP
Commits
945b556b
Commit
945b556b
authored
18 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
ITS#4587 testing.
parent
35781f39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/scripts/test006-acls
+130
-0
130 additions, 0 deletions
tests/scripts/test006-acls
with
130 additions
and
0 deletions
tests/scripts/test006-acls
+
130
−
0
View file @
945b556b
...
...
@@ -80,6 +80,136 @@ echo "# ... and should return all attributes if we're bound as anyone
$LDAPSEARCH
-b
"
$JAJDN
"
-h
$LOCALHOST
-p
$PORT1
\
-D
"
$BABSDN
"
-w
bjensen
"(objectclass=*)"
>>
$SEARCHOUT
2>&1
# check selfwrite access (ITS#4587). 6 attempts are made:
# 1) delete someone else (should fail)
# 2) delete self (should succeed)
# 3) add someone else (should fail)
# 4) add someone else and self (should fail)
# 5) add self and someone else (should fail)
# 6) add 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
$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
add: member
member: cn=Foo,ou=Bar
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
add: member
member: cn=Foo,ou=Bar
member:
$JAJDN
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
add: member
member:
$JAJDN
member: cn=Foo,ou=Bar
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
add: 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