first commit

This commit is contained in:
2021-02-24 09:13:25 +01:00
commit fb74e86d44
5 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#include <sys/mount.h>
#include <unistd.h>
#include <stdio.h>
int main() {
char mount_path[32] = {0};
snprintf(mount_path, sizeof(mount_path), "/proc/%d/ns", getpid());
int err = mount(mount_path, "/run/vpn", NULL, MS_BIND, NULL);
if(err) {
perror("Error");
return 1;
}
while(1) {
sleep(10);
}
return 1;
}