mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
viraccessdriverpolkit: Add missing vtpm case
When adding vtpm virSecret usage type (in v5.6.0-rc1~61) we forgot to update polkit access check. This limited user's ability to match secrets in their rules. Add missing case into switch in virAccessDriverPolkitCheckSecret(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
94365a4871
commit
63a416f3a1
@ -390,6 +390,19 @@ virAccessDriverPolkitCheckSecret(virAccessManager *manager,
|
|||||||
virAccessPermSecretTypeToString(perm),
|
virAccessPermSecretTypeToString(perm),
|
||||||
attrs);
|
attrs);
|
||||||
} break;
|
} break;
|
||||||
|
case VIR_SECRET_USAGE_TYPE_VTPM: {
|
||||||
|
const char *attrs[] = {
|
||||||
|
"connect_driver", driverName,
|
||||||
|
"secret_uuid", uuidstr,
|
||||||
|
"secret_usage_name", secret->usage_id,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
return virAccessDriverPolkitCheck(manager,
|
||||||
|
"secret",
|
||||||
|
virAccessPermSecretTypeToString(perm),
|
||||||
|
attrs);
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user