git: usr.sbin/makefs/hammer2: Support VOP_READLINK

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Thu Jun 22 23:40:08 PDT 2023


commit 89a3eb1631f7e2d7d7a89079dfdeeaa71da08efe
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Thu Jun 22 22:45:05 2023 -0700

    usr.sbin/makefs/hammer2: Support VOP_READLINK
    
    This makes possible for path component lookup against HAMMER2 image
    to handle symlinks with limitations below.
    
    1. It can't support symlink with absolute path destination by design,
     unless you can assume a given image is to be mounted at /.
    2. It currently doesn't support "..". This is another non obvious
     case where a path could reach to outside of the image.
    
    The regular HAMMER2 image creation doesn't use this (instead makefs
    uses real readlink(2) when scanning a source directory).

Summary of changes:
 usr.sbin/makefs/hammer2.c                  | 118 ++++++++++++++++++++++++++++-
 usr.sbin/makefs/hammer2/hammer2.h          |   1 +
 usr.sbin/makefs/hammer2/hammer2_strategy.c |  38 +++++-----
 usr.sbin/makefs/hammer2/hammer2_vnops.c    |  56 +++++++++++---
 4 files changed, 183 insertions(+), 30 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/89a3eb1631f7e2d7d7a89079dfdeeaa71da08efe


-- 
DragonFly BSD source repository


More information about the Commits mailing list