From: Arran Cudbard-Bell Date: Fri, 19 May 2023 19:15:53 +0000 (-0400) Subject: ldap: Better to specify a listener ID X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=890544e7365fa0df21ca9236bfd4e718f7bb1c3d;p=thirdparty%2Ffreeradius-server.git ldap: Better to specify a listener ID --- diff --git a/doc/schemas/ldap/openldap/freeradius-clients.ldif b/doc/schemas/ldap/openldap/freeradius-clients.ldif index 422db366ace..83b5beb45b3 100644 --- a/doc/schemas/ldap/openldap/freeradius-clients.ldif +++ b/doc/schemas/ldap/openldap/freeradius-clients.ldif @@ -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 ) ) diff --git a/doc/schemas/ldap/openldap/freeradius-clients.schema b/doc/schemas/ldap/openldap/freeradius-clients.schema index 4d3a57c8b98..09775a23218 100644 --- a/doc/schemas/ldap/openldap/freeradius-clients.schema +++ b/doc/schemas/ldap/openldap/freeradius-clients.schema @@ -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 ) ) diff --git a/doc/schemas/ldap/openldap/schema2ldif.sh b/doc/schemas/ldap/openldap/schema2ldif.sh index 69f7e8eb4ac..0b6327ab3f7 100755 --- a/doc/schemas/ldap/openldap/schema2ldif.sh +++ b/doc/schemas/ldap/openldap/schema2ldif.sh @@ -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' \