From: Andreas Steffen Date: Mon, 31 Oct 2011 17:34:16 +0000 (+0100) Subject: add product and file entries to database X-Git-Tag: 4.6.2~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f8e290150d3ff55db31280421a3222200f562d1;p=thirdparty%2Fstrongswan.git add product and file entries to database --- diff --git a/src/libimcv/plugins/imv_attestation/attest.c b/src/libimcv/plugins/imv_attestation/attest.c index 531cd532ed..3c5f6e3533 100644 --- a/src/libimcv/plugins/imv_attestation/attest.c +++ b/src/libimcv/plugins/imv_attestation/attest.c @@ -62,6 +62,8 @@ static void do_args(int argc, char *argv[]) struct option long_opts[] = { { "help", no_argument, NULL, 'h' }, { "files", no_argument, NULL, 'f' }, + { "add", no_argument, NULL, 'a' }, + { "del", no_argument, NULL, 'd' }, { "products", no_argument, NULL, 'p' }, { "hashes", no_argument, NULL, 'H' }, { "add", no_argument, NULL, 'a' }, @@ -110,10 +112,16 @@ static void do_args(int argc, char *argv[]) } continue; case 'H': - operation = OP_HASHES; + op = OP_HASHES; + continue; + case 'a': + op = OP_ADD; + continue; + case 'd': + op = OP_DEL; continue; case 'D': - if (!attest->set_directory(attest, optarg)) + if (!attest->set_directory(attest, optarg, op == OP_ADD)) { exit(EXIT_FAILURE); }