提交 9d42d51e 编写于 作者: J John Ferlan

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: NMichal Prívozník <mprivozn@redhat.com>
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 458b952b
...@@ -211,7 +211,7 @@ virSecuritySELinuxRecallLabel(const char *path, ...@@ -211,7 +211,7 @@ virSecuritySELinuxRecallLabel(const char *path,
path, con) < 0) path, con) < 0)
return -1; return -1;
if (!con) if (!*con)
return 1; return 1;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册