}
if (ldap_url->lud_attrs == NULL || ldap_url->lud_attrs[0] == NULL ||
( ldap_url->lud_attrs[1] != NULL ||
- ( ! strlen(ldap_url->lud_attrs[0]) ||
+ ( !*ldap_url->lud_attrs[0] ||
! strcmp(ldap_url->lud_attrs[0],"*") ) ) ){
radlog (L_ERR, " [%s] Invalid Attribute(s) request.\n", inst->xlat_name);
ldap_free_urldesc(ldap_url);
strlcpy(filter,inst->base_filter,sizeof(filter));
if (user_profile)
profile = user_profile->vp_strvalue;
- if (profile && strlen(profile)){
+ if (profile && *profile){
if ((res = perform_search(instance, conn,
profile, LDAP_SCOPE_BASE,
filter, inst->atts, &def_result)) == RLM_MODULE_OK){
if ((vals = ldap_get_values(conn->ld, msg, inst->profile_attr)) != NULL) {
unsigned int i=0;
strlcpy(filter,inst->base_filter,sizeof(filter));
- while(vals[i] != NULL && strlen(vals[i])){
+ while(vals[i] && *vals[i]){
if ((res = perform_search(instance, conn,
vals[i], LDAP_SCOPE_BASE,
filter, inst->atts, &def_attr_result)) == RLM_MODULE_OK){
ldap_value_free(vals);
}
}
- if (inst->passwd_attr && strlen(inst->passwd_attr)) {
+ if (inst->passwd_attr && *inst->passwd_attr) {
#ifdef NOVELL_UNIVERSAL_PASSWORD
if (strcasecmp(inst->passwd_attr,"nspmPassword") != 0) {
#endif
i++) {
int attr = PW_USER_PASSWORD;
- if (strlen(passwd_vals[i]) == 0)
+ if (!*passwd_vals[i])
continue;
value = passwd_vals[i];
if (request->reply->code == PW_AUTHENTICATION_REJECT) {
/* Bind to eDirectory as the RADIUS user with a wrong password. */
vp_pwd = pairfind(request->config_items, PW_CLEARTEXT_PASSWORD, 0);
- strcpy(password, vp_pwd->vp_strvalue);
- if (strlen(password) > 0) {
+ if (vp_pwd && *vp_pwd->vp_strvalue) {
+ strcpy(password, vp_pwd->vp_strvalue);
if (password[0] != 'a') {
password[0] = 'a';
} else {