Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
4f3961fa
Commit
4f3961fa
authored
Aug 11, 2014
by
Côme Bernigaud
Committed by
Benoit Mortier
Aug 11, 2014
Browse files
Fixes
#3236
Fixed admin check after people branch creation
parent
87dc65a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/bin/fusiondirectory-setup
View file @
4f3961fa
...
...
@@ -906,11 +906,13 @@ sub check_ldap {
my
$admin_add
=
"";
# Collect existing people branches (even if main one may not exists);
my
$people
=
$ldap
->
search
(
base
=>
$base
,
filter
=>
$peopleou
);
$people
->
code
&&
die
$people
->
error
;
my
@people_entries
=
map
{
$_
->
dn
}
@
{
$people
->
entries
};
# if ou=people exists
if
(
branch_exists
(
$ldap
,
"
$peopleou
,
$base
")
)
{
my
$people
=
$ldap
->
search
(
base
=>
$base
,
filter
=>
$peopleou
);
$people
->
code
&&
die
$people
->
error
;
my
@people_entries
=
map
{
$_
->
dn
}
@
{
$people
->
entries
};
check_admin
(
$base
,
$ldap
,
\
@people_entries
);
# if ou=people doesn't exists
...
...
@@ -921,6 +923,8 @@ sub check_ldap {
if
(
ask_yn_question
("
Do you want to create it ?:
")
)
{
create_branch
(
$ldap
,
$base
,
$oupeople
);
$admin_add
=
add_ldap_admin
(
$base
,
$ldap
);
push
@people_entries
,
"
$peopleou
,
$base
";
check_admin
(
$base
,
$ldap
,
\
@people_entries
);
return
-
1
if
(
$admin_add
eq
"
-1
");
}
else
{
print
("
Skiping...
\n
");
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment