X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vsh.c;h=7cda5fa0733cd1bc5b774153138ea6e21c3c0109;hb=bc916290e9e64b040b6c063b733c5fc63efca7c6;hp=8780b24f269af18ffd9b0fa3f522bb96d5e34926;hpb=17dfe634fb2e4fbee16103c8ced700001574bdf8;p=lxc-userspace.git diff --git a/vsh.c b/vsh.c index 8780b24..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 1 +#define NUM_LXCSU_EXEC_ARGS 2 int main(int argc, char **argv, char **envp) { @@ -70,6 +70,7 @@ int main(int argc, char **argv, char **envp) snprintf(slice_id_str, 255, "%u", slice_xid); argv2[0] = strdup(LXCSU_PATH); argv2[1] = strdup(slice_name); + argv2[2] = strdup("--"); if (setuid(geteuid())) goto out_exception;