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

Konstantin Khorenko khorenko at virtuozzo.com
Fri Nov 19 18:54:42 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.30
------>
commit 457df524b748041955c8c3982396a6709b06d52f
Author: Evgenii Shatokhin <eshatokhin at odin.com>
Date:   Fri Nov 19 18:54:42 2021 +0300

    ve/acct: Allow process accounting in containers
    
    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) {


More information about the Devel mailing list