[PATCH 1/2] Fix the bug for missing field name before operator

2008-08-07 Thread Zhang Xiliang
is for it. Signed-off-by: Zhang Xiliang [EMAIL PROTECTED] --- lib/deprecated.c |5 - lib/libaudit.c |5 - src/auditctl.c |4 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/deprecated.c b/lib/deprecated.c index af1780b..6bf42dd 100644 --- a/lib

[PATCH 2/2] Use a new funtion to instead of outing error message for field checking

2008-08-07 Thread Zhang Xiliang
Hello Steve, The method of outing error message for field checking is too big. It is disadvantage to modify. Create a helper function to output error messages. It should be more pretty and smart. Signed-off-by: Zhang Xiliang [EMAIL PROTECTED] --- lib/Makefile.am|2 +- lib/errormsg.h

[PATCH 1/5] Add the field checking for missing value after opration

2008-08-06 Thread Zhang Xiliang
Hello Steve, I think the missing value for -F should be checking. For example, auditctl -a exit,always -F pid= No error message is output and pid=0 is added to rule. Signed-off-by: Zhang Xiliang [EMAIL PROTECTED] --- lib/deprecated.c |3 +++ lib/libaudit.c |3 +++ src/auditctl.c

[PATCH 2/5] The error message of -1 in field checking isnot suit

2008-08-06 Thread Zhang Xiliang
Hello Steve, The error message of -1 is -F missing = for The opration isnot only =. So I think F missing opration for is better. Signed-off-by: Zhang Xiliang [EMAIL PROTECTED] --- src/auditctl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/auditctl.c b

[PATCH 3/5] Add some field value checking for number

2008-08-06 Thread Zhang Xiliang
Hello Steve, Some fields don't support value which isnot number. For example, auditctl -a exit,always -F pid=a No error message is output and pid=0 is added to rule. I think we should add checking for it. Signed-off-by: Zhang Xiliang [EMAIL PROTECTED] --- lib/deprecated.c |3 +++ lib

[PATCH 5/5] Delete some invalid code from auditctl.c

2008-08-06 Thread Zhang Xiliang
Hello Steve, I found some code is invalid in auditctl. So I suggested to delete it. Signed-off-by: Zhang Xiliang [EMAIL PROTECTED] --- src/auditctl.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/auditctl.c b/src/auditctl.c index b356faa..93e84a0

Re: [PATCH 1/5] Add the field checking for missing value after opration

2008-08-06 Thread Zhang Xiliang
Hello Steve, if (v == NULL || f == v) return -1; I have some questions for f == v. I think it only checks the address of f and v. It seems unuseful. If we need to check whether the value is equal to the field, I think we should use strcmp(). What your opinion about it?