News for hackers. Stuff that matters.
Re:Getting a network trace from a single application by ckastner on Tuesday July 19, 2016 @08:17AM (#12121263)
Looks very nice!

One thing: the "Handle exceptions of setuid() and setgid()" commit message caught my eye, so I took a look:

  if (setuid(uid) < 0) { 
          fprintf(stderr, "Unable to set process user ID"); 
  }
You probably want to add an exit() here, as well as to the preceeding setgid() call. Also, the earlier initgroups() can fail, too, so its result should also be checked.
Re:Getting a network trace from a single application by jakobdabo on Tuesday July 19, 2016 @05:46PM (#12125188)
While we are doing this...

    #define APP_TIMEOUT (2000000L) /* 2 seconds */
    ...
    usleep(APP_TIMEOUT);
usleep limits its argument's range to values from 0 to 1000000 and is considered obsolete. Please use nanosleep instead.
Re:Getting a network trace from a single application by jonasdn on Wednesday July 20, 2016 @02:07AM (#12127178)
Thank you, applied :)
Re:Getting a network trace from a single application by heinrich5991 on Tuesday July 19, 2016 @12:36PM (#12122728)
Looks like a '\n' is missing there.
Re:Getting a network trace from a single application by mrb on Tuesday July 19, 2016 @10:28AM (#12121964)
Cool! Namespace are a powerful but not very well known feature of Linux.
Re:Getting a network trace from a single application by andrewstuart2 on Tuesday July 19, 2016 @12:16PM (#12122590)
Well, unless you count docker, rkt, and the whole linux containers thing.
Re:Getting a network trace from a single application by rincebrain on Tuesday July 19, 2016 @01:53PM (#12123455)
There are a number of consumers of namespaces, particularly of late, but they've been around (depending on which type) for years at this point, and many users (or even admins) have little knowledge of their existence or usage unless it comes time to deploy $CONTAINER and their platform does not have them enabled.