#
# Where:
# <ldap attr>: The LDAP attribute to add modify or delete.
- # <op>: One of the assignment operators (:=, +=, -=).
+ # <op>: One of the assignment operators
+ # (:=, +=, -=, ++).
# Note: '=' is *not* supported.
# <value>: The value to add modify or delete.
#
T_COMMA, /* , */
T_SEMICOLON, /* ; */
+ T_OP_INCRM, /* ++ */
T_OP_ADD, /* += */
- T_OP_SUB, /* -= */
- T_OP_SET, /* := 10 */
+ T_OP_SUB, /* -= 10 */
+ T_OP_SET, /* := */
T_OP_EQ, /* = */
T_OP_NE, /* != */
T_OP_GE, /* >= */
- T_OP_GT, /* > */
- T_OP_LE, /* <= 15 */
+ T_OP_GT, /* > 15 */
+ T_OP_LE, /* <= */
T_OP_LT, /* < */
T_OP_REG_EQ, /* =~ */
T_OP_REG_NE, /* !~ */
- T_OP_CMP_TRUE, /* =* */
- T_OP_CMP_FALSE, /* !* 20 */
+ T_OP_CMP_TRUE, /* =* 20 */
+ T_OP_CMP_FALSE, /* !* */
T_OP_CMP_EQ, /* == */
T_HASH, /* # */
T_BARE_WORD, /* bare word */
- T_DOUBLE_QUOTED_STRING, /* "foo" */
- T_SINGLE_QUOTED_STRING, /* 'foo' 25 */
+ T_DOUBLE_QUOTED_STRING, /* "foo" 25 */
+ T_SINGLE_QUOTED_STRING, /* 'foo' */
T_BACK_QUOTED_STRING, /* `foo` */
T_TOKEN_LAST
} FR_TOKEN;
{ "(", T_LBRACE, },
{ ")", T_RBRACE, },
{ ",", T_COMMA, },
+ { "++", T_OP_INCRM, },
{ "+=", T_OP_ADD, },
{ "-=", T_OP_SUB, },
{ ":=", T_OP_SET, },
value = NULL;
goto do_set;
+ case T_OP_INCRM:
case T_OP_ADD:
case T_OP_CMP_EQ:
case T_OP_SUB:
* Now we know the value is ok, copy the pointers into
* the ldapmod struct.
*/
- memcpy(&(mod_s[total].mod_type), &(attr),
+ memcpy(&(mod_s[total].mod_type), &(attr),
sizeof(mod_s[total].mod_type));
op = cf_pair_operator(cp);
case T_OP_SUB:
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;
+ break;
+#endif
default:
radlog(L_ERR, "rlm_ldap (%s): Operator '%s' "
"is not supported for LDAP modify "