]> git.sur5r.net Git - openldap/commitdiff
hardcode "uid" into slapd & improve previous commit
authorPierangelo Masarati <ando@openldap.org>
Tue, 7 Dec 2004 10:01:48 +0000 (10:01 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 7 Dec 2004 10:01:48 +0000 (10:01 +0000)
servers/slapd/sasl.c
servers/slapd/schema/core.schema
servers/slapd/schema_prep.c
servers/slapd/slap.h

index 1dcd8bbe95930ceb5f7283ad83f9bb332b095151..b5c6b0b9904dd1078ffd00412f459f6e2787b00f 100644 (file)
@@ -1609,7 +1609,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, struct berval *id,
                irdn = 0;
                DN[ irdn ] = RDNs[ irdn ];
                RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
-               BER_BVSTR( &AVAs[ irdn ].la_attr, "uid" );
+               AVAs[ irdn ].la_attr = slap_schema.si_ad_uid->ad_cname;
                AVAs[ irdn ].la_value = *dn;
                AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
                AVAs[ irdn ].la_private = NULL;
@@ -1619,7 +1619,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, struct berval *id,
                        irdn++;
                        DN[ irdn ] = RDNs[ irdn ];
                        RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
-                       BER_BVSTR( &AVAs[ irdn ].la_attr, "cn" );
+                       AVAs[ irdn ].la_attr = slap_schema.si_ad_cn->ad_cname;
                        ber_str2bv( user_realm, 0, 0, &AVAs[ irdn ].la_value );
                        AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
                        AVAs[ irdn ].la_private = NULL;
@@ -1630,7 +1630,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, struct berval *id,
                        irdn++;
                        DN[ irdn ] = RDNs[ irdn ];
                        RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
-                       BER_BVSTR( &AVAs[ irdn ].la_attr, "cn" );
+                       AVAs[ irdn ].la_attr = slap_schema.si_ad_cn->ad_cname;
                        AVAs[ irdn ].la_value = *mech;
                        AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
                        AVAs[ irdn ].la_private = NULL;
@@ -1640,7 +1640,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, struct berval *id,
                irdn++;
                DN[ irdn ] = RDNs[ irdn ];
                RDNs[ irdn ][ 0 ] = &AVAs[ irdn ];
-               BER_BVSTR( &AVAs[ irdn ].la_attr, "cn" );
+               AVAs[ irdn ].la_attr = slap_schema.si_ad_cn->ad_cname;
                BER_BVSTR( &AVAs[ irdn ].la_value, "auth" );
                AVAs[ irdn ].la_flags = LDAP_AVA_NULL;
                AVAs[ irdn ].la_private = NULL;
index 31a9ba64feb8de274a2112a21e36dabe53ace930..8c6603074e51953ac2af44191110189a985b43c3 100644 (file)
@@ -525,12 +525,12 @@ objectclass ( 1.3.6.1.4.1.250.3.15 NAME 'labeledURIObject'
 #
 # Derived from RFC 1274, but with new "short names"
 #
-attributetype ( 0.9.2342.19200300.100.1.1
-       NAME ( 'uid' 'userid' )
-       DESC 'RFC1274: user identifier'
-       EQUALITY caseIgnoreMatch
-       SUBSTR caseIgnoreSubstringsMatch
-       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
+#attributetype ( 0.9.2342.19200300.100.1.1
+#      NAME ( 'uid' 'userid' )
+#      DESC 'RFC1274: user identifier'
+#      EQUALITY caseIgnoreMatch
+#      SUBSTR caseIgnoreSubstringsMatch
+#      SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
 
 attributetype ( 0.9.2342.19200300.100.1.3
        NAME ( 'mail' 'rfc822Mailbox' )
index 4eca5045cc746db488411e7f2c49cb90c5ecc3e1..ac9805c67b4349dad82347ed0546f3cb5ef1161d 100644 (file)
@@ -907,6 +907,15 @@ static struct slap_schema_ad_map {
                NULL, NULL,
                NULL, NULL, NULL, NULL, NULL,
                offsetof(struct slap_internal_schema, si_ad_cn) },
+       { "uid", "( 0.9.2342.19200300.100.1.1 NAME ( 'uid' 'userid' ) "
+                       "DESC 'RFC1274: user identifier' "
+                       "EQUALITY caseIgnoreMatch "
+                       "SUBSTR caseIgnoreSubstringsMatch "
+                       "SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )",
+               NULL, 0,
+               NULL, NULL,
+               NULL, NULL, NULL, NULL, NULL,
+               offsetof(struct slap_internal_schema, si_ad_uid) },
        { "userPassword", "( 2.5.4.35 NAME 'userPassword' "
                        "DESC 'RFC2256/2307: password of user' "
                        "EQUALITY octetStringMatch "
index 43382079322664f6e9e30f5d23e421cd95bec417..22dc51eb67b5a54309a0ad5886d367d0ab31965a 100644 (file)
@@ -848,6 +848,7 @@ struct slap_internal_schema {
        AttributeDescription *si_ad_distinguishedName;
        AttributeDescription *si_ad_name;
        AttributeDescription *si_ad_cn;
+       AttributeDescription *si_ad_uid;
        AttributeDescription *si_ad_userPassword;
        AttributeDescription *si_ad_labeledURI;
 #ifdef SLAPD_AUTHPASSWD