提交 7d3a0f56 编写于 作者: A Andrea Bolognani

virt-aa-helper: Use virCommand APIs directly

Right now we're using the virRun() convenience API, but that
doesn't allow the kind of control we want. Use the virCommand
APIs directly instead.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 b81e44d6
...@@ -170,7 +170,9 @@ parserCommand(const char *profile_name, const char cmd) ...@@ -170,7 +170,9 @@ parserCommand(const char *profile_name, const char cmd)
const char * const argv[] = { const char * const argv[] = {
"/sbin/apparmor_parser", flag, profile, NULL "/sbin/apparmor_parser", flag, profile, NULL
}; };
if ((ret = virRun(argv, &status)) != 0 || VIR_AUTOPTR(virCommand) command = virCommandNewArgs(argv);
if ((ret = virCommandRun(command, &status)) != 0 ||
(WIFEXITED(status) && WEXITSTATUS(status) != 0)) { (WIFEXITED(status) && WEXITSTATUS(status) != 0)) {
if (ret != 0) { if (ret != 0) {
vah_error(NULL, 0, _("failed to run apparmor_parser")); vah_error(NULL, 0, _("failed to run apparmor_parser"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册