diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-08-31 00:19:06 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-09-07 00:02:05 +0200 |
commit | 9cf934e1a057a8dc4f36a1ad8d2822fb116374dd (patch) | |
tree | 4f66b07f3e56787d4d44c0ba536259e94914e434 /include | |
parent | 71cf9b0659c55ad0e695e98190c742ae39bcee23 (diff) | |
download | kernel-crypto-9cf934e1a057a8dc4f36a1ad8d2822fb116374dd.tar.gz kernel-crypto-9cf934e1a057a8dc4f36a1ad8d2822fb116374dd.tar.xz kernel-crypto-9cf934e1a057a8dc4f36a1ad8d2822fb116374dd.zip |
Implement AUDIT_CRYPTO_KEY_VALUEncr-audit
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/audit.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 54cb007e340..cfb33639566 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -124,6 +124,8 @@ #define AUDIT_CRYPTO_STORAGE_KEY 1600 /* Key storage key configured */ #define AUDIT_CRYPTO_USERSPACE_OP 1601 /* User-space crypto operation */ +#define AUDIT_CRYPTO_KEY_VALUE 1602 /* Public values of a key, immediatelly + follows USERSPACE_OP. */ #define AUDIT_FIRST_KERN_ANOM_MSG 1700 #define AUDIT_LAST_KERN_ANOM_MSG 1799 @@ -422,6 +424,12 @@ struct audit_field { void *lsm_rule; }; +struct audit_crypto_value { + char name; + void *value; + size_t value_size; +}; + #define AUDITSC_INVALID 0 #define AUDITSC_SUCCESS 1 #define AUDITSC_FAILURE 2 @@ -501,6 +509,8 @@ extern int __audit_log_crypto_op(int op, int context, int session, const char *operation, const char *algorithm, int key1, void *key1_id, size_t key1_id_size, int key2, void *key2_id, size_t key2_id_size); +extern void __audit_log_crypto_values(const struct audit_crypto_value *values, + size_t num_values); static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp) { @@ -568,6 +578,13 @@ static inline int audit_log_crypto_op(int op, int context, int session, key2_id_size); } +static inline void audit_log_crypto_values(const struct audit_crypto_value *a, + size_t num_values) +{ + if (unlikely(!audit_dummy_context())) + __audit_log_crypto_values(a, num_values); +} + extern int audit_n_rules; extern int audit_signals; #else @@ -602,6 +619,7 @@ extern int audit_signals; #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; }) #define audit_log_capset(pid, ncr, ocr) ((void)0) #define audit_log_crypto_op(op, ctx, sess, k1, id1, size1, k2, id2, size2) (0) +#define audit_log_crypto_values(a, values, num_values) ((void)0) #define audit_ptrace(t) ((void)0) #define audit_n_rules 0 #define audit_signals 0 |