From d0040aff0aa033fd5d5c40480008e98ee5e1f11a Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 11 Jul 2014 14:50:20 -0500 Subject: [PATCH] checkpath: report an error if required options were not specified Before this commit, not specifying -d, -f, -p or -W in a checkpath command meant the command exited successfully but actually did nothing. This is an error condition, so report it as such. --- src/rc/checkpath.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c index 5aea5973..6280fb6d 100644 --- a/src/rc/checkpath.c +++ b/src/rc/checkpath.c @@ -267,6 +267,9 @@ checkpath(int argc, char **argv) if (optind >= argc) usage(EXIT_FAILURE); + if (type == inode_unknown) + eerrorx("%s: -d -f or -p must be specified.", applet); + if (pw) { uid = pw->pw_uid; gid = pw->pw_gid;