Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
L
lxc
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • lxc
  • Repository

Switch branch/tag
  • lxc
  • config
  • templates
  • Makefile.am
Find file
BlameHistoryPermalink
  • Serge Hallyn's avatar
    Add a nesting.conf which can be included to support nesting containers (v2) · c8bfff0b
    Serge Hallyn authored Sep 03, 2015
    Newer kernels have added a new restriction:  if /proc or /sys on the
    host has files or non-empty directories which are over-mounted, and
    there is no /proc which fully visible, then it assumes there is a
    "security" reason for this.  It prevents anyone in a non-initial user
    namespace from creating a new proc or sysfs mount.
    
    To work around this, this patch adds a new 'nesting.conf' which can be
    lxc.include'd from a container configuration file.  It adds a
    non-overmounted mount of /proc and /sys under /dev/.lxc, so that the
    kernel can see that we're not trying to *hide* things like /proc/uptime.
    and /sys/devices/virtual/net.  If the host adds this to the config file
    for container w1, then container w1 will support unprivileged child
    containers.
    
    The nesting.conf file also sets the apparmor profile to the with-nesting
    variant, since that is required anyway.  This actually means that
    supporting nesting isn't really more work than it used to be, just
    different.  Instead of adding
    
    lxc.aa_profile = lxc-container-default-with-nesting
    
    you now just need to
    
    lxc.include = /usr/share/lxc/config/nesting.conf
    
    (Look, fewer characters :)
    
    Finally, in order to maintain the current apparmor protections on
    proc and sys, we make /dev/.lxc/{proc,sys} non-read/writeable.
    We don't need to be able to use them, we're just showing the
    kernel what's what.
    Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    c8bfff0b
Makefile.am 562 Bytes
EditWeb IDE
×

Replace Makefile.am

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.