diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2014-07-11 14:50:20 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2014-07-11 15:04:06 -0500 |
commit | d0040aff0aa033fd5d5c40480008e98ee5e1f11a (patch) | |
tree | 2ee2881a1b90d09a8f7cc23e1909557b0553feb0 /src/rc | |
parent | 75e06d85584fc3ebfa26fbca97ea60b687247bb0 (diff) |
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.
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/checkpath.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |