# Copyright (C) 2005-2019 Junjiro R. Okajima Branch Manipulation Since aufs supports dynamic branch manipulation, ie. add/remove a branch and changing its permission/attribute, there are a lot of works to do. Add a Branch ---------------------------------------------------------------------- o Confirm the adding dir exists outside of aufs, including loopback mount, and its various attributes. o Initialize the xino file and whiteout bases if necessary. See struct.txt. o Check the owner/group/mode of the directory When the owner/group/mode of the adding directory differs from the existing branch, aufs issues a warning because it may impose a security risk. For example, when a upper writable branch has a world writable empty top directory, a malicious user can create any files on the writable branch directly, like copy-up and modify manually. If something like /etc/{passwd,shadow} exists on the lower readonly branch but the upper writable branch, and the writable branch is world-writable, then a malicious guy may create /etc/passwd on the writable branch directly and the infected file will be valid in aufs. I am afraid it can be a security issue, but aufs can do nothing except producing a warning.