Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933134AbdDQGIF (ORCPT ); Mon, 17 Apr 2017 02:08:05 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:48903 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933081AbdDQGHz (ORCPT ); Mon, 17 Apr 2017 02:07:55 -0400 X-Originating-IP: 72.66.113.207 From: Matt Brown To: jmorris@namei.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, Matt Brown Subject: [PATCH 4/4] added kernel.tiocsti_restrict sysctl Date: Mon, 17 Apr 2017 02:07:06 -0400 Message-Id: <20170417060706.28674-5-matt@nmatt.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170417060706.28674-1-matt@nmatt.com> References: <20170417060706.28674-1-matt@nmatt.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 933 Lines: 41 this patch depends on patches 1, 2 and 3 Allow CONFIG_SECURITY_TIOCSTI_RESTRICT to be controlled via sysctl Signed-off-by: Matt Brown --- kernel/sysctl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index acf0a5a..68d1363 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include @@ -833,6 +834,17 @@ static struct ctl_table kern_table[] = { .extra2 = &two, }, #endif +#if defined CONFIG_TTY + { + .procname = "tiocsti_restrict", + .data = &tiocsti_restrict, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax_sysadmin, + .extra1 = &zero, + .extra2 = &one, + }, +#endif { .procname = "ngroups_max", .data = &ngroups_max, -- 2.10.2