commit: d0040aff0aa033fd5d5c40480008e98ee5e1f11a
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Jul 11 19:50:20 2014 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jul 11 20:04:06 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=d0040aff
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 5aea597..6280fb6 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;