From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 259A313877A for ; Fri, 11 Jul 2014 20:19:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7FF0E089E; Fri, 11 Jul 2014 20:19:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 848CCE089E for ; Fri, 11 Jul 2014 20:19:47 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9333E33F498 for ; Fri, 11 Jul 2014 20:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 6453318011 for ; Fri, 11 Jul 2014 20:19:44 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1405109046.d0040aff0aa033fd5d5c40480008e98ee5e1f11a.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/checkpath.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: d0040aff0aa033fd5d5c40480008e98ee5e1f11a X-VCS-Branch: master Date: Fri, 11 Jul 2014 20:19:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b32bbdb1-8388-4333-9b1e-07a8528a87c5 X-Archives-Hash: bc31932a474e73aedcc647fb84439537 commit: d0040aff0aa033fd5d5c40480008e98ee5e1f11a Author: William Hubbs gmail com> AuthorDate: Fri Jul 11 19:50:20 2014 +0000 Commit: William Hubbs gentoo 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;