When no option is given pkcsconf does nothing and quits silently with a zero return code. It should output the usage information and return non-zero code.
Signed-off-by: Dan Horák <[email protected]> --- usr/sbin/pkcsconf/pkcsconf.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/usr/sbin/pkcsconf/pkcsconf.c b/usr/sbin/pkcsconf/pkcsconf.c index 768f1ec..bb12a90 100755 --- a/usr/sbin/pkcsconf/pkcsconf.c +++ b/usr/sbin/pkcsconf/pkcsconf.c @@ -440,6 +440,9 @@ main(int argc, char *argv[]){ if (errflag != 0) /* If there was an error print the usage statement */ usage(argv[0]); + if (!flags) /* If there was no options print the usage statement */ + usage(argv[0]); + /* Eliminate the ability to specify -I -p -u -P without a slot number */ if ( (flags & (CFG_INITIALIZE | CFG_INIT_USER | CFG_SET_USER | CFG_SET_SO)) && !(flags & CFG_SLOT)){ -- 1.6.6.1 ------------------------------------------------------------------------------ _______________________________________________ Opencryptoki-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech
