1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-04-28 14:43:37 +02:00

Add 'evmctl --version' version reporting

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
This commit is contained in:
Dmitry Kasatkin 2014-09-23 14:12:19 +03:00
parent 05d1f74559
commit f4fe504f98
2 changed files with 7 additions and 0 deletions

1
README
View File

@ -23,6 +23,7 @@ used to import keys into the kernel keyring.
COMMANDS COMMANDS
-------- --------
--version
help <command> help <command>
import [--rsa] pubkey keyring import [--rsa] pubkey keyring
sign [-r] [--imahash | --imasig ] [--key key] [--pass password] file sign [-r] [--imahash | --imasig ] [--key key] [--pass password] file

View File

@ -1482,6 +1482,7 @@ static void usage(void)
} }
struct command cmds[] = { struct command cmds[] = {
{"--version", NULL, 0, ""},
{"help", cmd_help, 0, "<command>"}, {"help", cmd_help, 0, "<command>"},
{"import", cmd_import, 0, "[--rsa] pubkey keyring", "Import public key into the keyring.\n"}, {"import", cmd_import, 0, "[--rsa] pubkey keyring", "Import public key into the keyring.\n"},
{"sign", cmd_sign_evm, 0, "[-r] [--imahash | --imasig ] [--key key] [--pass password] file", "Sign file metadata.\n"}, {"sign", cmd_sign_evm, 0, "[-r] [--imahash | --imasig ] [--key key] [--pass password] file", "Sign file metadata.\n"},
@ -1513,6 +1514,7 @@ static struct option opts[] = {
{"m32", 0, 0, '3'}, {"m32", 0, 0, '3'},
{"m64", 0, 0, '6'}, {"m64", 0, 0, '6'},
{"smack", 0, 0, 256}, {"smack", 0, 0, 256},
{"version", 0, 0, 257},
{} {}
}; };
@ -1586,6 +1588,10 @@ int main(int argc, char *argv[])
case 256: case 256:
evm_config_xattrnames = evm_extra_smack_xattrs; evm_config_xattrnames = evm_extra_smack_xattrs;
break; break;
case 257:
printf("evmctl %s\n", VERSION);
exit(0);
break;
case '?': case '?':
exit(1); exit(1);
break; break;