Skip to content

Commit

Permalink
Only allow ANY for !*
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Dec 11, 2012
1 parent 82d67e1 commit 59c0aa2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/modules/rlm_ldap/rlm_ldap.c
Expand Up @@ -2236,10 +2236,10 @@ static int user_modify(ldap_instance *inst, REQUEST *request,
{
case T_BARE_WORD:
if (strcmp(value, "ANY") == 0) {
if (op != T_OP_SUB) {
if (op != T_OP_CMP_FALSE) {
radlog(L_ERR, "rlm_ldap (%s): "
"ANY is only supported "
"for delete operations ",
"for !* operators",
inst->xlat_name);

goto error;
Expand Down Expand Up @@ -2312,6 +2312,9 @@ static int user_modify(ldap_instance *inst, REQUEST *request,
case T_OP_SUB:
mod_s[total].mod_op = LDAP_MOD_DELETE;
break;
case T_OP_CMP_FALSE:
mod_s[total].mod_op = LDAP_MOD_DELETE;
break;
#ifdef LDAP_MOD_INCREMENT
case T_OP_INCRM:
mod_s[total].mod_op = LDAP_MOD_INCREMENT;
Expand Down

0 comments on commit 59c0aa2

Please sign in to comment.