mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'audit.b50' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b50' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] new predicate - AUDIT_FILETYPE [patch 2/2] Use find_task_by_vpid in audit code [patch 1/2] audit: let userspace fully control TTY input auditing [PATCH 2/2] audit: fix sparse shadowed variable warnings [PATCH 1/2] audit: move extern declarations to audit.h Audit: MAINTAINERS update Audit: increase the maximum length of the key field Audit: standardize string audit interfaces Audit: stop deadlock from signals under load Audit: save audit_backlog_limit audit messages in case auditd comes back Audit: collect sessionid in netlink messages Audit: end printk with newline
This commit is contained in:
commit
9781db7b34
22 changed files with 346 additions and 233 deletions
|
|
@ -146,7 +146,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))
|
||||
|
|
@ -209,6 +209,7 @@
|
|||
#define AUDIT_WATCH 105
|
||||
#define AUDIT_PERM 106
|
||||
#define AUDIT_DIR 107
|
||||
#define AUDIT_FILETYPE 108
|
||||
|
||||
#define AUDIT_ARG0 200
|
||||
#define AUDIT_ARG1 (AUDIT_ARG0+1)
|
||||
|
|
@ -549,16 +550,20 @@ extern void audit_log_format(struct audit_buffer *ab,
|
|||
const char *fmt, ...)
|
||||
__attribute__((format(printf,2,3)));
|
||||
extern void audit_log_end(struct audit_buffer *ab);
|
||||
extern void audit_log_hex(struct audit_buffer *ab,
|
||||
const unsigned char *buf,
|
||||
size_t len);
|
||||
extern int audit_string_contains_control(const char *string,
|
||||
size_t len);
|
||||
extern void audit_log_n_hex(struct audit_buffer *ab,
|
||||
const unsigned char *buf,
|
||||
size_t len);
|
||||
extern void audit_log_n_string(struct audit_buffer *ab,
|
||||
const char *buf,
|
||||
size_t n);
|
||||
#define audit_log_string(a,b) audit_log_n_string(a, b, strlen(b));
|
||||
extern void audit_log_n_untrustedstring(struct audit_buffer *ab,
|
||||
const char *string,
|
||||
size_t n);
|
||||
extern void audit_log_untrustedstring(struct audit_buffer *ab,
|
||||
const char *string);
|
||||
extern void audit_log_n_untrustedstring(struct audit_buffer *ab,
|
||||
size_t n,
|
||||
const char *string);
|
||||
extern void audit_log_d_path(struct audit_buffer *ab,
|
||||
const char *prefix,
|
||||
struct path *path);
|
||||
|
|
@ -569,7 +574,8 @@ extern int audit_update_lsm_rules(void);
|
|||
extern int audit_filter_user(struct netlink_skb_parms *cb, int type);
|
||||
extern int audit_filter_type(int type);
|
||||
extern int audit_receive_filter(int type, int pid, int uid, int seq,
|
||||
void *data, size_t datasz, uid_t loginuid, u32 sid);
|
||||
void *data, size_t datasz, uid_t loginuid,
|
||||
u32 sessionid, u32 sid);
|
||||
extern int audit_enabled;
|
||||
#else
|
||||
#define audit_log(c,g,t,f,...) do { ; } while (0)
|
||||
|
|
@ -577,9 +583,11 @@ extern int audit_enabled;
|
|||
#define audit_log_vformat(b,f,a) do { ; } while (0)
|
||||
#define audit_log_format(b,f,...) do { ; } while (0)
|
||||
#define audit_log_end(b) do { ; } while (0)
|
||||
#define audit_log_hex(a,b,l) do { ; } while (0)
|
||||
#define audit_log_untrustedstring(a,s) do { ; } while (0)
|
||||
#define audit_log_n_hex(a,b,l) do { ; } while (0)
|
||||
#define audit_log_n_string(a,c,l) do { ; } while (0)
|
||||
#define audit_log_string(a,c) do { ; } while (0)
|
||||
#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
|
||||
#define audit_log_untrustedstring(a,s) do { ; } while (0)
|
||||
#define audit_log_d_path(b, p, d) do { ; } while (0)
|
||||
#define audit_enabled 0
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ struct netlink_skb_parms
|
|||
__u32 dst_group;
|
||||
kernel_cap_t eff_cap;
|
||||
__u32 loginuid; /* Login (audit) uid */
|
||||
__u32 sessionid; /* Session id (audit) */
|
||||
__u32 sid; /* SELinux security id */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -300,7 +300,6 @@ extern void tty_hangup(struct tty_struct * tty);
|
|||
extern void tty_vhangup(struct tty_struct * tty);
|
||||
extern void tty_unhangup(struct file *filp);
|
||||
extern int tty_hung_up_p(struct file * filp);
|
||||
extern int is_tty(struct file *filp);
|
||||
extern void do_SAK(struct tty_struct *tty);
|
||||
extern void __do_SAK(struct tty_struct *tty);
|
||||
extern void disassociate_ctty(int priv);
|
||||
|
|
@ -351,8 +350,7 @@ extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data,
|
|||
extern void tty_audit_exit(void);
|
||||
extern void tty_audit_fork(struct signal_struct *sig);
|
||||
extern void tty_audit_push(struct tty_struct *tty);
|
||||
extern void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid);
|
||||
extern void tty_audit_opening(void);
|
||||
extern void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid, u32 sessionid);
|
||||
#else
|
||||
static inline void tty_audit_add_data(struct tty_struct *tty,
|
||||
unsigned char *data, size_t size)
|
||||
|
|
@ -367,10 +365,7 @@ static inline void tty_audit_fork(struct signal_struct *sig)
|
|||
static inline void tty_audit_push(struct tty_struct *tty)
|
||||
{
|
||||
}
|
||||
static inline void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid)
|
||||
{
|
||||
}
|
||||
static inline void tty_audit_opening(void)
|
||||
static inline void tty_audit_push_task(struct task_struct *tsk, uid_t loginuid, u32 sessionid)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue