X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vsh.c;h=7cda5fa0733cd1bc5b774153138ea6e21c3c0109;hb=a48641c75412f0bbd8416af26f94ca1b5792294b;hp=76deb8b86776de0fc94d27dcf9c2bce5361033c5;hpb=8f0e621ac168f3374ee3956426a840caa79d36d6;p=lxc-userspace.git diff --git a/vsh.c b/vsh.c index 76deb8b..7cda5fa 100644 --- a/vsh.c +++ b/vsh.c @@ -1,4 +1,4 @@ -/* Version 3 of vsh. Basically a wrapper around 'lxcsu -n -m ' - Sapan */ +/* Version 3 of vsh. Basically a wrapper around 'lxcsu-internal -n -m ' - Sapan */ #include #include @@ -14,7 +14,7 @@ #define PATH_MAX 4096 #endif -#define LXCSU_PATH "/usr/sbin/lxcsu" +#define LXCSU_PATH "/usr/sbin/lxcsu-internal" char* get_current_username (unsigned int uid) { @@ -45,7 +45,7 @@ char **extend_argv(int argc, char **argv, int num_extra_args) { return argv2; } -#define NUM_LXCSU_EXEC_ARGS 3 +#define NUM_LXCSU_EXEC_ARGS 2 int main(int argc, char **argv, char **envp) { @@ -69,9 +69,8 @@ int main(int argc, char **argv, char **envp) // Populate arguments snprintf(slice_id_str, 255, "%u", slice_xid); argv2[0] = strdup(LXCSU_PATH); - argv2[1] = strdup("-n"); - argv2[2] = strdup("-m"); - argv2[3] = strdup(slice_name); + argv2[1] = strdup(slice_name); + argv2[2] = strdup("--"); if (setuid(geteuid())) goto out_exception;