lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439302814-5750-1-git-send-email-javi.merino@arm.com>
Date:	Tue, 11 Aug 2015 15:20:14 +0100
From:	Javi Merino <javi.merino@....com>
To:	linux-kernel@...r.kernel.org
Cc:	Javi Merino <javi.merino@....com>, Joe Perches <joe@...ches.com>,
	Petr Mladek <pmladek@...e.cz>,
	Andy Whitcroft <apw@...onical.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH] checkpatch: check Signed-off-by: lines for patches coming from stdin

Commit 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe
to show filenames") disabled the ability to check for Signed-off-by
lines in patches that are fed to scripts/checkpatch.pl from stdin.  This
makes things like:

git rebase --interactive --exec 'git format-patch --stdout -1 | scripts/checkpatch.pl --strict -'

not complain about patches without a Signed-off-by.

While commit 34d8815f9512 ("checkpatch: add --showfile to allow input
via pipe to show filenames") is meant to work with the output of git
diff, this should be achieved by explicitly passing --no-signoff
to checkpatch.pl:

git diff | ./scripts/checkpatch --no-signoff -

Fixes: 34d8815f9512 ("checkpatch: add --showfile to allow input via pipe to show filenames")
Cc: Joe Perches <joe@...ches.com>
Cc: Petr Mladek <pmladek@...e.cz>
Cc: Andy Whitcroft <apw@...onical.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Javi Merino <javi.merino@....com>
---
 scripts/checkpatch.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d5c8e9a3a73c..984e7ddfd7e3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5684,7 +5684,7 @@ sub process {
 		ERROR("NOT_UNIFIED_DIFF",
 		      "Does not appear to be a unified-diff format patch\n");
 	}
-	if ($is_patch && $filename ne '-' && $chk_signoff && $signoff == 0) {
+	if ($is_patch && $chk_signoff && $signoff == 0) {
 		ERROR("MISSING_SIGN_OFF",
 		      "Missing Signed-off-by: line(s)\n");
 	}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ