From: Alexander Viro <aviro@redhat.com> Date: Mon, 8 Dec 2008 02:21:02 -0500 Subject: [audit] increase AUDIT_MAX_KEY_LEN Message-id: 20081208072102.GA9939@shell.devel.redhat.com O-Subject: [rhel5.4][bz#475145] backport the increase of AUDIT_MAX_KEY_LEN Bugzilla: 475145 RH-Acked-by: Jiri Pirko <jpirko@redhat.com> RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com> RH-Acked-by: Eric Paris <eparis@redhat.com> RH-Acked-by: Jiri Pirko <jpirko@redhat.com> RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com> RH-Acked-by: Eric Paris <eparis@redhat.com> [on top of rhel5 git, mainline commit 55c9243068db52c7a3a682db10df11e3a6911cd2] Key lengths were arbitrarily limited to 32 characters. If userspace is going to start using the single kernel key field as multiple virtual key fields (example key=key1,key2,key3,key4) we should give them enough room to work. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> diff --git a/include/linux/audit.h b/include/linux/audit.h index ec974c0..0d1275b 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -143,7 +143,7 @@ /* Rule structure sizes -- if these change, different AUDIT_ADD and * AUDIT_LIST commands must be implemented. */ #define AUDIT_MAX_FIELDS 64 -#define AUDIT_MAX_KEY_LEN 32 +#define AUDIT_MAX_KEY_LEN 256 #define AUDIT_BITMASK_SIZE 64 #define AUDIT_WORD(nr) ((__u32)((nr)/32)) #define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))