ima: fix uid code style problems
scripts/checkpatch.pl wants function arguments to have names; and Mimi prefers to keep the line length in functions to 80 characters or less. Signed-off-by: Alex Henrie <alexh@vpitech.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Родитель
eb0782bbdf
Коммит
30d8764a74
|
@ -79,8 +79,8 @@ struct ima_rule_entry {
|
||||||
uuid_t fsuuid;
|
uuid_t fsuuid;
|
||||||
kuid_t uid;
|
kuid_t uid;
|
||||||
kuid_t fowner;
|
kuid_t fowner;
|
||||||
bool (*uid_op)(kuid_t, kuid_t); /* Handlers for operators */
|
bool (*uid_op)(kuid_t cred_uid, kuid_t rule_uid); /* Handlers for operators */
|
||||||
bool (*fowner_op)(kuid_t, kuid_t); /* uid_eq(), uid_gt(), uid_lt() */
|
bool (*fowner_op)(kuid_t cred_uid, kuid_t rule_uid); /* uid_eq(), uid_gt(), uid_lt() */
|
||||||
int pcr;
|
int pcr;
|
||||||
unsigned int allowed_algos; /* bitfield of allowed hash algorithms */
|
unsigned int allowed_algos; /* bitfield of allowed hash algorithms */
|
||||||
struct {
|
struct {
|
||||||
|
@ -1550,8 +1550,10 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)
|
||||||
|
|
||||||
result = kstrtoul(args[0].from, 10, &lnum);
|
result = kstrtoul(args[0].from, 10, &lnum);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
entry->fowner = make_kuid(current_user_ns(), (uid_t)lnum);
|
entry->fowner = make_kuid(current_user_ns(),
|
||||||
if (!uid_valid(entry->fowner) || (((uid_t)lnum) != lnum))
|
(uid_t)lnum);
|
||||||
|
if (!uid_valid(entry->fowner) ||
|
||||||
|
(((uid_t)lnum) != lnum))
|
||||||
result = -EINVAL;
|
result = -EINVAL;
|
||||||
else
|
else
|
||||||
entry->flags |= IMA_FOWNER;
|
entry->flags |= IMA_FOWNER;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче