mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
hardcode "uid" into slapd & improve previous commit
This commit is contained in:
parent
b70d375964
commit
f3a959970e
@ -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;
|
||||
|
@ -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' )
|
||||
|
@ -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 "
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user