The following error message has just annoyed me

bravo:~ # robinhood --scan --once --no-gc --detach -f
/etc/robinhood.d/group.conf
Error reading configuration file '/etc/robinhood.d/group.conf': Error
22 reading FS scan configuration:
Illegal condition on type: file, directory, symlink, chr, blk, fifo or
sock expected., line 432
bravo:~ # head -432 /etc/robinhood.d/group.conf | tail -1
    Ignore { type == "chr" }


Turns out that this comes from
src/cfg_parsing/rbh_boolexpr.c:436-443

case PT_TYPE:
p_triplet->val.type = str2type(key_value->varvalue);
if (p_triplet->val.type == TYPE_NONE) {
strcpy(err_msg, "Illegal condition on type: file, directory, "
"symlink, chr, blk, fifo or sock expected.");
return EINVAL;
}
break;

but the strings it's actually looking for come from
src/include/rbh_boolexpr.h:119-129

/** string representation in policies */
static const char *type_cfg_name[] = {
"?",
"symlink",
"directory",
"file",
"char",
"block",
"fifo",
"socket"
};

could we make the error message match what it's after?

bravo:~ # head -432 /etc/robinhood.d/group.conf | tail -1
    Ignore { type == "char" or type == "block" }



Many thanks

Andrew


_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support

Reply via email to