apparmor: fail task profile update if current_cred isn't real_cred
authorJohn Johansen <john.johansen@canonical.com>
Mon, 16 Jan 2017 08:42:59 +0000 (00:42 -0800)
committerJohn Johansen <john.johansen@canonical.com>
Mon, 16 Jan 2017 09:18:45 +0000 (01:18 -0800)
commita20aa95fbe1abb4c6f333a1f55e9fd15b01c7f12
treeb3a7316e235e2281d0e02a958dc6d29b63ada8f7
parentb7fd2c0340eacbee892425e9007647568b7f2a3c
apparmor: fail task profile update if current_cred isn't real_cred

Trying to update the task cred while the task current cred is not the
real cred will result in an error at the cred layer. Avoid this by
failing early and delaying the update.

Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/context.c