  
  static int my_parser(struct lxc_arguments* args, int c, char* arg)
  {
-@@ -76,6 +81,7 @@
- 		if (ret)
- 			return -1;
+@@ -83,6 +89,7 @@
+ 		/* -s implies -e */
+ 		elevated_privileges = 1;
  		break;
 +	case 't': tty = arg; break;
  	}
  
  	return 0;
-@@ -122,6 +128,8 @@
- 	struct lxc_handler *handler;
+@@ -130,6 +137,8 @@
+ 	void *cgroup_data = NULL;
  	uid_t uid;
  	char *curdir;
 +	gid_t groups[1] = { 0 };

+		}
+
+		if (setuid(0) != 0) {
+			ERROR("could not set user id: ", strerror(errno));
+			return -1;
+		}
+
+		if (setgid(0) != 0) {
+			ERROR("could not set group id: ", strerror(errno));
+			return -1;
+		}
+
+		if (setgroups(1, groups) != 0) {
+			ERROR("could not set groups: ", strerror(errno));
+			return -1;
+		}
+
 		if (curdir && chdir(curdir))
 			WARN("could not change directory to '%s'", curdir);
 

 	LXC_COMMON_OPTIONS
 };
 
@@ -60,6 +65,7 @@
 static signed long new_personality = -1;
 static int namespace_flags = -1;
 static int remount_sys_proc = 0;
