From owner-svn-src-stable@freebsd.org Sat Jan 13 09:28:44 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87AF5E7FF8E; Sat, 13 Jan 2018 09:28:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 634077DE57; Sat, 13 Jan 2018 09:28:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC34E11035; Sat, 13 Jan 2018 09:28:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0D9ShtW053506; Sat, 13 Jan 2018 09:28:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0D9Sh5s053505; Sat, 13 Jan 2018 09:28:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801130928.w0D9Sh5s053505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 13 Jan 2018 09:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327915 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 327915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 09:28:44 -0000 Author: eadler Date: Sat Jan 13 09:28:43 2018 New Revision: 327915 URL: https://svnweb.freebsd.org/changeset/base/327915 Log: MFC r324206: bsdinstall(8) hardening menu: Utilize new kern.randompid=1 behaviour Enabling the PID randomization option in bsdinstall(8)'s hardening menu now randomizes the effective value of kern.randompid on each boot. Previous behaviour: When kern.randompid was enabled via the the bsdinstall(8) hardening menu, a random value was generated and placed in the systems /etc/sysctl.conf as kern.randompid=value This makes the value of kern.randompid static across reboots. New behaviour: When kern.randompid is enabled via the bsdinstall(8) hardening menu, the line kern.randompid=1 is placed in the systems /etc/sysctl.conf. This takes advantage of a new kernel feature and makes the value of kern.randompid be randomized by the kernel on each reboot. Modified: stable/11/usr.sbin/bsdinstall/scripts/hardening Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/hardening ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/hardening Sat Jan 13 09:26:24 2018 (r327914) +++ stable/11/usr.sbin/bsdinstall/scripts/hardening Sat Jan 13 09:28:43 2018 (r327915) @@ -62,7 +62,7 @@ for feature in $FEATURES; do echo security.bsd.unprivileged_proc_debug=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening fi if [ "$feature" = "random_pid" ]; then - echo kern.randompid=$(jot -r 1 9999) >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + echo kern.randompid=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening fi if [ "$feature" = "stack_guard" ]; then echo security.bsd.stack_guard_page=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening