summaryrefslogtreecommitdiffstats
path: root/sbin/sysctl
Commit message (Collapse)AuthorAgeFilesLines
* Tighten up the string->integer conversion in sysctl(8):rwatson2003-06-151-5/+25
| | | | | | | | | | | | | | | | | | | (1) Reject zero-length strings for CTLTYPE_INT, _UINT, _LONG, _ULONG. Do not silently convert to 0. (2) When converting CTLTYPE_INT, _UINT, _LONG, and _ULONG, check the end pointer generated by strtol() and strtoul() rather than discarding it. Reject the string if either none of the string was useful for conversion to an integer, or if there was trailing garbage. I.e., we will not allow you to set a numeric sysctl to a value unless we can completely convert the string argument to a numeric value. I tripped over this when I put the following in /etc/sysctl.conf: kern.maxfiles="4000" Ouch.
* .Nm -> .Xrcharnier2003-06-081-3/+4
|
* Clarify setting sysctl variables via loader(8) tunablesbrueffer2003-05-181-4/+8
| | | | | | | * s/can not/cannot/ Submitted by: ru (*) Approved by: re (rwatson)
* Add information about setting sysctl variables via loader(8) andbrueffer2003-05-171-1/+9
| | | | | | | | | loader.conf(5) PR: 38426 (slightly modified) Submitted by: Phil Pennock <pdp@nl.demon.net> Approved by: re (bmah) MFC after: 3 days
* This file does not seem to serve any purpose. It has never been hooked uptjr2003-04-281-240/+0
| | | | | to the build, and performs a subset of the functionality that the getconf(1) utility performs.
* Output machdep.guessed_bootdev as an integer rather than try to formatphk2003-04-031-54/+0
| | | | | | it according to ancient and obsolete rules. This removes one more user of <sys/diskslice.h>
* Fix what I think is an off-by-one in certain worst-case scenariospeter2003-01-221-1/+1
| | | | caused by rev 1.45. (eg: the estimate being exactly half of the result.)
* Cleanup the formatting from the last commit, convert everything todillon2003-01-111-8/+21
| | | | a more human-readable 'kilobytes' instead of pages.
* Make 'sysctl vm.vmtotal' work properly using updated patch from Hiten.dillon2003-01-111-0/+26
| | | | | | | (the patch in the PR was stale). PR: kern/5689 Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Fix a "bug" in sysctl(8). Limit the length when we print a string frompeter2002-11-121-1/+1
| | | | | the kernel rather than ignoring the length and keeping on going till we finally hit a \0 character in the buffer.
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
* The .Nm utility.charnier2002-07-061-5/+9
|
* Don't err(3) (and exit prematurely) when a sysctl's object size hasalfred2002-05-241-9/+16
| | | | changed, instead just warn(3)
* Don't forget to null-terminate string we got from sysctl (f.e. in 'A' format).ache2002-05-081-1/+1
| | | | Stack garbadge may be printed otherwise.
* Take the "tickadj" element out of struct clockinfo. Our adjtime(2)phk2002-04-151-2/+2
| | | | | implementation is being changed and the very concept of tickadj will no longer be meaningful.
* o remove __Pimp2002-03-211-4/+4
| | | | o remove main prototype
* mdoc(7) police: tiny fixes.ru2002-03-151-2/+2
|
* Document the existence of machdep.guessed_bootdev, as suggestedluigi2002-03-121-0/+1
| | | | | | | | | | | by Sheldon. For a detailed description look at the commit log for sysctl.c rev.1.42 -- i do not think it is appropriate to put the full description in this manpage, and the "boot" and "loader" manpages where this description might go are also missing a description of a number of similar variables, so i think this it is ok to limit documentation to this now, and update it later when I (or someone else) have a chance to revise "boot" and "loader".
* Make the handling of machdep.guessed_bootdev compiled on i386 only.luigi2002-03-111-1/+7
|
* Export a (machine dependent) kernel variable bootdev asluigi2002-03-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | machdep.guessed_bootdev, and add code to sysctl to parse its value and give a (not necessarily correct) name to the device we booted from (the main motivation for this code is to use the info in the PicoBSD boot scripts, and the impact on the kernel is minimal). NOTE: the information available in bootdev is not always reliable, so you should not trust it too much. The parsing code is the same as in boot2.c, and cannot cover all cases -- as it is, it seems to work fine with floppies and IDE disks recognised by the BIOS. It _should_ work as well with SCSI disks recognised by the BIOS. Booting from a CDROM in floppy emulation will return /dev/fd0 (because this is what the BIOS tells us). Booting off the network (e.g. with etherboot) leaves bootdev unset so the value will be printed as "invalid (0xffffffff)". Finally, this feature might go away at some point, hopefully when we have a more reliable way to get the same information. MFC-after: 5 days
* Document `sysctl variable=/dev/foo' syntax.dd2002-03-101-2/+24
| | | | | PR: 34184 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>
* #include <sys/time.h> instead of depending on namespace pollution inbde2002-02-251-3/+3
| | | | | | | <sys/stat.h> for its prerequisite <sys/time.h>. #include <sys/param.h> in the correct place instead of bogusly including <sys/types.h>.
* - Attempt to help declutter kern. sysctl by moving security out fromarr2002-01-161-5/+5
| | | | | | beneath it. Reviewed by: rwatson
* Allow setting of variables of type dev_t by indicating the name ofphk2001-12-301-13/+34
| | | | | | | | | | | | | | | a special file on the command line, eg: sysctl kern.dumpdev=/dev/ad1s1b In parse(), when a value is given for a CTLTYPE_QUAD variable, newval and newsize erroneously fail to be set because of an early "break". show_var() contains code that duplicates the functionality of the oidfmt() function. PR: 33151, 33150 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>
* Add code to export and print the description associated to sysctlluigi2001-12-162-5/+19
| | | | | | | | | | | | | | | | variables. Use the -d flag in sysctl(8) to see this information. Possible extensions to sysctl: + report variables that do not have a description + given a name, report the oid it maps to. Note to developers: have a look at your code, there are a number of variables which do not have a description. Note to developers: do we want this in 4.5 ? It is a very small change and very useful for documentation purposes. Suggested by: Orion Hodson
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* o Update sysctl.8 to reflect renaming of various security-relatedrwatson2001-11-301-2/+5
| | | | | | | sysctls, and to introduce new ones. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Replace `=' with more correct ``.Ql =''.tobez2001-10-311-1/+2
| | | | Mdoc-policed by: ru
* Implement -e option. It modifies the output produced by sysctl(8) intobez2001-10-302-13/+31
| | | | | | | | | | | such a way that the name and the value of the variable(s) are separated with `=' instead of the usual `: '. This is useful for producing output that can be fed back to the sysctl utility (pasted to sysctl.conf, for example). Reviewed by: rwatson Approved by: markm MFC after: 2 weeks
* Document the deprecated `-w' option in the COMPATIBILITY section.yar2001-08-021-0/+4
|
* Since the ``-w'' sysctl(8) option has been deprecated,yar2001-07-301-1/+1
| | | | don't mention it in the manpages.
* mdoc(7) police: -xwidth has been fold into -width.ru2001-07-131-1/+1
|
* mdoc(7) police: fixed formatting.ru2001-07-051-37/+33
|
* modfied sysctl command to allow setting values > 2GB if the mib supports it.pirzyk2001-06-181-1/+19
| | | | | | PR: kern/21132 Reviewed by: no objections to by -arch MFC after: 1 month
* Normalize the use of sizeof according to style(9).dd2001-06-091-19/+19
| | | | Reviewed by: md5(1)
* Remove xref to blackhole(4). sysctl has nothing to do withdd2001-06-081-1/+0
| | | | | | | | | | blackhole(4), except that blackhole(4) uses sysctl's. This xref obviously isn't appropriate unless we want to xref all the other man pages which mention sysctls, which we obviously don't (we may want to list those sysctls, but that's another story). PR: 27937 Submitted by: yar
* Remove unused variable (descr) in show_var().dd2001-06-011-1/+1
| | | | | PR: 22582 Submitted by: Giorgos Keramidas <charon@gray.westgate.gr>
* Update the document date after DES's updates, move the description ofdd2001-05-291-6/+6
| | | | | the -b option below -a to maintain alphabetical order, and add a missing ".It" before "Fl o".
* Perform random drive-by style cleanups, and rewrite a while loop thatdes2001-05-281-17/+18
| | | | offended my artistic sensibilities.
* Try to make sysctl options slightly more orthogonal:des2001-05-282-63/+70
| | | | | | | | | | | | | | - introduce a -o option that displays opaque variables. - introduce a -x option that displays opaque variables in full. - deprecate -A in favor of -ao and -X in favor of -ax. - remove -A and -X from usage() and SYNOPSIS (but not from DESCRIPTION). - ignore -a if one or more variables were listed on the command line. - deprecate -w, it is not needed to determine the user's intentions. - some language and style cleanup in the man page. This commit should not break any existing scripts. MFC after: 4 weeks
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+0
|
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-2/+4
|
* Document the -N option in the usage message and the man page.des2001-01-142-8/+10
|
* Add a -N option that makes sysctl(8) print out just the variable names.des2001-01-141-10/+31
| | | | | | | | | | | | | | Zsh users can add the following to their .zshrc for sysctl completion: function listsysctls { case $1 in *.*) set -A reply $(sysctl -AN ${1%.*}) ;; *) set -A reply $(sysctl -AN) ;; esac } compctl -K listsysctls sysctl While I'm here, brucify the getopt() switch.
* Prepare for mdoc(7)NG.ru2000-12-191-62/+62
|
* Add missing coma in SEE ALSO sectionphantom2000-12-141-2/+2
| | | | Reported by: Rich Morin <rdm@cfcl.com>
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-3/+3
|
* Give correct results for SYSCTL_LONG arrays when sizeof(int) != sizeof(long)gallatin2000-10-231-2/+2
| | | | This fixes unaligned access on alpha for, eg, sysctl kern.ipc.mbtypes.
* Add reference to sysctl.conf.obrien2000-07-271-0/+1
|
OpenPOWER on IntegriCloud