[PATCH 2/3] evm: Append line feed to /sys/kernel/security/evm

From: Wang Weiyang
Date: Thu May 05 2022 - 09:25:12 EST


There is no LF in /sys/kerne/security/evm output. It is little weird,
so append LF to it.

Example:

/ # cat /sys/kernel/security/evm
0/ #

Signed-off-by: Wang Weiyang <wangweiyang2@xxxxxxxxxx>
---
security/integrity/evm/evm_secfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/integrity/evm/evm_secfs.c b/security/integrity/evm/evm_secfs.c
index 8a9db7dfca7e..6a46b62aabd4 100644
--- a/security/integrity/evm/evm_secfs.c
+++ b/security/integrity/evm/evm_secfs.c
@@ -45,7 +45,7 @@ static ssize_t evm_read_key(struct file *filp, char __user *buf,
if (*ppos != 0)
return 0;

- sprintf(temp, "%d", (evm_initialized & ~EVM_SETUP_COMPLETE));
+ sprintf(temp, "%d\n", (evm_initialized & ~EVM_SETUP_COMPLETE));
rc = simple_read_from_buffer(buf, count, ppos, temp, strlen(temp));

return rc;
--
2.17.1