[Devel] [PATCH RH8 2/5] ve: make ve_capable also available ifndef CONFIG_MULTIUSER

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Jun 17 11:07:55 MSK 2021


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);
-- 
2.31.1



More information about the Devel mailing list