Guest User

simple unshared mount namespace

a guest
Nov 4th, 2014
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <sched.h>
  4. #include <linux/sched.h>
  5. #include <unistd.h>
  7. int main() {
  8.   int ret;
  9.   if (ret = unshare(CLONE_NEWNS) != 0) {
  10.     fprintf(stderr, "ERROR: unshare returned: %s\n", strerror(ret));
  11.     _exit(1);
  12.   }
  13.   printf("unshared into new mount namespace\n");
  14.   printf("sleeping for 1000\n");
  15.   sleep(1000);
  16. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.