- if (ldap_bind_s(ld, li->binddn, li->bindpw, LDAP_AUTH_SIMPLE)
- != LDAP_SUCCESS) {
- goto cleanup;
- }
-
- strcpy(filter, "(&(objectclass=");
- strcat(filter, group_oc_name);
- strcat(filter, ")(");
- strcat(filter, group_at_name);
- strcat(filter, "=");
- strcat(filter, mop_ndn);
- strcat(filter, "))");
+ ptr = lutil_strcopy(filter, "(&(objectclass=");
+ ptr = lutil_strcopy(ptr, group_oc_name.bv_val);
+ ptr = lutil_strcopy(ptr, ")(");
+ ptr = lutil_strcopy(ptr, group_at_name.bv_val);
+ ptr = lutil_strcopy(ptr, "=");
+ ptr = lutil_strcopy(ptr, mop_ndn.bv_val);
+ strcpy(ptr, "))");