From abccb2fdeb2ee22690303a96973e72f6d2c6f871 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 4 Jun 2018 09:00:47 +0200 Subject: [PATCH] security: aa-helper: Remove the -p parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As the aa-helper binary is supposed to be used only with libvirt, we can fully remove it. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/security/virt-aa-helper.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index d0f9876da5..37fe36a329 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -63,7 +63,6 @@ static char *progname; typedef struct { - bool allowDiskFormatProbing; char uuid[PROFILE_NAME_SIZE]; /* UUID of vm */ bool dryrun; /* dry run */ char cmd; /* 'c' create @@ -115,7 +114,6 @@ vah_usage(void) " -r | --replace reload profile\n" " -R | --remove unload profile\n" " -h | --help this help\n" - " -p | --probing [0|1] allow disk format probing\n" " -u | --uuid uuid (profile name)\n" "\n"), progname); @@ -975,10 +973,8 @@ get_files(vahControl * ctl) /* XXX - if we knew the qemu user:group here we could send it in * so that the open could be re-tried as that user:group. */ - if (!virStorageSourceHasBacking(disk->src)) { - bool probe = ctl->allowDiskFormatProbing; - virStorageFileGetMetadata(disk->src, -1, -1, probe, false); - } + if (!virStorageSourceHasBacking(disk->src)) + virStorageFileGetMetadata(disk->src, -1, -1, false, false); /* XXX passing ignoreOpenFailure = true to get back to the behavior * from before using virDomainDiskDefForeachPath. actually we should @@ -1228,7 +1224,6 @@ vahParseArgv(vahControl * ctl, int argc, char **argv) { int arg, idx = 0; struct option opt[] = { - {"probing", 1, 0, 'p' }, {"add", 0, 0, 'a'}, {"create", 0, 0, 'c'}, {"dryrun", 0, 0, 'd'}, @@ -1280,12 +1275,6 @@ vahParseArgv(vahControl * ctl, int argc, char **argv) PROFILE_NAME_SIZE) == NULL) vah_error(ctl, 1, _("error copying UUID")); break; - case 'p': - if (STREQ(optarg, "1")) - ctl->allowDiskFormatProbing = true; - else - ctl->allowDiskFormatProbing = false; - break; default: vah_error(ctl, 1, _("unsupported option")); break;