Hi,
I am attempting to make an ldap_modify_s from an Objective C application running on a mac. When I attempt to make a test modification I get the error EXC_BAD_ACCESS which generally means that a variable has gone out of scope. However, I do not see how any of the variable involved could have fallen out of scope, so I'm not sure my mod syntax is correct...
LDAP *ld; ld = ldap_init(host, PORTNUMBER); char *user = NULL; char *pass = NULL;
int rc; rc = ldap_simple_bind_s( ld, user, pass ); LDAPMod *modM; char *dn = "uflEduUniversityId=28833300,ou=People,dc=ufl,dc=edu"; char** vals0; modM->mod_op = LDAP_MOD_REPLACE; modM->mod_type = "mail"; vals0[0] = "eric@ntu.ac.uk"; modM->mod_values = vals0; int i = ldap_modify_s(ld, dn, modM);
Host and port number are defined earlier in the script.
I know that I'm trying to do a modification with a null bind, but I would expect to see Invalid Credentials rather than an access error...
Does the syntax of this modification look like it 'should' work?
Many thanks, Ade