]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/lsm_audit.h
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
[mv-sheeva.git] / include / linux / lsm_audit.h
index e461b2c3d711a078bddba5086ee9df5143734ef7..190c37854870f4cf201dbe8c7970eab8b2788cac 100644 (file)
@@ -33,6 +33,7 @@ struct common_audit_data {
 #define LSM_AUDIT_DATA_IPC     4
 #define LSM_AUDIT_DATA_TASK    5
 #define LSM_AUDIT_DATA_KEY     6
+#define LSM_AUDIT_NO_AUDIT     7
        struct task_struct *tsk;
        union   {
                struct {
@@ -66,16 +67,19 @@ struct common_audit_data {
                } key_struct;
 #endif
        } u;
-       const char *function;
        /* this union contains LSM specific data */
        union {
+#ifdef CONFIG_SECURITY_SMACK
                /* SMACK data */
                struct smack_audit_data {
+                       const char *function;
                        char *subject;
                        char *object;
                        char *request;
                        int result;
                } smack_audit_data;
+#endif
+#ifdef CONFIG_SECURITY_SELINUX
                /* SELinux data */
                struct {
                        u32 ssid;
@@ -83,10 +87,12 @@ struct common_audit_data {
                        u16 tclass;
                        u32 requested;
                        u32 audited;
+                       u32 denied;
                        struct av_decision *avd;
                        int result;
                } selinux_audit_data;
-       } lsm_priv;
+#endif
+       };
        /* these callback will be implemented by a specific LSM */
        void (*lsm_pre_audit)(struct audit_buffer *, void *);
        void (*lsm_post_audit)(struct audit_buffer *, void *);
@@ -104,7 +110,7 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
 /* Initialize an LSM audit data structure. */
 #define COMMON_AUDIT_DATA_INIT(_d, _t) \
        { memset((_d), 0, sizeof(struct common_audit_data)); \
-        (_d)->type = LSM_AUDIT_DATA_##_t; (_d)->function = __func__; }
+        (_d)->type = LSM_AUDIT_DATA_##_t; }
 
 void common_lsm_audit(struct common_audit_data *a);