Skip to content
  • J. Bruce Fields's avatar
    51b2ee7d
    nfsd4: readdirplus shouldn't return parent of export · 51b2ee7d
    J. Bruce Fields authored
    
    
    If you export a subdirectory of a filesystem, a READDIRPLUS on the root
    of that export will return the filehandle of the parent with the ".."
    entry.
    
    The filehandle is optional, so let's just not return the filehandle for
    ".." if we're at the root of an export.
    
    Note that once the client learns one filehandle outside of the export,
    they can trivially access the rest of the export using further lookups.
    
    However, it is also not very difficult to guess filehandles outside of
    the export.  So exporting a subdirectory of a filesystem should
    considered equivalent to providing access to the entire filesystem.  To
    avoid confusion, we recommend only exporting entire filesystems.
    
    Reported-by: default avatarYoujipeng <wangzhibei1999@gmail.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    51b2ee7d
    nfsd4: readdirplus shouldn't return parent of export
    J. Bruce Fields authored
    
    
    If you export a subdirectory of a filesystem, a READDIRPLUS on the root
    of that export will return the filehandle of the parent with the ".."
    entry.
    
    The filehandle is optional, so let's just not return the filehandle for
    ".." if we're at the root of an export.
    
    Note that once the client learns one filehandle outside of the export,
    they can trivially access the rest of the export using further lookups.
    
    However, it is also not very difficult to guess filehandles outside of
    the export.  So exporting a subdirectory of a filesystem should
    considered equivalent to providing access to the entire filesystem.  To
    avoid confusion, we recommend only exporting entire filesystems.
    
    Reported-by: default avatarYoujipeng <wangzhibei1999@gmail.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Loading