• R
    evm: Allow setxattr() and setattr() for unmodified metadata · ce02fabf
    Roberto Sassu 提交于
    hulk inclusion
    category: feature
    feature: IMA Digest Lists extension
    bugzilla: 46797
    
    ---------------------------
    
    With the patch to allow xattr/attr operations if a portable signature
    verification fails, cp and tar can copy all xattrs/attrs so that at the
    end of the process verification succeeds.
    
    However, it might happen that the xattrs/attrs are already set to the
    correct value (taken at signing time) and signature verification succeeds
    before the copy has completed. For example, an archive might contains files
    owned by root and the archive is extracted by root.
    
    Then, since portable signatures are immutable, all subsequent operations
    fail (e.g. fchown()), even if the operation is legitimate (does not alter
    the current value).
    
    This patch avoids this problem by reporting successful operation to user
    space when that operation does not alter the current value of xattrs/attrs.
    Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com>
    Reviewed-by: NJason Yan <yanaijie@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    ce02fabf
evm_main.c 20.0 KB