
On 04/02/2014 03:00 PM, Eric Blake wrote:
On 04/02/2014 06:44 AM, Ján Tomko wrote:
Every security driver has domainGenSecurityLabel defined.
As currently written. But Dan wrote the manager to be flexible to future drivers that omit obvious functions.
This patch makes sense for silencing Coverity, but I think it is incomplete unless you also fix the registration with the manager to forcefully require that all drivers supply callback functions that we are going to blindly assume exist, rather than the current status quo of allowing a driver to omit callbacks even if none of them do. That is, virSecurityManagerNewDriver() should be taught to require drv->domainGenSecurityLabel is non-NULL.
I don't feel that strongly about removing the NULL check. I've sent v2 that keeps the check in place and frees seclabel instead. Jan