[Devel] [PATCH RHEL8 COMMIT] ve: make ve_capable also available ifndef CONFIG_MULTIUSER

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jun 18 15:13:52 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.45
------>
commit 47eb7b3e49287a4042a0060413a79678d117c748
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Fri Jun 18 15:13:52 2021 +0300

    ve: make ve_capable also available ifndef CONFIG_MULTIUSER
    
    Else we can't compile if CONFIG_MULTIUSER is not defined.
    
    https://jira.sw.ru/browse/PSBM-127846
    Fixes: 8927b26ffed6 ("ve/cred: add ve_capable to check capabilities
    relative to the current VE (v2)")
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 include/linux/capability.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/capability.h b/include/linux/capability.h
index 6af0f876bd4c..20f4cc2f81d7 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -209,7 +209,6 @@ extern bool has_ns_capability_noaudit(struct task_struct *t,
 				      struct user_namespace *ns, int cap);
 extern bool capable(int cap);
 extern bool ns_capable(struct user_namespace *ns, int cap);
-extern bool ve_capable(int cap);
 extern bool ns_capable_noaudit(struct user_namespace *ns, int cap);
 #else
 static inline bool has_capability(struct task_struct *t, int cap)
@@ -243,6 +242,7 @@ static inline bool ns_capable_noaudit(struct user_namespace *ns, int cap)
 	return true;
 }
 #endif /* CONFIG_MULTIUSER */
+extern bool ve_capable(int cap);
 extern bool privileged_wrt_inode_uidgid(struct user_namespace *ns, const struct inode *inode);
 extern bool capable_wrt_inode_uidgid(const struct inode *inode, int cap);
 extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap);


More information about the Devel mailing list