X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fsrc%2Fchcontext.c;h=6102aa64cc07168f2c54d99293294452ff80a275;hb=a917f24ef7b003dcef54a3db2644cf9cb4bc2db2;hp=69dde7f7bce3c8fa2a24e0268c56370f9552e3f3;hpb=83f8f22c9e9feb3d61db3551a24f3f45fac2739d;p=util-vserver.git diff --git a/util-vserver/src/chcontext.c b/util-vserver/src/chcontext.c index 69dde7f..6102aa6 100644 --- a/util-vserver/src/chcontext.c +++ b/util-vserver/src/chcontext.c @@ -66,6 +66,7 @@ CMDLINE_OPTIONS[] = { { "version", no_argument, 0, CMD_VERSION }, { "cap", required_argument, 0, CMD_CAP }, { "ctx", required_argument, 0, CMD_CTX }, + { "xid", required_argument, 0, CMD_CTX }, { "disconnect", no_argument, 0, CMD_DISCONNECT }, { "domainname", required_argument, 0, CMD_DOMAINNAME }, { "flag", required_argument, 0, CMD_FLAG }, @@ -97,7 +98,7 @@ showHelp(int fd, char const *cmd, int res) WRITE_MSG(fd, "Usage: "); WRITE_STR(fd, cmd); WRITE_MSG(fd, - " [--cap [!]] [--secure] [--ctx ] [--disconnect]\n" + " [--cap [!]] [--secure] [--xid ] [--disconnect]\n" " [--domainname ] [--hostname ] [--flag +]\n" " [--silent] [--] command arguments ...\n" "\n" @@ -119,12 +120,12 @@ showHelp(int fd, char const *cmd, int res) " repeated several time.\n" " See /usr/include/linux/capability.h\n" "\n" - "--ctx num\n" + "--xid num\n" " Select the context. On root in context 0 is allowed to\n" " select a specific context.\n" " Context number 1 is special. It can see all processes\n" " in any contexts, but can't kill them though.\n" - " Option --ctx may be repeated several times to specify up to 16 contexts.\n" + " Option --xid may be repeated several times to specify up to 16 contexts.\n" "--disconnect\n" " Start the command in background and make the process\n" @@ -299,7 +300,7 @@ int main (int argc, char *argv[]) setCap(optarg, &args.add_caps, &args.remove_caps); break; case CMD_SECURE : - args.remove_caps |= vc_get_securecaps(); + args.remove_caps |= vc_get_insecurecaps(); break; case CMD_FLAG : setFlags(optarg, &args.flags); @@ -311,7 +312,7 @@ int main (int argc, char *argv[]) WRITE_MSG(2, "Too many contexts given\n"); exit(255); } - args.ctxs[args.nbctx++] = atoi(optarg); + args.ctxs[args.nbctx++] = Evc_xidopt2xid(optarg, true); break;