diff options
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 4ccb048cae1d..63c3bb98558f 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -146,7 +146,7 @@ | |||
146 | /* Rule structure sizes -- if these change, different AUDIT_ADD and | 146 | /* Rule structure sizes -- if these change, different AUDIT_ADD and |
147 | * AUDIT_LIST commands must be implemented. */ | 147 | * AUDIT_LIST commands must be implemented. */ |
148 | #define AUDIT_MAX_FIELDS 64 | 148 | #define AUDIT_MAX_FIELDS 64 |
149 | #define AUDIT_MAX_KEY_LEN 32 | 149 | #define AUDIT_MAX_KEY_LEN 256 |
150 | #define AUDIT_BITMASK_SIZE 64 | 150 | #define AUDIT_BITMASK_SIZE 64 |
151 | #define AUDIT_WORD(nr) ((__u32)((nr)/32)) | 151 | #define AUDIT_WORD(nr) ((__u32)((nr)/32)) |
152 | #define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) | 152 | #define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) |
@@ -209,6 +209,7 @@ | |||
209 | #define AUDIT_WATCH 105 | 209 | #define AUDIT_WATCH 105 |
210 | #define AUDIT_PERM 106 | 210 | #define AUDIT_PERM 106 |
211 | #define AUDIT_DIR 107 | 211 | #define AUDIT_DIR 107 |
212 | #define AUDIT_FILETYPE 108 | ||
212 | 213 | ||
213 | #define AUDIT_ARG0 200 | 214 | #define AUDIT_ARG0 200 |
214 | #define AUDIT_ARG1 (AUDIT_ARG0+1) | 215 | #define AUDIT_ARG1 (AUDIT_ARG0+1) |
@@ -549,16 +550,20 @@ extern void audit_log_format(struct audit_buffer *ab, | |||
549 | const char *fmt, ...) | 550 | const char *fmt, ...) |
550 | __attribute__((format(printf,2,3))); | 551 | __attribute__((format(printf,2,3))); |
551 | extern void audit_log_end(struct audit_buffer *ab); | 552 | extern void audit_log_end(struct audit_buffer *ab); |
552 | extern void audit_log_hex(struct audit_buffer *ab, | ||
553 | const unsigned char *buf, | ||
554 | size_t len); | ||
555 | extern int audit_string_contains_control(const char *string, | 553 | extern int audit_string_contains_control(const char *string, |
556 | size_t len); | 554 | size_t len); |
555 | extern void audit_log_n_hex(struct audit_buffer *ab, | ||
556 | const unsigned char *buf, | ||
557 | size_t len); | ||
558 | extern void audit_log_n_string(struct audit_buffer *ab, | ||
559 | const char *buf, | ||
560 | size_t n); | ||
561 | #define audit_log_string(a,b) audit_log_n_string(a, b, strlen(b)); | ||
562 | extern void audit_log_n_untrustedstring(struct audit_buffer *ab, | ||
563 | const char *string, | ||
564 | size_t n); | ||
557 | extern void audit_log_untrustedstring(struct audit_buffer *ab, | 565 | extern void audit_log_untrustedstring(struct audit_buffer *ab, |
558 | const char *string); | 566 | const char *string); |
559 | extern void audit_log_n_untrustedstring(struct audit_buffer *ab, | ||
560 | size_t n, | ||
561 | const char *string); | ||
562 | extern void audit_log_d_path(struct audit_buffer *ab, | 567 | extern void audit_log_d_path(struct audit_buffer *ab, |
563 | const char *prefix, | 568 | const char *prefix, |
564 | struct path *path); | 569 | struct path *path); |
@@ -569,7 +574,8 @@ extern int audit_update_lsm_rules(void); | |||
569 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); | 574 | extern int audit_filter_user(struct netlink_skb_parms *cb, int type); |
570 | extern int audit_filter_type(int type); | 575 | extern int audit_filter_type(int type); |
571 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 576 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
572 | void *data, size_t datasz, uid_t loginuid, u32 sid); | 577 | void *data, size_t datasz, uid_t loginuid, |
578 | u32 sessionid, u32 sid); | ||
573 | extern int audit_enabled; | 579 | extern int audit_enabled; |
574 | #else | 580 | #else |
575 | #define audit_log(c,g,t,f,...) do { ; } while (0) | 581 | #define audit_log(c,g,t,f,...) do { ; } while (0) |
@@ -577,9 +583,11 @@ extern int audit_enabled; | |||
577 | #define audit_log_vformat(b,f,a) do { ; } while (0) | 583 | #define audit_log_vformat(b,f,a) do { ; } while (0) |
578 | #define audit_log_format(b,f,...) do { ; } while (0) | 584 | #define audit_log_format(b,f,...) do { ; } while (0) |
579 | #define audit_log_end(b) do { ; } while (0) | 585 | #define audit_log_end(b) do { ; } while (0) |
580 | #define audit_log_hex(a,b,l) do { ; } while (0) | 586 | #define audit_log_n_hex(a,b,l) do { ; } while (0) |
581 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | 587 | #define audit_log_n_string(a,c,l) do { ; } while (0) |
588 | #define audit_log_string(a,c) do { ; } while (0) | ||
582 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) | 589 | #define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) |
590 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | ||
583 | #define audit_log_d_path(b, p, d) do { ; } while (0) | 591 | #define audit_log_d_path(b, p, d) do { ; } while (0) |
584 | #define audit_enabled 0 | 592 | #define audit_enabled 0 |
585 | #endif | 593 | #endif |