[Devel] [PATCH RHEL7 COMMIT] ve/printk: allow to access syslog with CAP_VE_ADMIN

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 22 03:48:58 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.15
------>
commit 20f55d58214bc4f8e63583aaf4814a58b604e2d3
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Mon Jun 22 14:48:58 2015 +0400

    ve/printk: allow to access syslog with CAP_VE_ADMIN
    
    Ported from RH6.
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 kernel/printk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/printk.c b/kernel/printk.c
index 5488a59..dbd3d6b 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -462,7 +462,8 @@ static int check_syslog_permissions(int type, bool from_file)
 		 * For historical reasons, accept CAP_SYS_ADMIN too, with
 		 * a warning.
 		 */
-		if (nsown_capable(CAP_SYS_ADMIN)) {
+		if (nsown_capable(CAP_SYS_ADMIN) ||
+		    nsown_capable(CAP_VE_ADMIN)) {
 			pr_warn_once("%s (%d): Attempt to access syslog with "
 				     "CAP_SYS_ADMIN but no CAP_SYSLOG "
 				     "(deprecated).\n",



More information about the Devel mailing list