From patchwork Sat Jul 27 03:19:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Chikunov X-Patchwork-Id: 11062165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C93CC912 for ; Sat, 27 Jul 2019 03:19:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA89B28B5B for ; Sat, 27 Jul 2019 03:19:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF14D28B6E; Sat, 27 Jul 2019 03:19:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E55428B5B for ; Sat, 27 Jul 2019 03:19:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726947AbfG0DTG (ORCPT ); Fri, 26 Jul 2019 23:19:06 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:44670 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726184AbfG0DTF (ORCPT ); Fri, 26 Jul 2019 23:19:05 -0400 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 2279272CC6C; Sat, 27 Jul 2019 06:19:04 +0300 (MSK) Received: from beacon.altlinux.org (unknown [185.6.174.98]) by imap.altlinux.org (Postfix) with ESMTPSA id CF37B4A4AE8; Sat, 27 Jul 2019 06:19:03 +0300 (MSK) From: Vitaly Chikunov To: Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org Subject: [PATCH 2/2] ima-evm-utils: Never exit with -1 code Date: Sat, 27 Jul 2019 06:19:00 +0300 Message-Id: <20190727031900.7140-2-vt@altlinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190727031900.7140-1-vt@altlinux.org> References: <20190727031900.7140-1-vt@altlinux.org> MIME-Version: 1.0 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change main() return code from -1 to 125 as -1 is not really valid exit code. 125 is choosen because exit codes for signals start from 126. Signed-off-by: Vitaly Chikunov --- src/evmctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/evmctl.c b/src/evmctl.c index d33a91e..e0a835f 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -2100,6 +2100,8 @@ int main(int argc, char *argv[]) break; log_err("%s\n", ERR_error_string(error, NULL)); } + if (err < 0) + err = 125; } if (eng) {