diff options
| author | Nathan Kinder <nkinder@redhat.com> | 2009-12-11 08:54:16 -0800 |
|---|---|---|
| committer | Nathan Kinder <nkinder@redhat.com> | 2009-12-11 08:54:16 -0800 |
| commit | 9f337eb80b6446c2f99eef600f55392dbf4970cb (patch) | |
| tree | 757b33e9ae5d21719bf5f23f8815617979c61a46 | |
| parent | 99ac483608108e04e6e87c478058a7ab3d944018 (diff) | |
| download | ds-9f337eb80b6446c2f99eef600f55392dbf4970cb.tar.gz ds-9f337eb80b6446c2f99eef600f55392dbf4970cb.tar.xz ds-9f337eb80b6446c2f99eef600f55392dbf4970cb.zip | |
Set unknown attribute syntax to Octet String.
When an unknown attribute type is used (when adding an entry using
the extensibleObject objectclass for example), the syntax of the
attribute defaults to "Directory String". This places syntax
restrictions on the attribute, limiting the attribtues use to
specific types of values. This patch changes the syntax for
unknown attribute to "Octet String", which allows 0 or more UTF-8
bytes. This will allow unknown attributes to store binary or empty
values.
| -rw-r--r-- | ldap/servers/slapd/attr.c | 4 | ||||
| -rw-r--r-- | ldap/servers/slapd/attrsyntax.c | 4 | ||||
| -rw-r--r-- | ldap/servers/slapd/slap.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ldap/servers/slapd/attr.c b/ldap/servers/slapd/attr.c index d78342ee..89aa9f51 100644 --- a/ldap/servers/slapd/attr.c +++ b/ldap/servers/slapd/attr.c @@ -255,12 +255,12 @@ slapi_attr_init_locking_optional(Slapi_Attr *a, const char *type, PRBool use_loc { a->a_type = attr_syntax_normalize_no_lookup( type ); /* - * no syntax for this type... return DirectoryString + * no syntax for this type... return Octet String * syntax. we accomplish this by looking up a well known * attribute type that has that syntax. */ asi = attr_syntax_get_by_name_locking_optional( - ATTR_WITH_DIRSTRING_SYNTAX, use_lock); + ATTR_WITH_OCTETSTRING_SYNTAX, use_lock); } else { diff --git a/ldap/servers/slapd/attrsyntax.c b/ldap/servers/slapd/attrsyntax.c index 32ad4105..e88f4ba1 100644 --- a/ldap/servers/slapd/attrsyntax.c +++ b/ldap/servers/slapd/attrsyntax.c @@ -515,11 +515,11 @@ attr_syntax_get_plugin_by_name_with_default( const char *type ) */ if ( (asi = attr_syntax_get_by_name(type)) == NULL ) { /* - * no syntax for this type... return DirectoryString + * no syntax for this type... return Octet String * syntax. we accomplish this by looking up a well known * attribute type that has that syntax. */ - asi = attr_syntax_get_by_name(ATTR_WITH_DIRSTRING_SYNTAX); + asi = attr_syntax_get_by_name(ATTR_WITH_OCTETSTRING_SYNTAX); } if ( NULL != asi ) { plugin = asi->asi_plugin; diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h index 0e37c85e..93f8470d 100644 --- a/ldap/servers/slapd/slap.h +++ b/ldap/servers/slapd/slap.h @@ -2074,7 +2074,7 @@ int slapd_bind_local_user(Connection *conn); extern char *attr_dataversion; #define ATTR_DATAVERSION "dataVersion" -#define ATTR_WITH_DIRSTRING_SYNTAX "cn" +#define ATTR_WITH_OCTETSTRING_SYNTAX "userPassword" #define SLAPD_SNMP_UPDATE_INTERVAL (10 * 1000) /* 10 seconds */ |
