summaryrefslogtreecommitdiffstats
path: root/src/account/indication_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/account/indication_common.c')
-rw-r--r--src/account/indication_common.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/account/indication_common.c b/src/account/indication_common.c
index 17d570f..f5caa75 100644
--- a/src/account/indication_common.c
+++ b/src/account/indication_common.c
@@ -34,15 +34,6 @@
#include "indication_common.h"
#include <globals.h>
-#include "LMI_Account.h"
-#include "LMI_Group.h"
-#include "LMI_Identity.h"
-static const char* allowed_classes[] = {
- LMI_Account_ClassName,
- LMI_Group_ClassName,
- LMI_Identity_ClassName,
- NULL };
-
#define EVENT_SIZE (sizeof(struct inotify_event))
#define BUF_LEN (10 * EVENT_SIZE + NAME_MAX + 1)
#define WATCH_PATH "/etc/"
@@ -51,38 +42,6 @@ static const char* allowed_classes[] = {
#define SETTLE_DELAY 1000 * 250 /* usec */
-bool filter_checker(const CMPISelectExp *filter)
-{
- /*
- * Support only simple conditions and only on allowed_classes
- * and type of `sourceinstance ISA allowed_class'
- */
- CMPIStatus st;
- CMPISelectCond *sec = CMGetDoc(filter, &st);
- if (!sec) return false;
- CMPICount count = CMGetSubCondCountAndType(sec, NULL, &st);
- if (count != 1) return false;
- CMPISubCond *sub = CMGetSubCondAt(sec, 0, &st);
- if (!sub) return false;
- count = CMGetPredicateCount(sub, &st);
- if (count != 1) return false;
- CMPIPredicate *pred = CMGetPredicateAt(sub, 0, &st);
- if (!pred) return false;
- CMPIType type;
- CMPIPredOp op;
- CMPIString *lhs = NULL;
- CMPIString *rhs = NULL;
- st = CMGetPredicateData(pred, &type, &op, &lhs, &rhs);
- if (st.rc != CMPI_RC_OK || op != CMPI_PredOp_Isa) return false;
- const char *rhs_str = CMGetCharsPtr(rhs, &st);
- if (!rhs_str) return false;
- unsigned i = 0;
- while (allowed_classes[i]) {
- if (strcasecmp(rhs_str, allowed_classes[i++]) == 0) return true;
- }
- return false;
-}
-
/*
* Returns last modification time for specified file name
*/