mirror of https://gitee.com/openkylin/libvirt.git
security: Fix comparison for virSecuritySELinuxRecallLabel
The @con type security_context_t is actually a "char *", so the correct check should be to dereference one more level; otherwise, we could return/use the NULL pointer later in a subsequent virSecuritySELinuxSetFileconImpl call (using @fcon). Suggested-by: Michal Prívozník <mprivozn@redhat.com> Signed-off-by: John Ferlan <jferlan@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
458b952bee
commit
9d42d51eef
|
@ -211,7 +211,7 @@ virSecuritySELinuxRecallLabel(const char *path,
|
|||
path, con) < 0)
|
||||
return -1;
|
||||
|
||||
if (!con)
|
||||
if (!*con)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue