X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fvserver.h;h=d7de781eed6ba938fefa78b4014e9543b0c3014f;hb=77d302326fbb2bc08b55f228627f83f2be1dbc0b;hp=b997d299bcbf8b2dc351657056f8b75e40eeb186;hpb=74b68cd44962d94b9b627b1b79068baea17b082e;p=util-vserver.git diff --git a/util-vserver/lib/vserver.h b/util-vserver/lib/vserver.h index b997d29..d7de781 100644 --- a/util-vserver/lib/vserver.h +++ b/util-vserver/lib/vserver.h @@ -137,7 +137,8 @@ #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 @@ -191,9 +192,13 @@ #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 @@ -204,6 +209,8 @@ #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. */ @@ -632,6 +639,20 @@ extern "C" { 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 @@ -686,12 +707,16 @@ extern "C" { int vc_get_dlimit(char const *filename, xid_t xid, uint_least32_t flags, 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; @@ -754,6 +779,9 @@ extern "C" { 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