From ed406301740877c99ee5f0f8b9b30dbb67ae2da7 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 11 Oct 2022 21:03:14 -0500 Subject: [PATCH] sl: Fix exit(0) when incorrect usage Any command that uses lib/sl for sub-commands fails to exit with a non-zero exit code on usage error. The fix is a one-character change in lib/sl/slc-gram.y. Affected are all subcommands of: - ktutil - kadmin - heimtools - hxtool - gsstool - kdigest - iprop-log --- lib/sl/slc-gram.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sl/slc-gram.y b/lib/sl/slc-gram.y index 38045c100..eed7fc10f 100644 --- a/lib/sl/slc-gram.y +++ b/lib/sl/slc-gram.y @@ -686,7 +686,7 @@ gen_wrapper(struct assignment *as) (*th->free)(s); free(s); } - cprint(1, "return 0;\n"); + cprint(1, "return 1;\n"); cprint(0, "}\n"); cprint(0, "\n"); free(n);