Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
88a1919e
Commit
88a1919e
authored
8 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
Fixes bugs introduced by latest sonar fixes
parent
c7eb542d
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
fusiondirectory-1.3.1
fusiondirectory-1.3
fusiondirectory-1.2.3
fusiondirectory-1.2.2
fusiondirectory-1.2.1
fusiondirectory-1.2
fusiondirectory-1.1.1
fusiondirectory-1.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/bin/fusiondirectory-insert-schema
+20
-20
contrib/bin/fusiondirectory-insert-schema
contrib/openldap/core-fd.schema
+0
-1
contrib/openldap/core-fd.schema
with
20 additions
and
21 deletions
+20
-21
contrib/bin/fusiondirectory-insert-schema
+
20
−
20
View file @
88a1919e
...
@@ -206,18 +206,18 @@ sub insert_schema
...
@@ -206,18 +206,18 @@ sub insert_schema
my
$dn_part
=
$
1
;
my
$dn_part
=
$
1
;
# if the schema already exists in the LDAP server, modify it
# if the schema already exists in the LDAP server, modify it
if
(
$modify
==
1
)
{
if
(
$modify
==
1
)
{
open
(
my
$schema
,
q{<}
,
$path
.
$schema
.
"
.ldif
")
or
die_with_error
('
Could not open
'
.
"
<
"
.
$path
.
$schema
.
"
.ldif: $!
");
open
(
my
$schema
file
,
q{<}
,
$path
.
$schema
.
"
.ldif
")
or
die_with_error
('
Could not open
'
.
"
<
"
.
$path
.
$schema
.
"
.ldif: $!
");
open
(
my
$update
,
q{>}
,
$path
.
$schema
.
"
_update.ldif
")
or
die_with_error
('
Could not open
'
.
"
>
"
.
$path
.
$schema
.
"
_update.ldif: $!
");
open
(
my
$update
file
,
q{>}
,
$path
.
$schema
.
"
_update.ldif
")
or
die_with_error
('
Could not open
'
.
"
>
"
.
$path
.
$schema
.
"
_update.ldif: $!
");
push
@gen_files
,
$path
.
$schema
.
"
_update
";
push
@gen_files
,
$path
.
$schema
.
"
_update
";
my
$attrs
=
0
;
my
$attrs
=
0
;
my
$classes
=
0
;
my
$classes
=
0
;
while
(
<
$schema
>
)
{
while
(
<
$schema
file
>
)
{
next
if
m/^#/
;
# remove comments
next
if
m/^#/
;
# remove comments
chomp
;
chomp
;
next
if
m/^$/
;
# remove empty lines
next
if
m/^$/
;
# remove empty lines
if
(
m/^dn: cn=([^,]+),cn=schema,cn=config$/
)
{
if
(
m/^dn: cn=([^,]+),cn=schema,cn=config$/
)
{
print
$update
"
dn:
$dn_part
,cn=schema,cn=config
\n
";
$update
file
->
print
(
"
dn:
$dn_part
,cn=schema,cn=config
\n
"
)
;
print
$update
"
changetype: modify
\n
";
$update
file
->
print
(
"
changetype: modify
\n
"
)
;
next
;
next
;
}
}
if
(
!
m/^olcAttributeTypes:/
&&
!
m/^olcObjectClasses:/
&&
!
m/^ /
)
{
if
(
!
m/^olcAttributeTypes:/
&&
!
m/^olcObjectClasses:/
&&
!
m/^ /
)
{
...
@@ -231,29 +231,29 @@ sub insert_schema
...
@@ -231,29 +231,29 @@ sub insert_schema
if
(
!
$attrs
&&
m/^olcAttributeTypes:/
)
{
if
(
!
$attrs
&&
m/^olcAttributeTypes:/
)
{
$attrs
=
1
;
$attrs
=
1
;
print
$update
"
replace: olcAttributeTypes
\n
";
$update
file
->
print
(
"
replace: olcAttributeTypes
\n
"
)
;
}
}
if
(
!
$classes
&&
m/^olcObjectClasses:/
)
{
if
(
!
$classes
&&
m/^olcObjectClasses:/
)
{
$classes
=
1
;
$classes
=
1
;
print
$update
"
-
\n
";
$update
file
->
print
(
"
-
\n
"
)
;
print
$update
"
replace: olcObjectClasses
\n
";
$update
file
->
print
(
"
replace: olcObjectClasses
\n
"
)
;
}
}
print
$update
;
$update
file
->
print
(
$_
)
;
print
$update
"
\n
";
$update
file
->
print
(
"
\n
"
)
;
}
}
close
$schema
;
$schema
file
->
close
()
;
close
$update
;
$update
file
->
close
()
;
}
else
{
# Emptying schema
}
else
{
# Emptying schema
open
(
my
$update
,
q{>}
,
$path
.
$schema
.
"
_update.ldif
")
or
die_with_error
('
Could not open
'
.
"
>
"
.
$path
.
$schema
.
"
_update.ldif: $!
");
open
(
my
$update
file
,
q{>}
,
$path
.
$schema
.
"
_update.ldif
")
or
die_with_error
('
Could not open
'
.
"
>
"
.
$path
.
$schema
.
"
_update.ldif: $!
");
push
@gen_files
,
$path
.
$schema
.
"
_update
";
push
@gen_files
,
$path
.
$schema
.
"
_update
";
print
$update
"
dn:
$dn_part
,cn=schema,cn=config
\n
";
$update
file
->
print
(
"
dn:
$dn_part
,cn=schema,cn=config
\n
"
)
;
print
$update
"
changetype: modify
\n
";
$update
file
->
print
(
"
changetype: modify
\n
"
)
;
print
$update
"
delete: olcAttributeTypes
\n
";
$update
file
->
print
(
"
delete: olcAttributeTypes
\n
"
)
;
print
$update
"
-
\n
";
$update
file
->
print
(
"
-
\n
"
)
;
print
$update
"
delete: olcObjectClasses
\n
";
$update
file
->
print
(
"
delete: olcObjectClasses
\n
"
)
;
print
$update
"
-
\n
";
$update
file
->
print
(
"
-
\n
"
)
;
close
$update
;
$update
file
->
close
()
;
}
}
$full_cmd
=
$mod_cmd
.
$path
.
$schema
.
"
_update.ldif
";
$full_cmd
=
$mod_cmd
.
$path
.
$schema
.
"
_update.ldif
";
print
"
executing '
$full_cmd
'
\n
";
print
"
executing '
$full_cmd
'
\n
";
...
...
This diff is collapsed.
Click to expand it.
contrib/openldap/core-fd.schema
+
0
−
1
View file @
88a1919e
...
@@ -108,4 +108,3 @@ objectclass ( 1.3.6.1.4.1.10098.1.2.1.19.19 NAME 'gosaSnapshotObject'
...
@@ -108,4 +108,3 @@ objectclass ( 1.3.6.1.4.1.10098.1.2.1.19.19 NAME 'gosaSnapshotObject'
objectclass ( 1.3.6.1.4.1.38414.62.2.1 NAME 'fdLockEntry' SUP top STRUCTURAL
objectclass ( 1.3.6.1.4.1.38414.62.2.1 NAME 'fdLockEntry' SUP top STRUCTURAL
DESC 'GOsa - Class for FD locking'
DESC 'GOsa - Class for FD locking'
MUST ( fdUserDn $ fdObjectDn $ cn $ fdLockTimestamp ))
MUST ( fdUserDn $ fdObjectDn $ cn $ fdLockTimestamp ))
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets