Changeset 2589

Show
Ignore:
Timestamp:
08/16/07 05:06:50 (1 year ago)
Author:
dhozac
Message:

Add support for a separate filesystem tag, and in the process improve the support for network contexts.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/compat.h

    r2283 r2589  
    8888#endif 
    8989 
     90#ifndef HAVE_TAG_T 
     91#include <stdint.h> 
     92typedef uint32_t                tag_t; 
     93#endif 
     94 
    9095 
    9196#if defined(__dietlibc__) 
  • trunk/configure.ac

    r2578 r2589  
    296296AC_CHECK_TYPES(xid_t,,,[#include <sys/types.h>]) 
    297297AC_CHECK_TYPES(nid_t,,,[#include <sys/types.h>]) 
     298AC_CHECK_TYPES(tag_t,,,[#include <sys/types.h>]) 
    298299 
    299300AC_CHECK_HEADERS([sys/capability.h]) 
  • trunk/contrib/manifest.dat.pathsubst

    r2558 r2589  
    122122base   @SBINDIR@/vserver-stat 
    123123base   @SBINDIR@/vsomething 
     124core   @SBINDIR@/vtag 
    124125base   @SBINDIR@/vtop 
    125126core   @SBINDIR@/vuname 
  • trunk/ensc_wrappers/wrappers-vserver.hc

    r2578 r2589  
    6565} 
    6666 
     67inline static WRAPPER_DECL tag_t 
     68Evc_tag_create(tag_t tag) 
     69{ 
     70  register tag_t        res = vc_tag_create(tag); 
     71  FatalErrnoError(res==VC_NOCTX, "vc_tag_create()"); 
     72  return res; 
     73} 
     74 
    6775inline static WRAPPER_DECL void 
    6876Evc_ctx_migrate(xid_t xid, uint_least64_t flags) 
     
    7583{ 
    7684  FatalErrnoError(vc_net_migrate(nid)==-1, "vc_net_migrate()"); 
     85} 
     86 
     87inline static WRAPPER_DECL void 
     88Evc_tag_migrate(tag_t tag) 
     89{ 
     90  FatalErrnoError(vc_tag_migrate(tag)==-1, "vc_tag_migrate()"); 
    7791} 
    7892 
     
    181195  return rc; 
    182196} 
     197 
     198inline static WRAPPER_DECL tag_t 
     199Evc_tagopt2tag(char const *id, bool honor_static) 
     200{ 
     201  char const *  err; 
     202  tag_t         rc = vc_tagopt2tag(id, honor_static, &err); 
     203  if (__builtin_expect(rc==VC_NOCTX,0)) { 
     204    ENSC_DETAIL1(msg, "vc_tagopt2tag", id, 1); 
     205    FatalErrnoErrorFail(msg); 
     206  } 
     207  return rc; 
     208} 
  • trunk/kernel/switch.h

    r2427 r2589  
    99#define VC_VERSION(c)           ((c) & 0xFFF) 
    1010 
    11 #define VC_CMD(c,i,v)         ((((VC_CAT_ ## c) & 0x3F) << 24) \ 
     11#define VC_CMD(c, i, v)               ((((VC_CAT_ ## c) & 0x3F) << 24) \ 
    1212                                | (((i) & 0xFF) << 16) | ((v) & 0xFFF)) 
    1313 
     
    3232         |     24|     25|     26|     27|     28|     29| |     30|     31| 
    3333  -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ 
    34   DISK   |       |       |       |      |DLIMIT |       | |INODE  |       | 
     34  DISK   |       |       |       |TAGMIG |DLIMIT |       | |INODE  |       | 
    3535  VFS    |     32|     33|     34|     35|     36|     37| |     38|     39| 
    3636  -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ 
     
    6666#define VC_CAT_NETCTRL          28 
    6767 
     68#define VC_CAT_TAGMIG           35 
    6869#define VC_CAT_DLIMIT           36 
    6970#define VC_CAT_INODE            38 
     
    8081#define VC_CAT_COMPAT           63 
    8182 
    82 /*  interface version */ 
    83  
    84 #define VCI_VERSION             0x00020102 
    85 #define VCI_LEGACY_VERSION      0x000100FF 
    86  
    8783/*  query version */ 
    8884 
  • trunk/lib/Makefile-files

    r2578 r2589  
    3535                                lib/getvservervdir.c \ 
    3636                                lib/xidopt2xid.c \ 
    37                                 lib/nidopt2nid.c 
     37                                lib/nidopt2nid.c \ 
     38                                lib/tagopt2tag.c 
    3839lib_v11_SRCS =                  lib/syscall_rlimit.c \ 
    3940                                lib/syscall_rlimit-v11.hc \ 
     
    146147                                lib/syscall_netremove-netv2.hc 
    147148 
     149lib_v23_SRCS =                  lib/syscall_tagmigrate-v23.hc \ 
     150                                lib/syscall_tagmigrate.c \ 
     151                                lib/syscall_tagcreate.c \ 
     152                                lib/syscall_tasktag-v23.hc \ 
     153                                lib/syscall_tasktag.c 
     154 
    148155if ENSC_HAVE_C99_COMPILER 
    149156lib_v13_SRCS +=                 lib/syscall_adddlimit-v13.hc \ 
     
    193200                                $(lib_v22_SRCS) \ 
    194201                                $(lib_netv2_SRCS) \ 
     202                                $(lib_v23_SRCS) \ 
    195203                                $(ensc_fmt_SRCS) 
    196204 
  • trunk/lib/getvserverbyctx-compat.hc

    r2182 r2589  
    9797        // request) 
    9898      if (validate_result && 
    99           vc_getVserverCtx(path, vcCFG_RECENT_FULL, false, 0)!=ctx) return 0; 
     99          vc_getVserverCtx(path, vcCFG_RECENT_FULL, false, 0, vcCTX_XID)!=ctx) return 0; 
    100100 
    101101      if (style) *style = vcCFG_RECENT_FULL; 
  • trunk/lib/getvserverbyctx-v13.hc

    r2182 r2589  
    2929  if (vc_get_vhi_name(ctx, vcVHI_CONTEXT, buf, sizeof buf)!=-1 && 
    3030      (!validate_result || 
    31        vc_getVserverCtx(buf, vcCFG_RECENT_FULL, false, 0)==ctx)) { 
     31       vc_getVserverCtx(buf, vcCFG_RECENT_FULL, false, 0,  vcCTX_XID)==ctx)) { 
    3232    if (style) *style = vcCFG_RECENT_FULL; 
    3333    return strdup(buf); 
  • trunk/lib/getvserverctx.c

    r2210 r2589  
    121121 
    122122xid_t 
    123 vc_getVserverCtx(char const *id, vcCfgStyle style, bool honor_static, bool *is_running) 
     123vc_getVserverCtx(char const *id, vcCfgStyle style, bool honor_static, bool *is_running, 
     124                 vcCtxType type) 
    124125{ 
    125126  size_t                l1 = strlen(id); 
    126   char                  buf[sizeof(CONFDIR "//") + l1 + sizeof("/context")]; 
     127  char                  buf[sizeof(CONFDIR "//") + l1 + sizeof("/ncontext")]; 
    127128                             
    128129  if (style==vcCFG_NONE || style==vcCFG_AUTO) 
     
    152153        // it belongs to a running vserver and the both vservers are 
    153154        // identically 
    154       if (res!=VC_NOCTX) { 
     155      if (res!=VC_NOCTX && type == vcCTX_XID) { 
    155156        char                    *cur_name; 
    156157        struct vc_vx_info       info; 
     
    181182       
    182183      if (res==VC_NOCTX && honor_static) { 
    183         memcpy(buf+idx, "/context", 9); // appends '\0' too 
     184        switch (type) { 
     185          case vcCTX_XID: 
     186            memcpy(buf+idx, "/context", 9);     // appends '\0' too 
     187            break; 
     188          case vcCTX_NID: 
     189            memcpy(buf+idx, "/ncontext", 10); 
     190            break; 
     191          case vcCTX_TAG: 
     192            memcpy(buf+idx, "/tag", 5); 
     193            break; 
     194        } 
    184195 
    185196        res = getCtxFromFile(buf); 
  • trunk/lib/issupported.c

    r2449 r2589  
    2727vc_isSupported(vcFeatureSet feature) 
    2828{ 
    29   int   ver = vc_get_version(); 
     29  int           ver = vc_get_version(); 
     30  vc_vci_t      conf = vc_get_vci(); 
    3031  if (ver==-1) return false; 
     32  if (conf==(vc_vci_t)-1) conf = 0; 
    3133 
    3234  switch (feature) { 
     
    4547    case vcFEATURE_VNET         :  return ver >= 0x00020001; 
    4648    case vcFEATURE_VSTAT        :  return ver >= 0x00020103; 
     49    case vcFEATURE_PPTAG        :  return conf & VC_VCI_PPTAG; 
    4750    default                     :  assert(false);  
    4851  } 
  • trunk/lib/issupportedstring.c

    r2449 r2589  
    3535  DECL(MIGRATE), DECL(NAMESPACE), DECL(SCHED),    DECL(VINFO), 
    3636  DECL(VHI),     DECL(VSHELPER0), DECL(VSHELPER), DECL(VWAIT), 
    37   DECL(VNET),    DECL(VSTAT), 
     37  DECL(VNET),    DECL(VSTAT),     DECL(PPTAG), 
    3838}; 
    3939 
  • trunk/lib/nidopt2nid.c

    r2384 r2589  
    2525#include <stdlib.h> 
    2626 
     27static nid_t 
     28getVserverNid(char const *id, bool honor_static, char const **err) 
     29{ 
     30  *err = "vc_getVserverCtx"; 
     31  return vc_getVserverCtx(id, vcCFG_AUTO, honor_static, 0, vcCTX_NID); 
     32} 
     33 
    2734nid_t 
    2835vc_nidopt2nid(char const *str, bool honor_static, char const **err_info) 
     
    3340  err = "vc_get_task_nid()"; 
    3441  if (strcmp(str,"self")==0) res = vc_get_task_nid(0); 
    35   else                       res = vc_xidopt2xid(str, honor_static, &err); 
     42  else if (str[0]==':')      res = getVserverNid(str+1, honor_static, &err); 
     43  else { 
     44    char *      endptr; 
     45    nid_t       nid = strtol(str, &endptr, 10); 
     46 
     47    if (endptr!=str && (*endptr=='\0' || *endptr=='\n')) 
     48      res = nid; 
     49    else 
     50      res = getVserverNid(str, honor_static, &err); 
     51  } 
    3652 
    3753  if (res==VC_NOCTX && err_info) *err_info = err; 
  • trunk/lib/syscall_getvci-v21.hc

    r2415 r2589  
    2121#endif 
    2222 
    23 static inline ALWAYSINLINE in
     23static inline ALWAYSINLINE vc_vci_
    2424vc_get_vci_v21(int UNUSED tmp) 
    2525{ 
  • trunk/lib/syscall_getvci.c

    r2415 r2589  
    3131#if defined(VC_ENABLE_API_V21) 
    3232 
    33 in
     33vc_vci_
    3434vc_get_vci() 
    3535{ 
  • trunk/lib/virtual.h

    r2427 r2589  
    3232#include <kernel/signal_cmd.h> 
    3333#include <kernel/device_cmd.h> 
     34#include <kernel/tag_cmd.h> 
    3435 
    3536#include <kernel/legacy.h> 
  • trunk/lib/vserver-internal.h

    r2578 r2589  
    5151  do {                                                  \ 
    5252    int ver = utilvserver_checkCompatVersion();         \ 
    53     uint_least32_t UNUSED conf = utilvserver_checkCompatConfig();     \ 
     53    vc_vci_t UNUSED conf = utilvserver_checkCompatConfig();   \ 
    5454    if (ver==-1) return -1;                             \ 
    5555    VC_SUFFIX, __VA_ARGS__, VC_PREFIX;                  \ 
     
    121121#endif 
    122122 
     123#if defined(VC_ENABLE_API_V23) 
     124#  define CALL_VC_TAG(F,...)    CALL_VC_GENERAL_CONFIG(VC_VCI_PPTAG, tag, F, __VA_ARGS__) 
     125#else 
     126#  define CALL_VC_TAG(F,...)    CALL_VC_NOOP 
     127#endif 
     128 
    123129#ifdef VC_ENABLE_API_V22 
    124130#  define CALL_VC_V22(F,...)    CALL_VC_GENERAL(0x00020200, v22, F, __VA_ARGS__) 
     
    177183#  define CTX_USER2KERNEL(X)    (X) 
    178184#  define CTX_KERNEL2USER(X)    (X) 
     185#endif 
     186 
     187#if 1 
     188#  define TAG_KERNEL2USER(X)    (((X)==(uint32_t)(-1)) ? VC_NOCTX   : \ 
     189                                 ((X)==(uint32_t)(-2)) ? VC_SAMECTX : \ 
     190                                 (tag_t)(X)) 
     191 
     192#  define TAG_USER2KERNEL(X)    (((X)==VC_DYNAMIC_XID) ? (uint32_t)(-1) : \ 
     193                                 ((X)==VC_SAMECTX)     ? (uint32_t)(-2) : \ 
     194                                 (uint32_t)(X)) 
     195#else 
     196#  define TAG_USER2KERNEL(X)    (X) 
     197#  define TAG_KERNEL2USER(X)    (X) 
    179198#endif 
    180199 
  • trunk/lib/vserver.h

    r2585 r2589  
    268268#define VC_VCI_SPACES                   (1 << 10) 
    269269#define VC_VCI_NETV2                    (1 << 11) 
     270#define VC_VCI_PPTAG                    (1 << 28) 
    270271 
    271272 
     
    324325typedef an_unsigned_integer_type        xid_t; 
    325326typedef an_unsigned_integer_type        nid_t; 
     327typedef an_unsigned_integer_type        tag_t; 
    326328#endif 
    327329 
     
    350352  int           vc_get_version(); 
    351353 
     354  typedef       uint64_t vc_vci_t; 
    352355    /** \brief   Returns the kernel configuration bits 
    353356     *  \ingroup syscalls 
    354357     *  \returns The kernel configuration bits 
    355358     */ 
    356   int         vc_get_vci(); 
     359  vc_vci_t    vc_get_vci(); 
    357360 
    358361    /** \brief   Moves current process into a context 
     
    770773                              struct vc_ctx_dlimit *limits) VC_ATTR_NONNULL((1)); 
    771774 
     775  /** Get the filesystem tag for a process. */ 
     776  tag_t         vc_get_task_tag(pid_t pid); 
     777 
     778  /** Create a new filesystem tag space. */ 
     779  int           vc_tag_create(tag_t tag); 
     780 
     781  /** Migrate to an existing filesystem tag space. */ 
     782  int           vc_tag_migrate(tag_t tag); 
     783 
    772784    /* scheduler related syscalls */ 
    773785  struct vc_set_sched { 
     
    932944                 vcFEATURE_SCHED,  vcFEATURE_VINFO,   vcFEATURE_VHI, 
    933945                 vcFEATURE_VSHELPER0, vcFEATURE_VSHELPER, vcFEATURE_VWAIT, 
    934                  vcFEATURE_VNET, vcFEATURE_VSTAT
     946                 vcFEATURE_VNET, vcFEATURE_VSTAT,     vcFEATURE_PPTAG,
    935947    vcFeatureSet; 
    936948 
     
    963975  /** Maps a  nid given at '--nid' options to a  nid_t */ 
    964976  nid_t         vc_nidopt2nid(char const *, bool honor_static, char const **err_info); 
     977  /** Maps a  tag given at '--tag' options to a  tag_t */ 
     978  tag_t         vc_tagopt2tag(char const *, bool honor_static, char const **err_info); 
    965979 
    966980  vcCfgStyle    vc_getVserverCfgStyle(char const *id); 
     
    985999  char *        vc_getVserverVdir(char const *id, vcCfgStyle style, bool physical); 
    9861000 
     1001  typedef enum { vcCTX_XID = 1, 
     1002                 vcCTX_NID, 
     1003                 vcCTX_TAG, 
     1004        } vcCtxType; 
     1005 
    9871006  /** Returns the ctx of the given vserver. When vserver is not running and 
    9881007   *  'honor_static' is false, VC_NOCTX will be returned. Else, when 
     
    9931012   *  assigned to this variable. */ 
    9941013  xid_t         vc_getVserverCtx(char const *id, vcCfgStyle style, 
    995                                  bool honor_static, bool /*@null@*/ *is_running); 
     1014                                 bool honor_static, bool /*@null@*/ *is_running, 
     1015                                 vcCtxType type); 
    9961016 
    9971017  /** Resolves the cfg-path of the vserver owning the given ctx. 'revdir' will 
  • trunk/lib/xidopt2xid.c

    r1656 r2589  
    2929{ 
    3030  *err = "vc_getVserverCtx"; 
    31   return vc_getVserverCtx(id, vcCFG_AUTO, honor_static, 0); 
     31  return vc_getVserverCtx(id, vcCFG_AUTO, honor_static, 0, vcCTX_XID); 
    3232} 
    3333 
  • trunk/scripts/chcontext

    r2383 r2589  
    135135done 
    136136 
    137 create_cmd=( $_VCONTEXT --create --silentexist 
     137create_cmd=( ${OPT_CTX:+$_VTAG --create --tag "$OPT_CTX" --silentexist --} 
     138             $_VCONTEXT --create --silentexist 
    138139             ${OPT_SILENT:+--silent} 
    139140             ${OPT_CTX:+--xid "$OPT_CTX"} ) 
     
    158159                ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) 
    159160                 
    160 migrate_cmd=( $_VCONTEXT 
     161migrate_cmd=( $_VTAG --migrate --tag "$OPT_CTX" 
     162              -- 
     163              $_VCONTEXT 
    161164              ${OPT_SILENT:+--silent} 
    162165              ${OPT_DISCONNECT:+--disconnect} 
  • trunk/scripts/util-vserver-vars.pathsubst

    r2567 r2589  
    100100_VSOMETHING="$__SBINDIR/vsomething" 
    101101_VSYSCTL="$__PKGLIBDIR/vsysctl" 
     102_VTAG="$__SBINDIR/vtag" 
    102103_VWAIT="$__SBINDIR/vwait" 
    103104_VUNAME="$__SBINDIR/vuname" 
  • trunk/scripts/vserver.functions

    r2566 r2589  
    4444declare -a OPTS_VSCHED=() 
    4545declare -a OPTS_ENV=() 
     46declare -a OPTS_VTAG_CREATE=() 
     47declare -a OPTS_VTAG_ENTER=() 
    4648 
    4749declare -a STOPCMD_PREPARE=() 
     
    600602} 
    601603 
     604function _generateTagOptions 
     605{ 
     606    local vdir="$1" 
     607    local tag 
     608 
     609    getFileValue tag "$vdir/tag" "$vdir/context" || return 0 
     610 
     611    OPTS_VTAG_CREATE=( --tag "$tag" ) 
     612    OPTS_VTAG_ENTER=( --tag "$tag" ) 
     613} 
     614 
    602615function enableInterfaces 
    603616{ 
     
    713726    _generateScheduleOptions    "$1" 
    714727    _generatePersonalityOptions "$1" 
     728    _generateTagOptions         "$1" 
    715729 
    716730    if test -n "$_IS_FAKEINIT"; then 
  • trunk/scripts/vserver.start

    r2566 r2589  
    133133    $_CHBIND      "${CHBIND_OPTS[@]}" -- \ 
    134134    $_EXEC_ULIMIT "$VSERVER_DIR"/ulimits \ 
     135    $_VTAG       --create "${OPTS_VTAG_CREATE[@]}" -- \ 
    135136    $_VCONTEXT   --create "${OPTS_VCONTEXT_CREATE[@]}" -- \ 
    136137    ${OPTION_STRACE:+$_STRACE -fF -o /tmp/vserver-start.$$} \ 
  • trunk/scripts/vserver.suexec

    r2481 r2589  
    3838        $_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \ 
    3939        ${USE_VNAMESPACE:+$_VNAMESPACE --enter "$S_CONTEXT" -- } \ 
     40        $_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" -- \ 
    4041        $_VCONTEXT $SILENT_OPT --migrate --chroot \ 
    4142          --xid "$S_CONTEXT" --uid "$user" "${OPTS_VCONTEXT_ENTER[@]}" -- \ 
     
    4546        $_CHBIND      "${CHBIND_OPTS[@]}" \ 
    4647        $_EXEC_ULIMIT "$VSERVER_DIR/ulimits" \ 
     48        $_VTAG --migrate "${OPTS_VTAG_ENTER[@]}" -- \ 
    4749        $_VCONTEXT --create "${OPTS_VCONTEXT_CREATE[@]}" -- \ 
    4850        $_VUNAME   --xid self --dir "$VSERVER_DIR"/uts     --missingok -- \ 
  • trunk/src/Makefile-files

    r2558 r2589  
    8282                        src/vsysctl \ 
    8383                        src/vclone \ 
    84                         src/h2ext 
     84                        src/h2ext \ 
     85                        src/vtag 
    8586 
    8687if ENSC_CAN_BEECRYPT_WITH_DIETLIBC 
     
    162163                        src/naddress \ 
    163164                        src/vdevmap \ 
     165                        src/vtag \ 
    164166                        $(src_sbin_CXX_X_PROGS) 
    165167 
     
    343345src_h2ext_LDFLAGS               = $(VSERVER_LDFLGS) 
    344346 
     347src_vtag_SOURCES                = src/vtag.c 
     348src_vtag_LDADD                  = $(VSERVER_LDADDS) 
     349src_vtag_LDFLAGS                = $(VSERVER_LDADDS) 
     350 
    345351EXTRA_PROGRAMS +=               $(src_sbin_CXX_PROGS) $(src_pkglib_CXX_PROGS) 
    346352 
  • trunk/src/vserver-info.c

    r2403 r2589  
    5454               tgFEATURE, tgCANONIFY, 
    5555               tgVERIFYCAP, tgXIDTYPE, tgVERIFYPROC, 
     56               tgNID, tgTAG, 
    5657}       VserverTag; 
    5758 
     
    8384  { "VERIFYPROC",  tgVERIFYPROC,  "test if /proc can be read by contexts!=0" }, 
    8485  { "XIDTYPE",     tgXIDTYPE,     "returns the type of the given XID" }, 
     86  { "NID",         tgNID,         "outputs the network context-id of the given pid" }, 
     87  { "TAG",         tgTAG,         "outputs the filesystem tag of the given pid" }, 
    8588}; 
    8689 
     
    231234} 
    232235 
    233 static char * 
    234 getXid(char *buf, char const *pid_str) 
     236static inline char * 
     237getCtxId(char *buf, const char *pid_str, xid_t (*get_id)(pid_t pid), const char *err_str) 
    235238{ 
    236239  pid_t         pid = atoi(pid_str); 
    237   xid_t         xid = vc_get_task_xid(pid); 
    238  
    239   if (xid==VC_NOCTX) perror("vc_get_task_xid()"); 
     240  xid_t         xid = get_id(pid); 
     241 
     242  if (xid==VC_NOCTX) perror(err_str); 
    240243  else { 
    241244    utilvserver_fmt_long(buf, xid); 
     
    244247 
    245248  return 0; 
     249} 
     250 
     251static char * 
     252getXid(char *buf, char const *pid_str) 
     253{ 
     254  return getCtxId(buf, pid_str, vc_get_task_xid, "vc_get_task_xid()"); 
     255} 
     256 
     257static char * 
     258getNid(char *buf, const char *pid_str) 
     259{ 
     260  return getCtxId(buf, pid_str, vc_get_task_nid, "vc_get_task_nid()"); 
     261} 
     262 
     263static char * 
     264getTag(char *buf, const char *pid_str) 
     265{ 
     266  return getCtxId(buf, pid_str, vc_get_task_tag, "vc_get_task_tag()"); 
    246267} 
    247268 
     
    435456{ 
    436457  xid_t         xid = vc_getVserverCtx(vserver, vcCFG_AUTO, 
    437                                        allow_only_static, 0); 
     458                                       allow_only_static, 0, vcCTX_XID); 
    438459  if (xid==VC_NOCTX) return 0; 
    439460   
     
    503524        res = (vc_get_vx_info(xid, &info)==-1) ? 0 : "1"; 
    504525      else 
    505         res = (vc_getVserverCtx(vserver, vcCFG_AUTO, false, 0)==VC_NOCTX) ? 0 : "1"; 
     526        res = (vc_getVserverCtx(vserver, vcCFG_AUTO, false, 0, vcCTX_XID)==VC_NOCTX) ? 0 : "1"; 
    506527       
    507528      break; 
     
    523544    case tgVERIFYCAP    :  return verifyCap() ? 0 : 1;         break; 
    524545    case tgVERIFYPROC   :  return verifyProc() ? 0 : 1;        break; 
     546    case tgNID          :  res = getNid(buf, vserver);         break; 
     547    case tgTAG          :  res = getTag(buf, vserver);         break; 
    525548 
    526549 
  • trunk/vserver-start/main.c

    r2578 r2589  
    116116 
    117117  xid = vc_getVserverCtx(opts.VSERVER_DIR, vcCFG_RECENT_FULL, 
    118                          true, &is_running); 
     118                         true, &is_running, vcCTX_XID); 
    119119 
    120120  if (xid!=VC_NOCTX && vc_get_vx_info(xid, &info)!=-1) {