提交 07ff7a0b 编写于 作者: M Mimi Zohar 提交者: James Morris

integrity: remove __setup auditing msgs

Remove integrity audit messages from __setup()
Signed-off-by: NMimi Zohar <zohar@us.ibm.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 e5e520a7
...@@ -22,18 +22,9 @@ static int ima_audit; ...@@ -22,18 +22,9 @@ static int ima_audit;
static int __init ima_audit_setup(char *str) static int __init ima_audit_setup(char *str)
{ {
unsigned long audit; unsigned long audit;
int rc, result = 0;
char *op = "ima_audit";
char *cause;
rc = strict_strtoul(str, 0, &audit); if (!strict_strtoul(str, 0, &audit))
if (rc || audit > 1) ima_audit = audit ? 1 : 0;
result = 1;
else
ima_audit = audit;
cause = ima_audit ? "enabled" : "not_enabled";
integrity_audit_msg(AUDIT_INTEGRITY_STATUS, NULL, NULL,
op, cause, result, 0);
return 1; return 1;
} }
__setup("ima_audit=", ima_audit_setup); __setup("ima_audit=", ima_audit_setup);
......
...@@ -29,20 +29,8 @@ int ima_initialized; ...@@ -29,20 +29,8 @@ int ima_initialized;
char *ima_hash = "sha1"; char *ima_hash = "sha1";
static int __init hash_setup(char *str) static int __init hash_setup(char *str)
{ {
const char *op = "hash_setup"; if (strncmp(str, "md5", 3) == 0)
const char *hash = "sha1"; ima_hash = "md5";
int result = 0;
int audit_info = 0;
if (strncmp(str, "md5", 3) == 0) {
hash = "md5";
ima_hash = str;
} else if (strncmp(str, "sha1", 4) != 0) {
hash = "invalid_hash_type";
result = 1;
}
integrity_audit_msg(AUDIT_INTEGRITY_HASH, NULL, NULL, op, hash,
result, audit_info);
return 1; return 1;
} }
__setup("ima_hash=", hash_setup); __setup("ima_hash=", hash_setup);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册