#define VC_CAP_SYS_TTY_CONFIG 26
#define VC_CAP_MKNOD 27
#define VC_CAP_LEASE 28
-#define VC_CAP_QUOTACTL 29
+#define VC_CAP_AUDIT_WRITE 29
+#define VC_CAP_AUDIT_CONTROL 30
#define VC_IMMUTABLE_FILE_FL 0x0000010lu
#define VC_IMMUTABLE_LINK_FL 0x0008000lu
#define VC_VXC_SET_RLIMIT 0x00000002ull
#define VC_VXC_RAW_ICMP 0x00000100ull
+#define VC_VXC_SYSLOG 0x00001000ull
#define VC_VXC_SECURE_MOUNT 0x00010000ull
#define VC_VXC_SECURE_REMOUNT 0x00020000ull
+#define VC_VXC_BINARY_MOUNT 0x00040000ull
+
+#define VC_VXC_QUOTA_CTL 0x00100000ull
#define VC_VXSM_FILL_RATE 0x0001
#define VC_VXSM_PRIO_BIAS 0x0100
+#define VC_BAD_PERSONALITY ((uint_least32_t)(-1))
+
/** \defgroup syscalls Syscall wrappers
* Functions which are calling the vserver syscall directly. */
inline static int vc_setfilecontext(char const *filename, xid_t xid) {
return vc_set_iattr(filename, xid, 0, VC_IATTR_XID);
}
+
+
+ uint_least32_t vc_text2personalityflag(char const *str,
+ size_t len) VC_ATTR_NONNULL((1));
+
+ char const * vc_lopersonality2text(uint_least32_t *) VC_ATTR_NONNULL((1));
+
+ int vc_list2personalityflag(char const /*@in@*/ *,
+ size_t len,
+ uint_least32_t /*@out@*/ *personality,
+ struct vc_err_listparser /*@out@*/ *err) VC_ATTR_NONNULL((1,3));
+
+ uint_least32_t vc_str2personalitytype(char const /*@in@*/*,
+ size_t len) VC_ATTR_NONNULL((1));
/** \brief Returns the context of \c filename
* \ingroup syscalls
/** Add a disk limit to a file system. */
int vc_add_dlimit(char const *filename, xid_t xid,
- uint_least32_t flags);
+ uint_least32_t flags) VC_ATTR_NONNULL((1));
/** Remove a disk limit from a file system. */
int vc_rem_dlimit(char const *filename, xid_t xid,
- uint_least32_t flags);
+ uint_least32_t flags) VC_ATTR_NONNULL((1));
/** Set a disk limit. */
int vc_set_dlimit(char const *filename, xid_t xid,
uint_least32_t flags,
- struct vc_ctx_dlimit const *limits);
+ struct vc_ctx_dlimit const *limits) VC_ATTR_NONNULL((1,4));
/** Get a disk limit. */
int vc_get_dlimit(char const *filename, xid_t xid,
uint_least32_t flags,
- struct vc_ctx_dlimit *limits);
-
+ struct vc_ctx_dlimit *limits) VC_ATTR_NONNULL((1));
+
+ /** \brief Waits for the end of a context
+ * \ingroup syscalls
+ */
+ int vc_wait_exit(xid_t xid);
typedef enum { vcFEATURE_VKILL, vcFEATURE_IATTR, vcFEATURE_RLIMIT,
vcFEATURE_COMPAT, vcFEATURE_MIGRATE, vcFEATURE_NAMESPACE,
vcFEATURE_SCHED, vcFEATURE_VINFO, vcFEATURE_VHI,
- vcFEATURE_VSHELPER0, vcFEATURE_VSHELPER }
+ vcFEATURE_VSHELPER0, vcFEATURE_VSHELPER, vcFEATURE_VWAIT }
vcFeatureSet;
bool vc_isSupported(vcFeatureSet) VC_ATTR_CONST;
bool vc_isSupportedString(char const *);
+
+ typedef enum { vcTYPE_INVALID, vcTYPE_MAIN, vcTYPE_WATCH,
+ vcTYPE_STATIC, vcTYPE_DYNAMIC }
+ vcXidType;
+
+ vcXidType vc_getXIDType(xid_t xid) VC_ATTR_CONST;
+
/* The management part */
#define VC_LIMIT_VSERVER_NAME_LEN 1024
freed by the caller. */
char * vc_getVserverByCtx(xid_t ctx, /*@null@*/vcCfgStyle *style,
/*@null@*/char const *revdir);
+
+ int vc_compareVserverById(char const *lhs, vcCfgStyle lhs_style,
+ char const *rhs, vcCfgStyle rhs_style);
#define vcSKEL_INTERFACES 1u
#define vcSKEL_PKGMGMT 2u