share: ajout schéma PSL (#22917)

This commit is contained in:
Benjamin Dauvergne 2018-04-27 10:08:08 +02:00
parent ce4536e4ac
commit 0a071649f7
6 changed files with 33 additions and 0 deletions

15
lib/load-psl-schema Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e -x
LDIFDIR=/usr/share/slapd-supann
DN=`ldapsearch -H ldapi:// -Y EXTERNAL -b cn=schema,cn=config "cn=*}psl" "" 2>/dev/null | grep ^dn | head -n1 | sed 's/^dn: //'`
if [ "$DN" ]; then
# schema already loaded
COUNTER=`echo $DN | sed 's/.*{\([0-9]*\)}psl.*/\1/'1`
slapd-supann import <(sed "s/cn=psl/cn={$COUNTER}psl/;s/cn: psl/cn: {$COUNTER}psl/" ${LDIFDIR}/psl.ldif)
else
slapd-supann import ${LDIFDIR}/psl.ldif
fi

1
lib/load-psl-schema.help Normal file
View File

@ -0,0 +1 @@
charge le schéma spécifique à PSL

0
lib/newdb.help Executable file → Normal file
View File

0
lib/restore.help Executable file → Normal file
View File

0
lib/save.help Executable file → Normal file
View File

17
share/psl.ldif Normal file
View File

@ -0,0 +1,17 @@
dn: cn=psl,cn=schema,cn=config
cn: psl
objectClass: olcSchemaConfig
#
################################################################################
#
olcAttributeTypes: ( 1.3.6.1.4.1.49755.1021.3.1
NAME 'pslBadgeCSN'
DESC 'CSN du badge Mifare du membre PSL'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{14})
olcObjectClasses: ( 1.3.6.1.4.1.49755.1021.4.1
NAME 'pslPerson'
DESC 'membre de PSL'
SUP top
AUXILIARY
MAY (pslBadgeCSN) )