1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-12 15:52:55 +00:00

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: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Andrea Bolognani 2019-08-19 09:02:10 +02:00
parent b81e44d6ac
commit 7d3a0f56b8

@ -170,7 +170,9 @@ parserCommand(const char *profile_name, const char cmd)
const char * const argv[] = {
"/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)) {
if (ret != 0) {
vah_error(NULL, 0, _("failed to run apparmor_parser"));