Code

store_lookup: Don't allow 'IS <non-NULL>'.
[sysdb.git] / src / core / store_lookup.c
index 317be555b7be0560833fd056e47daf8e1d0e72e7..da9f55076f6d5a1fc33969bee7012d3fb6ea6856 100644 (file)
@@ -737,8 +737,12 @@ parse_attr_cmp(const char *attr, const char *op, const sdb_data_t *value)
        if (! strcasecmp(attr, "name"))
                return NULL;
 
-       if (! strcasecmp(op, "IS"))
-               return sdb_store_isnull_matcher(attr);
+       if (! strcasecmp(op, "IS")) {
+               if (! value)
+                       return sdb_store_isnull_matcher(attr);
+               else
+                       return NULL;
+       }
        else if (! value)
                return NULL;
        else if (! strcasecmp(op, "<"))