Generate a zero-length signature for symlinks
The fsverity utility follows the symlink when generating a signature. Since we don't want to sign the same file twice, we need to skip these links, and instead just generate a dummy zero-length signature here. Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
parent
131eeb2bbe
commit
201596f995
|
@ -45,7 +45,10 @@ static char *rpmVeritySignFile(rpmfi fi, size_t *sig_size, char *key,
|
|||
uint8_t *sig = NULL;
|
||||
int status;
|
||||
|
||||
file_size = rpmfiFSize(fi);
|
||||
if (S_ISLNK(rpmfiFMode(fi)))
|
||||
file_size = 0;
|
||||
else
|
||||
file_size = rpmfiFSize(fi);
|
||||
|
||||
memset(¶ms, 0, sizeof(struct libfsverity_merkle_tree_params));
|
||||
params.version = 1;
|
||||
|
|
Loading…
Reference in New Issue