[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Objectclass violation
I'm getting objectclass violation when I'm trying to add an organisation with my function which I wrote in C. I have added the suffix in my slapd.config file. I'm running openldap-1.2.11. Please help.
int entry_add_domain(void)
{
LDAPMod *mods[2];
LDAPMod attribute1;
char *objectclass_value[]={"top", "organization", NULL};
int rc;
attribute1.mod_type = "objectclass";
attribute1.mod_op = 0;
attribute1.mod_values = objectclass_value;
mods[0]=&attribute1;
mods[1]=NULL;
rc = ldap_add_s( ld, "o=visitor.com", mods );
if ( rc != LDAP_SUCCESS ) {
fprintf( stderr, "ldap_add_s: %s\n", ldap_err2string( rc ) );
}
else {
printf( "%s modified successfully.\n", name_string );
}
return( TRUE );
}
Regards Magnus
_________________________________________s_p_r_a_y_
Här börjar Internet!
Skaffa gratis e-mail och gratis Internet på http://www.spray.se