[Devel] [PATCH] ve/acct: Allow process accounting in containers

Nikita Yushchenko nikita.yushchenko at virtuozzo.com
Thu Nov 18 18:29:29 MSK 2021


From: Evgenii Shatokhin <eshatokhin at odin.com>

Without this patch, process accounting (see accton tool from psacct
package) does not work in the containers. However, it is nice to have.

Note: only the processes inside of this container are visible to it.

https://jira.sw.ru/browse/PSBM-40587

Signed-off-by: Evgenii Shatokhin <eshatokhin at odin.com>
Acked-by: Andrew Vagin <avagin at virtuozzo.com>

(cherry-picked from vz7 commit 0f54119e1f9f ("ve/acct: Allow process
accounting in containers"))

Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
 kernel/acct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/acct.c b/kernel/acct.c
index a64102be2bb0..8ce6345c10c9 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -274,7 +274,7 @@ SYSCALL_DEFINE1(acct, const char __user *, name)
 {
 	int error = 0;
 
-	if (!capable(CAP_SYS_PACCT))
+	if (!ve_capable(CAP_SYS_PACCT))
 		return -EPERM;
 
 	if (name) {
-- 
2.30.2



More information about the Devel mailing list