diff options
author | Nathan Kinder <nkinder@redhat.com> | 2007-10-04 16:27:47 +0000 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2007-10-04 16:27:47 +0000 |
commit | 12127c38df19c27168ebf677ada16e4552e6b575 (patch) | |
tree | ba01de303433c70ba1a8a81c83604390e95ae4af /ldap/servers/slapd/attrsyntax.c | |
parent | fe47c6722271d7bc0bc9bef37244abbc8fa2d040 (diff) | |
download | ds-12127c38df19c27168ebf677ada16e4552e6b575.tar.gz ds-12127c38df19c27168ebf677ada16e4552e6b575.tar.xz ds-12127c38df19c27168ebf677ada16e4552e6b575.zip |
Resolves: 288321
Summary: Handle poorly formatted DN's when normalizing. Also only check modify values against authenticated DN for DN syntax attributes.
Diffstat (limited to 'ldap/servers/slapd/attrsyntax.c')
-rw-r--r-- | ldap/servers/slapd/attrsyntax.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c index 51661d79..1afa3c3d 100644 --- a/ldap/servers/slapd/attrsyntax.c +++ b/ldap/servers/slapd/attrsyntax.c @@ -731,6 +731,22 @@ slapi_attr_get_oid_copy( const Slapi_Attr *a, char **oidp ) } } +/* Returns the oid of the syntax of the Slapi_Attr that's passed in. + * The caller must dispose of oid by calling slapi_ch_free_string(). */ +int +slapi_attr_get_syntax_oid_copy( const Slapi_Attr *a, char **oidp ) +{ + void *pi = NULL; + + if (a && (slapi_attr_type2plugin(a->a_type, &pi) == 0)) { + *oidp = slapi_ch_strdup(plugin_syntax2oid(pi)); + return( 0 ); + } else { + *oidp = NULL; + return( -1 ); + } +} + #ifdef ATTR_LDAP_DEBUG PRIntn |