Skip to contentSkip to conversation

the exit field should not be used in entry list

PATCH In review zhangxiliang 2 participants 2 messages Jul 28, 2008 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 the exit field should not be used in entry list

Hello Steve,

The entry list is applied to match fields before excuting syscall. When matching, the exit code of syscall is unknown. So the exit field should not be used in entry list.
This is a patch for latest audit-1.7.4.

---
 lib/deprecated.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/deprecated.c +2 -0
index 7c7c808..4f0c14e 100644
@@ -281,6 +281,8 @@ int audit_rule_fieldpair(struct audit_rule *rule, const char *pair, int flags)
 			}
 			break;
 		case AUDIT_EXIT:
+			if (flags == AUDIT_FILTER_ENTRY)
+				return -7;
 			vlen = strlen(v);
 			if (isdigit((char)*(v)))
 				rule->values[rule->field_count] =

--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit

#1 lore raw

Hi,

Quoted 3 lines · On Sunday 27 July 2008 20:44:17 zhangxiliang wrote:

The entry list is applied to match fields before excuting syscall. When matching, the exit code of syscall is unknown. So the exit field should not be used in entry list.

Looks good. Applied. I also checked the code in libaudit.c and fixed it to do the same thing. Thanks for the patch.

-Steve