diff options
author | Eric Paris <eparis@redhat.com> | 2013-05-24 09:39:29 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2013-11-05 11:08:01 -0500 |
commit | 83fa6bbe4c4541ae748b550b4ec391f8a0acfe94 (patch) | |
tree | da0b4c3432448ac961c5372a94ad38512660314f /kernel/auditsc.c | |
parent | da0a610497ce193782c8df4a33fee7fce030cb99 (diff) |
audit: remove CONFIG_AUDIT_LOGINUID_IMMUTABLE
After trying to use this feature in Fedora we found the hard coding
policy like this into the kernel was a bad idea. Surprise surprise.
We ran into these problems because it was impossible to launch a
container as a logged in user and run a login daemon inside that container.
This reverts back to the old behavior before this option was added. The
option will be re-added in a userspace selectable manor such that
userspace can choose when it is and when it is not appropriate.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 72684679e8bd..b55788bf1607 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1968,15 +1968,13 @@ static atomic_t session_id = ATOMIC_INIT(0); | |||
1968 | 1968 | ||
1969 | static int audit_set_loginuid_perm(kuid_t loginuid) | 1969 | static int audit_set_loginuid_perm(kuid_t loginuid) |
1970 | { | 1970 | { |
1971 | #ifdef CONFIG_AUDIT_LOGINUID_IMMUTABLE | ||
1972 | /* if we are unset, we don't need privs */ | 1971 | /* if we are unset, we don't need privs */ |
1973 | if (!audit_loginuid_set(current)) | 1972 | if (!audit_loginuid_set(current)) |
1974 | return 0; | 1973 | return 0; |
1975 | #else /* CONFIG_AUDIT_LOGINUID_IMMUTABLE */ | 1974 | /* it is set, you need permission */ |
1976 | if (capable(CAP_AUDIT_CONTROL)) | 1975 | if (!capable(CAP_AUDIT_CONTROL)) |
1977 | return 0; | 1976 | return -EPERM; |
1978 | #endif /* CONFIG_AUDIT_LOGINUID_IMMUTABLE */ | 1977 | return 0; |
1979 | return -EPERM; | ||
1980 | } | 1978 | } |
1981 | 1979 | ||
1982 | static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid, | 1980 | static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid, |