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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211116213403.820336-2-l.stelmach@samsung.com>
Date:   Tue, 16 Nov 2021 22:34:02 +0100
From:   Łukasz Stelmach <l.stelmach@...sung.com>
To:     Joe Perches <joe@...ches.com>
Cc:     Marek Szyprowski <m.szyprowski@...sung.com>,
        Łukasz Stelmach <l.stelmach@...sung.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] get_maintainer: ignore "my" e-mail address

Ignore one's own e-mail address given as a parameter to --ignore-me
or in the EMAIL environment variable.

Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
---
 scripts/get_maintainer.pl | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ff10c2878522..0719d575c682 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -42,6 +42,7 @@ my $email_git_max_maintainers = 5;
 my $email_git_min_percent = 5;
 my $email_git_since = "1-year-ago";
 my $email_hg_since = "-365";
+my $email_ignore_me = undef;
 my $interactive = 0;
 my $email_remove_duplicates = 1;
 my $email_use_mailmap = 1;
@@ -251,6 +252,7 @@ if (!GetOptions(
 		'git-since=s' => \$email_git_since,
 		'hg-since=s' => \$email_hg_since,
 		'i|interactive!' => \$interactive,
+		'ignore-me:s' => \$email_ignore_me,
 		'remove-duplicates!' => \$email_remove_duplicates,
 		'mailmap!' => \$email_use_mailmap,
 		'm!' => \$email_maintainer,
@@ -338,6 +340,17 @@ if ($tree && !top_of_kernel_tree($lk_path)) {
 	. "a linux kernel source tree.\n";
 }
 
+if (defined $email_ignore_me) {
+    if ($email_ignore_me && rfc822_valid($email_ignore_me)) {
+	(undef, $email_ignore_me) = parse_email($email_ignore_me);
+    } elsif (!$email_ignore_me && defined $ENV{EMAIL} && rfc822_valid($ENV{EMAIL})) {
+	(undef, $email_ignore_me) = parse_email($ENV{EMAIL});
+    } else {
+	warn "$P: \"$email_ignore_me\" is not a valid e-mail address\n";
+	$email_ignore_me = 0;
+    }
+}
+
 ## Read MAINTAINERS for type/value pairs
 
 my @typevalue = ();
@@ -1062,6 +1075,8 @@ MAINTAINER field selection options:
     --rolestats => show roles and statistics (commits/total_commits, %)
     --file-emails => add email addresses found in -f file (default: 0 (off))
     --fixes => for patches, add signatures of commits with 'Fixes: <commit>' (default: 1 (on))
+    --ignore-me => ignore one's own e-mail address passed as a parameter or
+        via EMAIL environment variable
   --scm => print SCM tree(s) if any
   --status => print status if any
   --subsystem => print subsystem name if any
@@ -1401,6 +1416,11 @@ sub push_email_address {
 	return 0;
     }
 
+    if ($email_ignore_me) {
+	my ($myname, $myaddr) = parse_email($email_ignore_me);
+	return 0 if ($address eq $myaddr)
+    }
+
     if (!$email_remove_duplicates) {
 	push(@email_to, [format_email($name, $address, $email_usename), $role]);
     } elsif (!email_inuse($name, $address)) {
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ