From: Andrea Bolognani Date: Mon, 19 Aug 2019 07:02:10 +0000 (+0200) Subject: virt-aa-helper: Use virCommand APIs directly X-Git-Tag: v5.7.0-rc1~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d3a0f56b8e5af383a7e3908bb4c2904fb907d3a;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Ján Tomko --- diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index ad9a7dda94..c5080f698a 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -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"));