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>
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"));