From owner-svn-src-head@FreeBSD.ORG Mon Dec 10 23:09:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 882B7914; Mon, 10 Dec 2012 23:09:57 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 688028FC0C; Mon, 10 Dec 2012 23:09:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBAN9v7Y033965; Mon, 10 Dec 2012 23:09:57 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBAN9uCf033959; Mon, 10 Dec 2012 23:09:56 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201212102309.qBAN9uCf033959@svn.freebsd.org> From: Alfred Perlstein Date: Mon, 10 Dec 2012 23:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244098 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2012 23:09:57 -0000 Author: alfred Date: Mon Dec 10 23:09:55 2012 New Revision: 244098 URL: http://svnweb.freebsd.org/changeset/base/244098 Log: make sysctls kern.{bootfile,conftxt} read-only MFC after: 1 month Modified: head/sys/kern/kern_mib.c Modified: head/sys/kern/kern_mib.c ============================================================================== --- head/sys/kern/kern_mib.c Mon Dec 10 21:18:02 2012 (r244097) +++ head/sys/kern/kern_mib.c Mon Dec 10 23:09:55 2012 (r244098) @@ -141,7 +141,7 @@ SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */ -SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, +SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RD, kernelname, sizeof kernelname, "Name of kernel file booted"); SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD, @@ -377,15 +377,8 @@ SYSCTL_PROC(_kern, KERN_SECURELVL, secur /* Actual kernel configuration options. */ extern char kernconfstring[]; -static int -sysctl_kern_config(SYSCTL_HANDLER_ARGS) -{ - return (sysctl_handle_string(oidp, kernconfstring, - strlen(kernconfstring), req)); -} - -SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW, - 0, 0, sysctl_kern_config, "", "Kernel configuration file"); +SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, kernconfstring, 0, + "Kernel configuration file"); #endif static int