#ifndef _VX_VS_BASE_H
#define _VX_VS_BASE_H
-
#include "vserver/context.h"
#define vx_current_xid() vx_task_xid(current)
+#define current_vx_info() (current->vx_info)
+
+
#define vx_check(c,m) __vx_check(vx_current_xid(),c,m)
#define vx_weak_check(c,m) ((m) ? vx_check(c,m) : 1)
/*
* check current context for ADMIN/WATCH and
- * optionally agains supplied argument
+ * optionally against supplied argument
*/
static inline int __vx_check(xid_t cid, xid_t id, unsigned int mode)
{
(current->vx_info && \
(current->vx_info->vx_initpid == (n)))
+#define vx_capable(b,c) (capable(b) || \
+ ((current->euid == 0) && vx_ccaps(c)))
+
#else
#warning duplicate inclusion