From d16aaa508dd406ff86260b34d20983d71f3f2591 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Mon, 7 Sep 2015 17:28:59 +0100 Subject: [PATCH] Don't consider an empty client.keys to be a failure condition client.keys is already reloaded each time a given key is not found in memory so there's no harm in this file being empty. In fact, it's downright annoying if you're using authd because you have to wait for the first agent to register and then manually restart the server before they can start communicating. Removing this check would make the Chef cookbook less clunky. Disclaimer: I haven't tested this at all because I've already sunk too much time into the cookbook. The change seems simple enough though. --- src/os_crypto/shared/keys.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/os_crypto/shared/keys.c b/src/os_crypto/shared/keys.c index f7995fc4f..822cab71d 100644 --- a/src/os_crypto/shared/keys.c +++ b/src/os_crypto/shared/keys.c @@ -250,11 +250,6 @@ void OS_ReadKeys(keystore *keys) /* Clear one last time before leaving */ __memclear(id, name, ip, key, KEYSIZE + 1); - /* Check if there are any agents available */ - if (keys->keysize == 0) { - ErrorExit(NO_REM_CONN, __local_name); - } - /* Add additional entry for sender == keysize */ os_calloc(1, sizeof(keyentry), keys->keyentries[keys->keysize]);