*
* x3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
return NULL;
}
- result = (char *)calloc(((length + 2) / 3) * 4, sizeof(char));
+ result = (char *)calloc((((length + 2) / 3) * 4)+1, sizeof(char));
p = result;
while (length > 2) { /* keep going until we have less than 24 bits */
return LDAP_OTHER;
}
rc = ldap_modify_s(ld, group, mods);
- if(rc != LDAP_SUCCESS && rc != LDAP_ALREADY_EXISTS) {
+ if(rc != LDAP_SUCCESS && rc != LDAP_TYPE_OR_VALUE_EXISTS) {
log_module(MAIN_LOG, LOG_ERROR, "Error adding %s to group %s: %s", account, group, ldap_err2string(rc));
return rc;
}