Changeset 2659

Show
Ignore:
Timestamp:
01/12/08 16:55:25 (11 months ago)
Author:
dhozac
Message:

Add support for PID and net namespaces.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/vserver.h

    r2648 r2659  
    312312#  define CLONE_NEWUSER                 0x10000000 
    313313#endif 
     314#ifndef CLONE_NEWPID 
     315#  define CLONE_NEWPID                  0x20000000 
     316#endif 
     317#ifndef CLONE_NEWNET 
     318#  define CLONE_NEWNET                  0x40000000 
     319#endif 
    314320 
    315321 
  • trunk/src/vspace.c

    r2658 r2659  
    5757  { "uts",        no_argument,       0, 'U' }, 
    5858  { "user",       no_argument,       0, 'S' }, 
     59  { "pid",        no_argument,       0, 'P' }, 
     60  { "net",        no_argument,       0, 'N' }, 
    5961  {0,0,0,0} 
    6062}; 
     
    8486            "    --uts             ...  the uts namespace\n" 
    8587            "    --user            ...  the user namespace\n" 
     88            "    --pid             ...  the pid namespace\n" 
     89            "    --net             ...  the network namespace\n" 
    8690            "\n" 
    8791            "Please report bugs to " PACKAGE_BUGREPORT "\n"); 
     
    154158   
    155159  while (1) { 
    156     int         c = getopt_long(argc, argv, "+nsce:m:" "MFIUS", CMDLINE_OPTIONS, 0); 
     160    int         c = getopt_long(argc, argv, "+nsce:m:" "MFIUSPN", CMDLINE_OPTIONS, 0); 
    157161    if (c==-1) break; 
    158162 
     
    179183      case 'U'          :  mask |= CLONE_NEWUTS;        break; 
    180184      case 'S'          :  mask |= CLONE_NEWUSER;       break; 
     185      case 'P'          :  mask |= CLONE_NEWPID;        break; 
     186      case 'N'          :  mask |= CLONE_NEWNET;        break; 
    181187 
    182188      default           :