From e3556481ede823ec6b52065a832232fffd24b765 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 23 Jun 2023 11:38:50 +0200 Subject: Fix minor mistakes i key2root-lskeys.c, implement key2root-rmkey.c, and minor work on key2root-addkey.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- key2root-addkey.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'key2root-addkey.c') diff --git a/key2root-addkey.c b/key2root-addkey.c index d5ec701..c80ebbe 100644 --- a/key2root-addkey.c +++ b/key2root-addkey.c @@ -1,6 +1,10 @@ /* See LICENSE file for copyright and license details. */ +#include +#include +#include #include #include +#include #include #include "arg.h" @@ -56,7 +60,14 @@ main(int argc, char *argv[]) if (failed) return 1; - /* TODO */ + if (mlockall(MCL_CURRENT | MCL_FUTURE)) { + fprintf(stderr, "%s: mlockall MCL_CURRENT|MCL_FUTURE: %s\n", argv0, strerror(errno)); + exit(1); + } + + /* TODO hash input */ + /* TODO add or replace key */ + /* TODO save changes, mode shall be 0700 */ return 0; } -- cgit v1.2.3-70-g09d2