+ remove_proc_entry("lxcsu",NULL);
+ printk("Procprotect: Stopped lxcsu.\n");
+}
+
+int lxcsu_write(struct file *file, const char *buffer, unsigned long count, void *data) {
+ char pidname[PATH_MAX];
+ int pid;
+ struct pid *p;
+ char **s;
+ struct task_struct *task;
+
+ if (current->nsproxy->mnt_ns!=init_task.nsproxy->mnt_ns)
+ return -EPERM;
+
+ if (copy_from_user(pidname, buffer, count)) {
+ return -EFAULT;
+ }
+ if (count && (pidname[count-1]==10 || pidname[count-1]==13)) {
+ pidname[count-1]='\0';
+ }
+ else
+ pidname[count]='\0';
+
+ pid = simple_strtol(pidname,s,10);
+ p = find_vpid(pid);
+ task = get_pid_task(p,PIDTYPE_PID);
+ if (task) {
+ setns(task);
+ }
+ else {
+ printk(KERN_CRIT "Task %d not found",pid);
+ }
+
+ return count;