Skip to content
  • Vivek Goyal's avatar
    5afc8df4
    virtiofsd: xattr mapping add a new type "unsupported" · 5afc8df4
    Vivek Goyal authored
    
    
    Right now for xattr remapping, we support types of "prefix", "ok" or "bad".
    Type "bad" returns -EPERM on setxattr and hides xattr in listxattr. For
    getxattr, mapping code returns -EPERM but getxattr code converts it to -ENODATA.
    
    I need a new semantics where if an xattr is unsupported, then
    getxattr()/setxattr() return -ENOTSUP and listxattr() should hide the xattr.
    This is needed to simulate that security.selinux is not supported by
    virtiofs filesystem and in that case client falls back to some default
    label specified by policy.
    
    So add a new type "unsupported" which returns -ENOTSUP on getxattr() and
    setxattr() and hides xattrs in listxattr().
    
    For example, one can use following mapping rule to not support
    security.selinux xattr and allow others.
    
    "-o xattrmap=/unsupported/all/security.selinux/security.selinux//ok/all///"
    
    Suggested-by: default avatar"Dr. David Alan Gilbert" <dgilbert@redhat.com>
    Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
    Message-Id: <YUt9qbmgAfCFfg5t@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    5afc8df4
    virtiofsd: xattr mapping add a new type "unsupported"
    Vivek Goyal authored
    
    
    Right now for xattr remapping, we support types of "prefix", "ok" or "bad".
    Type "bad" returns -EPERM on setxattr and hides xattr in listxattr. For
    getxattr, mapping code returns -EPERM but getxattr code converts it to -ENODATA.
    
    I need a new semantics where if an xattr is unsupported, then
    getxattr()/setxattr() return -ENOTSUP and listxattr() should hide the xattr.
    This is needed to simulate that security.selinux is not supported by
    virtiofs filesystem and in that case client falls back to some default
    label specified by policy.
    
    So add a new type "unsupported" which returns -ENOTSUP on getxattr() and
    setxattr() and hides xattrs in listxattr().
    
    For example, one can use following mapping rule to not support
    security.selinux xattr and allow others.
    
    "-o xattrmap=/unsupported/all/security.selinux/security.selinux//ok/all///"
    
    Suggested-by: default avatar"Dr. David Alan Gilbert" <dgilbert@redhat.com>
    Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
    Message-Id: <YUt9qbmgAfCFfg5t@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Loading