Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
lyz
backupninja
Commits
d15a347b
Commit
d15a347b
authored
18 years ago
by
micah
Browse files
Options
Downloads
Patches
Plain Diff
added some fixes from ale for the ldap handler
re-ordered the handler list in the changelog to be alpha
parent
5621db48
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/ldap
+13
-21
13 additions, 21 deletions
handlers/ldap
with
13 additions
and
21 deletions
handlers/ldap
+
13
−
21
View file @
d15a347b
...
...
@@ -15,7 +15,7 @@ getconf binddn
getconf ldaphost
getconf tls
yes
if
[
$tls
=
'yes'
]
if
[
$tls
=
'yes'
]
;
then
URLBASE
=
"ldaps"
else
URLBASE
=
"ldap"
...
...
@@ -54,25 +54,13 @@ if [ "$ldif" == "yes" ]; then
fi
if
[
"
$method
"
==
"slapcat"
]
;
then
if
[
"
$compress
"
==
"yes"
]
;
then
execstr
=
"
$SLAPCAT
-f
$conf
-b
$dbsuffix
|
$GZIP
"
else
execstr
=
"
$SLAPCAT
-f
$conf
-b
$dbsuffix
"
fi
execstr
=
"
$SLAPCAT
-f
$conf
-b
$dbsuffix
"
debug
"
$execstr
"
else
if
[
"
$compress
"
==
"yes"
]
;
then
if
[
-n
"
$ldaphost
"
]
execstr
=
"
$LDAPSEARCH
-H
$URLBASE
://
$ldaphost
-x -L -b ""
$dbsuffix
"" -D ""
$binddn
"" -y
$passwordfile
|
$GZIP
"
else
execstr
=
"
$LDAPSEARCH
-x -L -b ""
$dbsuffix
"" -D ""
$binddn
"" -y
$passwordfile
|
$GZIP
"
fi
if
[
-n
"
$ldaphost
"
]
;
then
execstr
=
"
$LDAPSEARCH
-H
$URLBASE
://
$ldaphost
-x -L -b ""
$dbsuffix
"" -D ""
$binddn
"" -y
$passwordfile
"
else
if
[
-n
"
$ldaphost
"
]
execstr
=
"
$LDAPSEARCH
-H
$URLBASE
://
$ldaphost
-x -L -b ""
$dbsuffix
"" -D ""
$binddn
"" -y
$passwordfile
"
else
execstr
=
"
$LDAPSEARCH
-x -L -b ""
$dbsuffix
"" -D ""
$binddn
"" -y
$passwordfile
"
fi
execstr
=
"
$LDAPSEARCH
-x -L -b ""
$dbsuffix
"" -D ""
$binddn
"" -y
$passwordfile
"
fi
[
-f
"
$passwordfile
"
]
||
fatal
"Password file
$passwordfile
not found. When method is set to ldapsearch, you must also specify a password file."
debug
"
$execstr
"
...
...
@@ -83,13 +71,17 @@ if [ "$ldif" == "yes" ]; then
/etc/init.d/slapd stop
fi
touch
$dumpdir
/
$dbsuffix
.ldif
if
[
!
-f
$dumpdir
/
$dbsuffix
.ldif
]
;
then
fatal
"Couldn't create ldif dump file:
$dumpdir
/
$dbsuffix
.ldif"
ext
=
if
[
"
$compress
"
==
"yes"
]
;
then
ext
=
".gz"
fi
touch
$dumpdir
/
$dbsuffix
.ldif
$ext
if
[
!
-f
$dumpdir
/
$dbsuffix
.ldif
$ext
]
;
then
fatal
"Couldn't create ldif dump file:
$dumpdir
/
$dbsuffix
.ldif
$ext
"
fi
if
[
"
$compress
"
==
"yes"
]
;
then
output
=
`
$execstr
>
$dumpdir
/
$dbsuffix
.ldif.gz
`
output
=
`
$execstr
|
$GZIP
>
$dumpdir
/
$dbsuffix
.ldif.gz
`
else
output
=
`
$execstr
>
$dumpdir
/
$dbsuffix
.ldif
`
fi
...
...
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