This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 03/02/2018 12:05 AM, DJ Delorie wrote:
+ // The unshare here gives us our own spaces and capabilities.
+ if (unshare (CLONE_NEWUSER | CLONE_NEWPID | CLONE_NEWNS) < 0)
+ error (EXIT_UNSUPPORTED, errno, "unable to unshare user/fs, ");
+
+ /* Some systems, by default, all mounts leak out of the namespace. */
+ if (mount ("none", "/", NULL, MS_REC | MS_PRIVATE, NULL) != 0)
+ error (EXIT_UNSUPPORTED, errno, "could not create a private mount namespace\n");
error writes error messages to standard error, where they aren't captured in the .out file. You need to use something like FAIL_UNSUPPORTED or printf.
Thanks, Florian
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |