X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fvserver.h;h=88c708512d4c23a8d727d5732f877076a2c1aab7;hb=6827f541b7589f47873f594660709fc163cdd902;hp=d45dc9d61667d4ba88fd4b3487e527c176bc1cdb;hpb=4c0037aecd96cf23da727c12381723ab5cbfa5e4;p=util-vserver.git diff --git a/util-vserver/lib/vserver.h b/util-vserver/lib/vserver.h index d45dc9d..88c7085 100644 --- a/util-vserver/lib/vserver.h +++ b/util-vserver/lib/vserver.h @@ -22,6 +22,7 @@ #include #include +#include #include /** the value which is returned in error-case (no ctx found) */ @@ -94,6 +95,9 @@ #define VC_CAP_LEASE 28 #define VC_CAP_QUOTACTL 29 +#define VC_IMMUTABLE_FILE_FL 0x00000010l +#define VC_IMMUTABLE_LINK_FL 0x00008000l +#define VC_IMMUTABLE_ALL (VC_IMMUTABLE_LINK_FL|VC_IMMUTABLE_FILE_FL) #ifdef __cplusplus extern "C" { @@ -112,7 +116,8 @@ extern "C" { * Special values for ctx are * - VC_SAMECTX which means the current context (just for changing caps and flags) * - VC_RANDCTX which means the next free context; this value can be used by - * ordinary users also */ + * ordinary users also + * See http://vserver.13thfloor.at/Stuff/Logic.txt for details */ int vc_new_s_context(xid_t ctx, unsigned int remove_cap, unsigned int flags); /** Sets the ipv4root information. @@ -154,9 +159,27 @@ extern "C" { pid_t vc_X_getinitpid(pid_t pid); + xid_t vc_X_get_filecontext(int fd); + int vc_X_set_filecontext(int fd, xid_t ctx); + + int vc_X_get_ext2flags(int fd, long *flags); + int vc_X_set_ext2flags(int fd, long set_flags, long del_flags); + + int vc_text2cap(char const *); char const * vc_cap2text(int); + inline static int vc_get_securecaps() { + return ( (1<