|
@@ -1971,6 +1971,9 @@ static int audit_set_loginuid_perm(kuid_t loginuid)
|
|
/* if we are unset, we don't need privs */
|
|
/* if we are unset, we don't need privs */
|
|
if (!audit_loginuid_set(current))
|
|
if (!audit_loginuid_set(current))
|
|
return 0;
|
|
return 0;
|
|
|
|
+ /* if AUDIT_FEATURE_LOGINUID_IMMUTABLE means never ever allow a change*/
|
|
|
|
+ if (is_audit_feature_set(AUDIT_FEATURE_LOGINUID_IMMUTABLE))
|
|
|
|
+ return -EPERM;
|
|
/* it is set, you need permission */
|
|
/* it is set, you need permission */
|
|
if (!capable(CAP_AUDIT_CONTROL))
|
|
if (!capable(CAP_AUDIT_CONTROL))
|
|
return -EPERM;
|
|
return -EPERM;
|