aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/audit.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-09-11 01:39:43 -0400
committerEric W. Biederman <ebiederm@xmission.com>2012-09-17 21:08:54 -0400
commite1760bd5ffae8cb98cffb030ee8e631eba28f3d8 (patch)
tree4694a60b407c418bf7de4b97355dc3bd0e6c6559 /include/linux/audit.h
parentca57ec0f00c3f139c41bf6b0a5b9bcc95bbb2ad7 (diff)
userns: Convert the audit loginuid to be a kuid
Always store audit loginuids in type kuid_t. Print loginuids by converting them into uids in the appropriate user namespace, and then printing the resulting uid. Modify audit_get_loginuid to return a kuid_t. Modify audit_set_loginuid to take a kuid_t. Modify /proc/<pid>/loginuid on read to convert the loginuid into the user namespace of the opener of the file. Modify /proc/<pid>/loginud on write to convert the loginuid rom the user namespace of the opener of the file. Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Eric Paris <eparis@redhat.com> Cc: Paul Moore <paul@paul-moore.com> ? Cc: David Miller <davem@davemloft.net> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r--include/linux/audit.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index ca019bb74da3..12367cbadfe1 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -527,7 +527,7 @@ static inline void audit_ptrace(struct task_struct *t)
527extern unsigned int audit_serial(void); 527extern unsigned int audit_serial(void);
528extern int auditsc_get_stamp(struct audit_context *ctx, 528extern int auditsc_get_stamp(struct audit_context *ctx,
529 struct timespec *t, unsigned int *serial); 529 struct timespec *t, unsigned int *serial);
530extern int audit_set_loginuid(uid_t loginuid); 530extern int audit_set_loginuid(kuid_t loginuid);
531#define audit_get_loginuid(t) ((t)->loginuid) 531#define audit_get_loginuid(t) ((t)->loginuid)
532#define audit_get_sessionid(t) ((t)->sessionid) 532#define audit_get_sessionid(t) ((t)->sessionid)
533extern void audit_log_task_context(struct audit_buffer *ab); 533extern void audit_log_task_context(struct audit_buffer *ab);
@@ -639,7 +639,7 @@ extern int audit_signals;
639#define audit_core_dumps(i) do { ; } while (0) 639#define audit_core_dumps(i) do { ; } while (0)
640#define audit_seccomp(i,s,c) do { ; } while (0) 640#define audit_seccomp(i,s,c) do { ; } while (0)
641#define auditsc_get_stamp(c,t,s) (0) 641#define auditsc_get_stamp(c,t,s) (0)
642#define audit_get_loginuid(t) (-1) 642#define audit_get_loginuid(t) (INVALID_UID)
643#define audit_get_sessionid(t) (-1) 643#define audit_get_sessionid(t) (-1)
644#define audit_log_task_context(b) do { ; } while (0) 644#define audit_log_task_context(b) do { ; } while (0)
645#define audit_ipc_obj(i) ((void)0) 645#define audit_ipc_obj(i) ((void)0)
@@ -705,7 +705,7 @@ extern int audit_update_lsm_rules(void);
705extern int audit_filter_user(void); 705extern int audit_filter_user(void);
706extern int audit_filter_type(int type); 706extern int audit_filter_type(int type);
707extern int audit_receive_filter(int type, int pid, int seq, 707extern int audit_receive_filter(int type, int pid, int seq,
708 void *data, size_t datasz, uid_t loginuid, 708 void *data, size_t datasz, kuid_t loginuid,
709 u32 sessionid, u32 sid); 709 u32 sessionid, u32 sid);
710extern int audit_enabled; 710extern int audit_enabled;
711#else 711#else