userns: Convert the audit loginuid to be a kuid
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 11 Sep 2012 05:39:43 +0000 (22:39 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 18 Sep 2012 01:08:54 +0000 (18:08 -0700)
commite1760bd5ffae8cb98cffb030ee8e631eba28f3d8
tree4694a60b407c418bf7de4b97355dc3bd0e6c6559
parentca57ec0f00c3f139c41bf6b0a5b9bcc95bbb2ad7
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>
18 files changed:
drivers/tty/tty_audit.c
fs/proc/base.c
include/linux/audit.h
include/linux/init_task.h
include/linux/sched.h
include/linux/tty.h
include/net/netlabel.h
include/net/xfrm.h
kernel/audit.c
kernel/audit_watch.c
kernel/auditfilter.c
kernel/auditsc.c
net/core/dev.c
net/netlabel/netlabel_unlabeled.c
net/netlabel/netlabel_user.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
net/xfrm/xfrm_user.c