NetBSD Problem Report #23695

Received: (qmail 25877 invoked by uid 605); 8 Dec 2003 23:54:32 -0000
Message-Id: <20031208235429.7593.qmail@g.primenet.com.au>
Date: 9 Dec 2003 10:54:29 +1100
From: gcw@primenet.com.au
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: gcw@primenet.com.au
To: gnats-bugs@gnats.NetBSD.org
Subject: sysctl logsigexit not writable
X-Send-Pr-Version: 3.95

>Number:         23695
>Category:       kern
>Synopsis:       sysctl -w kern.logsigexit=1 doesn't work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    atatat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 08 23:55:00 +0000 2003
>Closed-Date:    Tue Dec 09 01:28:12 +0000 2003
>Last-Modified:  Tue Dec 09 01:53:00 +0000 2003
>Originator:     Geoff C. Wing
>Release:        NetBSD 1.6ZG (2003/12/08)
>Organization:
>Environment:
System: NetBSD g.primenet.com.au 1.6ZG NetBSD 1.6ZG (G) #0: Mon Dec 8 14:07:49 EST 2003 gcw@g.primenet.com.au:/usr/netbsd/src/sys/arch/i386/compile/G i386
Architecture: i386
Machine: i386
>Description:
	% man sysctl | fgrep logsigexit
	    kern.logsigexit                              integer       yes
	% sysctl -w kern.logsigexit=1
	kern.logsigexit: sysctl() failed with Operation not permitted

>How-To-Repeat:
	see above
>Fix:
	This is a guess:

--- sys/kern/init_sysctl.c.org	2003-12-07 21:33:03.000000000 +1100
+++ sys/kern/init_sysctl.c	2003-12-09 10:53:10.000000000 +1100
@@ -410,7 +410,7 @@
 		       CTLTYPE_STRING, "defcorename", NULL,
 		       sysctl_kern_defcorename, 0, defcorename, MAXPATHLEN,
 		       CTL_KERN, KERN_DEFCORENAME, CTL_EOL);
-	sysctl_createv(SYSCTL_PERMANENT,
+	sysctl_createv(SYSCTL_PERMANENT|SYSCTL_READWRITE,
 		       CTLTYPE_INT, "logsigexit", NULL,
 		       NULL, 0, &kern_logsigexit, 0,
 		       CTL_KERN, KERN_LOGSIGEXIT, CTL_EOL);
>Release-Note:
>Audit-Trail:

From: Sean Davis <dive@endersgame.net>
To: gcw@primenet.com.au
Cc: gnats-bugs@gnats.NetBSD.org
Subject: Re: kern/23695: sysctl logsigexit not writable
Date: Mon, 8 Dec 2003 19:05:48 -0500

 On Tue, Dec 09, 2003 at 10:54:29AM +1100, gcw@primenet.com.au wrote:
 > 
 > >Number:         23695
 > >Category:       kern
 > >Synopsis:       sysctl -w kern.logsigexit=1 doesn't work

 For the record, this also affects kern.sbmax since the dynamic sysctl change.
 It fails with the exact same error, and I would assume the fix is probably
 the same.

 -Sean

 --
 /~\ The ASCII
 \ / Ribbon Campaign                   Sean Davis
  X  Against HTML                       aka dive
 / \ Email!

From: Andrew Brown <atatat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23695 CVS commit: src/sys/kern
Date: Tue,  9 Dec 2003 01:25:34 +0000 (UTC)

 Module Name:	src
 Committed By:	atatat
 Date:		Tue Dec  9 01:25:33 UTC 2003

 Modified Files:
 	src/sys/kern: init_sysctl.c

 Log Message:
 Make kern.logsigexit writeable again.

 Fixes PR kern/23695.


 To generate a diff of this commit:
 cvs rdiff -r1.7 -r1.8 src/sys/kern/init_sysctl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: atatat 
State-Changed-When: Tue Dec 9 01:27:37 UTC 2003 
State-Changed-Why:  
bug fixed.  patch was correct.  isn't sysctl easy, now? 


Responsible-Changed-From-To: kern-bug-people->atatat 
Responsible-Changed-By: atatat 
Responsible-Changed-When: Tue Dec 9 01:27:37 UTC 2003 
Responsible-Changed-Why:  
i made bug and then fixed it.  once prompted. 

From: Andrew Brown <atatat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23695 CVS commit: src/sys/kern
Date: Tue,  9 Dec 2003 01:52:07 +0000 (UTC)

 Module Name:	src
 Committed By:	atatat
 Date:		Tue Dec  9 01:52:07 UTC 2003

 Modified Files:
 	src/sys/kern: init_sysctl.c

 Log Message:
 Make kern.sbmax writeable again as well.

 From a follow-on to PR kern/23695 by a Mr. Davis, which I missed at a
 quick glance.


 To generate a diff of this commit:
 cvs rdiff -r1.8 -r1.9 src/sys/kern/init_sysctl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.