Compare commits
6 Commits
2.6.2/mast
...
dist/eole/
Author | SHA1 | Date | |
---|---|---|---|
87fd2fa1ad | |||
613b33236c | |||
ff8eb3a042 | |||
87e015fd63 | |||
2b1dae6ed0 | |||
6296504eed |
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
7
|
14
debian/control
vendored
Normal file
14
debian/control
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Source: eole-cadolesldap
|
||||||
|
Section: web
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: CADOLES <contact@cadoles.com>
|
||||||
|
Build-Depends: debhelper (>= 7.0.50)
|
||||||
|
Standards-Version: 3.8.4
|
||||||
|
Homepage: https://forge.cadoles.com/Cadoles/cadolesldap
|
||||||
|
Vcs-Git: https://forge.cadoles.com/Cadoles/cadolesldap.git
|
||||||
|
Vcs-Browser: https://forge.cadoles.com/Cadoles/cadolesldap.git
|
||||||
|
|
||||||
|
Package: eole-cadolesldap
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends}, eole-annuaire
|
||||||
|
Description: Templates cadolesldap.
|
44
debian/copyright
vendored
Normal file
44
debian/copyright
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Format: http://dep.debian.net/deps/dep5
|
||||||
|
Upstream-Name: {PROJECT}
|
||||||
|
Source: {URL}
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: YEAR {UPSTREAM} {AUTHOR} <{MAIL}>
|
||||||
|
License: {UPSTREAM LICENSE}
|
||||||
|
|
||||||
|
Files: debian/*
|
||||||
|
Copyright: Cadoles <contact@cadoles.com>
|
||||||
|
License: CeCILL-2
|
||||||
|
|
||||||
|
License: {UPSTREAM LICENSE}
|
||||||
|
{TEXT OF THE LICENSE}
|
||||||
|
|
||||||
|
License: CeCILL-2
|
||||||
|
This software is governed by the CeCILL-2 license under French law and
|
||||||
|
abiding by the rules of distribution of free software. You can use,
|
||||||
|
modify and or redistribute the software under the terms of the CeCILL-2
|
||||||
|
license as circulated by CEA, CNRS and INRIA at the following URL
|
||||||
|
"http://www.cecill.info";.
|
||||||
|
.
|
||||||
|
As a counterpart to the access to the source code and rights to copy,
|
||||||
|
modify and redistribute granted by the license, users are provided only
|
||||||
|
with a limited warranty and the software's author, the holder of the
|
||||||
|
economic rights, and the successive licensors have only limited
|
||||||
|
liability.
|
||||||
|
.
|
||||||
|
In this respect, the user's attention is drawn to the risks associated
|
||||||
|
with loading, using, modifying and/or developing or reproducing the
|
||||||
|
software by the user in light of its specific status of free software,
|
||||||
|
that may mean that it is complicated to manipulate, and that also
|
||||||
|
therefore means that it is reserved for developers and experienced
|
||||||
|
professionals having in-depth computer knowledge. Users are therefore
|
||||||
|
encouraged to load and test the software's suitability as regards their
|
||||||
|
requirements in conditions enabling the security of their systems and/or
|
||||||
|
data to be ensured and, more generally, to use and operate it in the
|
||||||
|
same conditions as regards security.
|
||||||
|
.
|
||||||
|
The fact that you are presently reading this means that you have had
|
||||||
|
knowledge of the CeCILL-2 license and that you accept its terms.
|
||||||
|
.
|
||||||
|
On Eole systems, the complete text of the CeCILL-2 License can be found
|
||||||
|
in '/usr/share/common-licenses/CeCILL-2-en'.
|
3
debian/gbp.conf
vendored
Normal file
3
debian/gbp.conf
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Set per distribution debian tag
|
||||||
|
[DEFAULT]
|
||||||
|
debian-tag = debian/envole/%(version)s
|
20
debian/rules
vendored
Executable file
20
debian/rules
vendored
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
dh_install -peole-draaf --exclude=slapd.conf.patch \
|
||||||
|
--exclude=cas.inc.php.tmpl.patch \
|
||||||
|
--exclude=25-bdd-admin \
|
||||||
|
--exclude=25_bdd_server.xml
|
||||||
|
dh_install -pdraaf-apps
|
||||||
|
dh_install -pdraaf-lemontheme
|
||||||
|
dh_install -pdraaf-envoletheme
|
||||||
|
dh_install -pdraaf-ldap
|
||||||
|
dh_install -pdraaf-patchsso
|
||||||
|
dh_install -pdraaf-bdd
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
3.0 (native)
|
96
ldap/schema/eole/cadoles.schema-2.ldif
Normal file
96
ldap/schema/eole/cadoles.schema-2.ldif
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.1
|
||||||
|
schemaIdGuid:: BS9z8eJKvYZ+lS8OJgeC1g==
|
||||||
|
cn: cadolesPerson
|
||||||
|
name: cadolesPerson
|
||||||
|
lDAPDisplayName: cadolesPerson
|
||||||
|
description: Description Personne Cadoles
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: givensName
|
||||||
|
mayContain: usualname
|
||||||
|
mayContain: birthdate
|
||||||
|
mayContain: birthcountry
|
||||||
|
mayContain: birthplace
|
||||||
|
mayContain: gender
|
||||||
|
mayContain: job
|
||||||
|
mayContain: position
|
||||||
|
mayContain: belongingpopulation
|
||||||
|
mayContain: authlevel
|
||||||
|
defaultObjectCategory: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.2
|
||||||
|
schemaIdGuid:: 7pJbNueSjwpq7TsL2aiW1w==
|
||||||
|
cn: cadolesSiren
|
||||||
|
name: cadolesSiren
|
||||||
|
lDAPDisplayName: cadolesSiren
|
||||||
|
description: Siren
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: siren
|
||||||
|
mayContain: niveau01
|
||||||
|
defaultObjectCategory: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.3
|
||||||
|
schemaIdGuid:: BOOf/nwBuCFehtpsyYrLjA==
|
||||||
|
cn: cadolesSiret
|
||||||
|
name: cadolesSiret
|
||||||
|
lDAPDisplayName: cadolesSiret
|
||||||
|
description: Siret
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: siret
|
||||||
|
mayContain: postalAddress
|
||||||
|
mayContain: niveau02
|
||||||
|
defaultObjectCategory: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.4
|
||||||
|
schemaIdGuid:: IPc/rPzhpAjekHrvXgdI8w==
|
||||||
|
cn: cadolesGroup
|
||||||
|
name: cadolesGroup
|
||||||
|
lDAPDisplayName: cadolesGroup
|
||||||
|
description: Descirption Groupe Cadoles
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: cadolesMember
|
||||||
|
defaultObjectCategory: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
@ -297,100 +297,3 @@ description: Label Etablissement
|
|||||||
attributeSyntax: 2.5.5.12
|
attributeSyntax: 2.5.5.12
|
||||||
oMSyntax: 64
|
oMSyntax: 64
|
||||||
isSingleValued: TRUE
|
isSingleValued: TRUE
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.1
|
|
||||||
schemaIdGuid:: BS9z8eJKvYZ+lS8OJgeC1g==
|
|
||||||
cn: cadolesPerson
|
|
||||||
name: cadolesPerson
|
|
||||||
lDAPDisplayName: cadolesPerson
|
|
||||||
description: Description Personne Cadoles
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: givensName
|
|
||||||
mayContain: usualname
|
|
||||||
mayContain: birthdate
|
|
||||||
mayContain: birthcountry
|
|
||||||
mayContain: birthplace
|
|
||||||
mayContain: gender
|
|
||||||
mayContain: job
|
|
||||||
mayContain: position
|
|
||||||
mayContain: belongingpopulation
|
|
||||||
mayContain: authlevel
|
|
||||||
defaultObjectCategory: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.2
|
|
||||||
schemaIdGuid:: 7pJbNueSjwpq7TsL2aiW1w==
|
|
||||||
cn: cadolesSiren
|
|
||||||
name: cadolesSiren
|
|
||||||
lDAPDisplayName: cadolesSiren
|
|
||||||
description: Siren
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: siren
|
|
||||||
mayContain: niveau01
|
|
||||||
defaultObjectCategory: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.3
|
|
||||||
schemaIdGuid:: BOOf/nwBuCFehtpsyYrLjA==
|
|
||||||
cn: cadolesSiret
|
|
||||||
name: cadolesSiret
|
|
||||||
lDAPDisplayName: cadolesSiret
|
|
||||||
description: Siret
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: siret
|
|
||||||
mayContain: postalAddress
|
|
||||||
mayContain: niveau02
|
|
||||||
defaultObjectCategory: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.4
|
|
||||||
schemaIdGuid:: IPc/rPzhpAjekHrvXgdI8w==
|
|
||||||
cn: cadolesGroup
|
|
||||||
name: cadolesGroup
|
|
||||||
lDAPDisplayName: cadolesGroup
|
|
||||||
description: Descirption Groupe Cadoles
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: cadolesMember
|
|
||||||
defaultObjectCategory: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
|
69
postservice/91-cadolesldap
Executable file
69
postservice/91-cadolesldap
Executable file
@ -0,0 +1,69 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Initialisation of LDAP Directory
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run command as particular user
|
||||||
|
#
|
||||||
|
function runAs() {
|
||||||
|
USER=${1}
|
||||||
|
shift
|
||||||
|
CMD="su ${USER} -s /bin/bash -c ${@}"
|
||||||
|
|
||||||
|
eval ${CMD}
|
||||||
|
return ${?}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addLDAPschema()
|
||||||
|
{
|
||||||
|
LDIF="/etc/cadolesldap/init/cadolesldap.ldif"
|
||||||
|
USER="openldap"
|
||||||
|
CMD="\"slapadd -l ${LDIF} -f \"/etc/ldap/slapd.conf\"\""
|
||||||
|
|
||||||
|
service slapd stop
|
||||||
|
runAs ${USER} ${CMD}
|
||||||
|
result=$((result+${?}))
|
||||||
|
service slapd start
|
||||||
|
return ${result}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addADSchema()
|
||||||
|
{
|
||||||
|
/usr/share/eole/sbin/cadoles_add_schema.sh
|
||||||
|
return ${?}
|
||||||
|
}
|
||||||
|
|
||||||
|
function main()
|
||||||
|
{
|
||||||
|
MODE=${1}
|
||||||
|
result=0
|
||||||
|
|
||||||
|
|
||||||
|
if [[ ${MODE} == "instance" ]]
|
||||||
|
then
|
||||||
|
if [[ $(CreoleGet eole_module) == "seth" ]]
|
||||||
|
then
|
||||||
|
addADSchema
|
||||||
|
return ${?}
|
||||||
|
else
|
||||||
|
addLDAPschema
|
||||||
|
return ${?}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $(CreoleGet eole_module eolebase) != "seth" ]]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
||||||
|
then
|
||||||
|
main $@
|
||||||
|
exit ${?}
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
@ -55,6 +55,11 @@ function main()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ $(CreoleGet eole_module eolebase) == "seth" ]]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
||||||
then
|
then
|
||||||
main $@
|
main $@
|
||||||
|
@ -33,23 +33,23 @@ RETURNED=$(ldbsearch --option="dsdb:schema update allowed"=true -H /var/lib/samb
|
|||||||
|
|
||||||
if [ "$RETURNED" = "# returned 0 records" ]; then
|
if [ "$RETURNED" = "# returned 0 records" ]; then
|
||||||
# Import schema
|
# Import schema
|
||||||
SCHEMAS="cadoles.schema"
|
SCHEMAS="cadoles.schema cadoles.schema-2"
|
||||||
PRIVATE_DIR=/etc/eole/private
|
PRIVATE_DIR=/etc/eole/private
|
||||||
|
|
||||||
for schema in $SCHEMAS
|
for schema in $SCHEMAS
|
||||||
do
|
do
|
||||||
updateSchemaDN "{DNCONFIG}" "${DN}" /etc/ldap/schema/eole/${schema}.ldif
|
updateSchemaDN "{DNCONFIG}" "${DN}" /etc/ldap/schema/eole/${schema}.ldif
|
||||||
if [[ $? -ne 0 ]]
|
if [[ $? -ne 0 ]]
|
||||||
then
|
then
|
||||||
echo "Error updating DN for ${schema}"
|
echo "Error updating DN for ${schema}"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
ldbmodify -H /var/lib/samba/private/sam.ldb /etc/ldap/schema/eole/${schema}.ldif --option="dsdb:schema update allowed"=true
|
ldbmodify -H /var/lib/samba/private/sam.ldb /etc/ldap/schema/eole/${schema}.ldif --option="dsdb:schema update allowed"=true
|
||||||
if [[ $? -ne 0 ]]
|
if [[ $? -ne 0 ]]
|
||||||
then
|
then
|
||||||
echo "Error updating Schema ${schema} !!"
|
echo "Error updating Schema ${schema} !!"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user