]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ldap: Better to specify a listener ID
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 19 May 2023 19:15:53 +0000 (15:15 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 20 May 2023 01:43:54 +0000 (21:43 -0400)
doc/schemas/ldap/openldap/freeradius-clients.ldif
doc/schemas/ldap/openldap/freeradius-clients.schema
doc/schemas/ldap/openldap/schema2ldif.sh

index 422db366ace9bc11202e633ae50f7395c612b148..83b5beb45b3328296b89839e2396e9fa21f2d1a7 100644 (file)
@@ -8,6 +8,5 @@ olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.4 NAME 'freeradiusClientVirtualSe
 olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.5 NAME 'freeradiusClientType' DESC 'Client Type' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
 olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.6 NAME 'freeradiusClientRequireMa' DESC 'Require Message Authenticator' EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
 olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.7 NAME 'freeradiusClientComment' DESC 'Client comment' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.8 NAME 'freeradiusClientProto' DESC 'Client Type' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.9 NAME 'freeradiusClientTransport' DESC 'Client Type' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-olcObjectClasses: ( 1.3.6.1.4.1.11344.4.1.1.1.1 NAME 'freeradiusClient' DESC 'freeradiusClient object class' SUP top STRUCTURAL MUST ( freeradiusClientIdentifier $ freeradiusClientSecret ) MAY ( freeradiusClientShortname $ freeradiusClientVirtualServer $ freeradiusClientType $ freeradiusClientRequireMa $ freeradiusClientComment $ freeradiusClientProto $ freeradiusClientTransport ) )
+olcAttributeTypes: ( 1.3.6.1.4.1.11344.4.1.1.2.8 NAME 'freeradiusClientListener' DESC 'Listener to bind client to' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+olcObjectClasses: ( 1.3.6.1.4.1.11344.4.1.1.1.1 NAME 'freeradiusClient' DESC 'freeradiusClient object class' SUP top STRUCTURAL MUST ( freeradiusClientIdentifier $ freeradiusClientSecret ) MAY ( freeradiusClientShortname $ freeradiusClientVirtualServer $ freeradiusClientType $ freeradiusClientRequireMa $ freeradiusClientComment $ freeradiusClientListener ) )
index 4d3a57c8b989636b570cd49e5ae0cc1d315d5bc7..09775a23218cdf6dd86e8e737a15a898784e0811 100644 (file)
@@ -68,17 +68,8 @@ attributetype ( 1.3.6.1.4.1.11344.4.1.1.2.7
  )
 
 attributetype ( 1.3.6.1.4.1.11344.4.1.1.2.8
-       NAME 'freeradiusClientProto'
-       DESC 'Client Type'
-       EQUALITY caseIgnoreMatch
-       SUBSTR caseIgnoreSubstringsMatch
-       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
-       SINGLE-VALUE
- )
-
-attributetype ( 1.3.6.1.4.1.11344.4.1.1.2.9
-       NAME 'freeradiusClientTransport'
-       DESC 'Client Type'
+       NAME 'freeradiusClientListener'
+       DESC 'Listener to bind client to'
        EQUALITY caseIgnoreMatch
        SUBSTR caseIgnoreSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
@@ -91,6 +82,6 @@ objectclass ( 1.3.6.1.4.1.11344.4.1.1.1.1
        SUP top
        STRUCTURAL
        MUST ( freeradiusClientIdentifier $ freeradiusClientSecret )
-       MAY ( freeradiusClientShortname $ freeradiusClientVirtualServer $ freeradiusClientType $ freeradiusClientRequireMa $ freeradiusClientComment $ freeradiusClientProto $ freeradiusClientTransport )
+       MAY ( freeradiusClientShortname $ freeradiusClientVirtualServer $ freeradiusClientType $ freeradiusClientRequireMa $ freeradiusClientComment $ freeradiusClientListener )
  )
 
index 69f7e8eb4ac7ecc7423d3f912e5690e5dec5cd2f..0b6327ab3f73a6c68852b6e8a78a14e9f89ce265 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+if [ -z "$1" ]; then
+  echo "Missing schema file"
+  exit 1
+fi
+
 SCHEMA_CONV_DIR="$(mktemp -d)"
 SCHEMA_IN=$1
 SCHEMA_NAME=${SCHEMA_IN%%.*}
@@ -14,6 +19,8 @@ EOF
 
 mkdir -p ${SCHEMA_CONV_DIR}/out
 
+echo "Converting ${SCHEMA_NAME} ${SCHEMA_IN} -> ${SCHEMA_OUT}"
+
 slapcat -o ldif-wrap=no -f ${SCHEMA_CONV_DIR}/convert.conf -F ${SCHEMA_CONV_DIR}/out -n 0 -H "ldap:///cn={0}${SCHEMA_NAME},cn=schema,cn=config" | sed -re 's/\{[0-9]+\}//' \
   -e '/^structuralObjectClass: /d' -e '/^entryUUID: /d' -e '/^creatorsName: /d' \
   -e '/^createTimestamp: /d' -e '/^entryCSN: /d' -e '/^modifiersName: /d' \