summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mib.c
Commit message (Collapse)AuthorAgeFilesLines
* Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.phk2000-07-041-2/+2
| | | | Pointed out by: bde
* Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:phk2000-07-031-2/+2
| | | | | | | | Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our sources: -sysctl_vm_zone SYSCTL_HANDLER_ARGS +sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
* Dammit.rwatson2000-06-071-0/+3
| | | | | | | | Trimmed an extra sysctl when I moved kern.suser_permitted from kern_mib.c to kern_prot.c. This commit should restore it, as well as fix the resulting build problems. Submitted by: asmodai
* o bde suggested moving the SYSCTL from kern_mib to the more appropriaterwatson2000-06-051-27/+0
| | | | | | | | kern_prot, which cleans up some namespace issues o Don't need a special handler to limit un-setting, as suser is used to protect suser_permitted, making it one-way by definition. Suggested by: bde
* o Introduce kern.suser_permitted, a sysctl that disables the suser_xxx()rwatson2000-06-051-0/+24
| | | | | | | | | | | | | | | returning anything but EPERM. o suser is enabled by default; once disabled, cannot be reenabled o To be used in alternative security models where uid0 does not connote additional privileges o Should be noted that uid0 still has some additional powers as it owns many important files and executables, so suffers from the same fundamental security flaws as securelevels. This is fixed with MAC integrity protection code (in progress) o Not safe for consumption unless you are *really* sure you don't want things like shutdown to work, et al :-) Obtained from: TrustedBSD Project
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-0/+1
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Draw the outline of "struct bio".phk2000-04-021-0/+6
| | | | Struct bio is the future carrier of I/O requests for "struct buf".
* The SMP cleanup commit broke UP compiles. Make UP compiles work again.dillon2000-03-281-3/+0
|
* Yet-another-update: rename ``kern.prison'' to a new sysctl root entry,rwatson2000-02-121-9/+1
| | | | | | | | | | ``jail'', and move the set_hostname_allowed sysctl there, as well as fixing a bug in the sysctl that resulted in jails being over-limited (preventing them from reading as well as writing the hostname). Also, correct some formatting issues, courtesy bde :-). Reviewed by: phk Approved by: jkh
* Fix sysctl namespace for jail: move the kern.jailcansethostname torwatson2000-02-101-5/+5
| | | | | kern.prison.set_hostname_allowed, off of the kern.prison node. Future jail twiddles should be placed in this namespace.
* Introduce a new sysctl, kern.jailcansethostname, which determines whetherrwatson2000-02-101-2/+9
| | | | | | | | | | | | or not a process in a jail, with privilege, may set the jail's hostname. Defaults to 1, which permits this. May be set to 0 by a process with appropriate privilege outside of jail. Preventing hostname renaming from within a jail is currently required to make jails manageable, as they a currently identifiable only by hostname using /proc, which may be modified without this sysctl being set to 0. This will be documented in upcoming man commits. Authorized by: jkh, the ever-patient
* Trim unused options (or #ifdef for undoc options).peter1999-10-111-1/+0
| | | | Submitted by: phk
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add sysctl variables for the Linuxulator. These reside under `compat.linux' asmarcel1999-08-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | discussed on current. The following variables are defined (for now): osname (defaults to "Linux") Allow users to change the name of the OS as returned by uname(2), specially added for all those Linux Netscape users and statistics maniacs :-) We now have what we all wanted! osrelease (defaults to "2.2.5") Allow users to change the version of the OS as returned by uname(2). Since -current supports glibc2.1 now, change the default to 2.2.5 (was 2.0.36). oss_version (defaults to 198144 [0x030600]) This one will be used by the OSS_GETVERSION ioctl (PR 12917) which I can commit now that we have the MIB. The default version number is the lowest version possible with the current 'encoding'. A note about imprisoned processes (see jail(2)): These variables are copy-on-write (as suggested by phk). This means that imprisoned processes will use the system wide value unless it is written/set by the process. From that moment on, a copy local to the prison will be used. A note about the implementation: I choose to add a single pointer to struct prison, because I didn't like the idea of changing struct prison every time I come up with a new variable. As a side effect, the extra storage is only needed when a variable is set from within the prison. This also minimizes kernel bloat when the Linuxulator is not used; both compiled in or as a module. Reviewed by: bde (first version only) and phk
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-081-2/+2
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* add debug.sizeof.specinfophk1999-07-201-1/+5
|
* Add sysctl tree debug.sizeof to tell us how big things are. First twophk1999-07-191-1/+10
| | | | entries are struct proc and struct vnode.
* Add sysctl descriptions to many SYSCTL_XXXsbillf1999-05-031-45/+81
| | | | | | | PR: kern/11197 Submitted by: Adrian Chadd <adrian@FreeBSD.org> Reviewed by: billf(spelling/style/minor nits) Looked at by: bde(style)
* This Implements the mumbled about "Jail" feature.phk1999-04-281-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
* Ok, people didn't like kern.conf_dir. Poof, backed out.dillon1999-01-261-6/+1
|
* Add kern.conf_dir sysctl. This is a R+W string used to specify thedillon1999-01-251-1/+6
| | | | | | | | directory containing rc.conf.local and rc.local, and possibly other things in the future. This sysctl is used by the diskless startup code and new rc.conf. If it cannot be found or is empty, the system should revert to using /etc.
* - hw.machine_arch returns cpu architecture type.kato1998-08-311-2/+1
| | | | | | | | | - moved definition of MACHINE_ARCH from cpu.h to parm.h as alpha. - Added definitions of _MACHINE and _MACHINE_ARCH. - Added hw.ispc98. The hw.ispc98 is 1 in PC98 kernel and is 0 in IBM-PC kernel. Discussed with: John Birrell <jb@FreeBSD.ORG>
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B anddufault1998-03-281-8/+4
| | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing.
* Reviewed by: msmith, bde long agodufault1998-03-041-1/+8
| | | | | | | Fix for RTPRIO scheduler to eliminate invalid context switches. POSIX.4 headers and sysctl variables. Nothing should change unless POSIX4 is defined or _POSIX_VERSION is set to 199309.
* Make kern.ncpu reports the number of detected processors when runninggpalmer1997-12-251-1/+8
| | | | with a SMP kernel.
* kern.maxproc is not writable since there are tables that are staticallydg1997-10-191-2/+2
| | | | | sized at startup. PR: 4675
* Move MACHINE_ARCH definition from <machine/param.h> to <machine/cpu.h>.kato1997-08-301-1/+3
| | | | Submitted by: Bruce Evans <bde@zeta.org.au>
* Added a sysctl arg, hw.machine_arch. The hw.machine_arch is "ibm-pc"kato1997-08-291-1/+5
| | | | | on IBM-PC box and is "pc-98" on NEC PC-98 box. Userland program can distinguish architecture on which the program runs.
* Don't ever allow lowering the securelevel at all. Allowing it doesjoerg1997-06-251-2/+2
| | | | | | | | | nothing good except of opening a can of (potential or real) security holes. People maintaining a machine with higher security requirements need to be on the console anyway, so there's no point in not forcing them to reboot before starting maintenance. Agreed by: hackers, guido
* Attach vfs_sysctl() one level lower so that only the levels belowbde1997-03-041-3/+2
| | | | | VFS_GENERIC aren't done in the FreeBSD way. The previous commit broke the nfs sysctls.
* Merged Lite2's vfs_sysctl(). It doesn't fit very well into FreeBSD'sbde1997-03-031-2/+3
| | | | | | | | (phk's) sysctl framework, and I needed special code to disambiguate the VFS_GENERIC node from the VFS_VFSCONF leaf, so I only converted the leaves to the FreeBSD framework. The error handling isn't quite right. CSRGS's sysctls seem to return ENOTDIR too much and FreeBSD's sysctls don't agree with the man page.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Oops, read-only is spelled RD here.bde1996-09-281-21/+21
|
* Fixed bitrot in the read-only attribute:bde1996-09-281-26/+23
| | | | | | | | | - kern.maxproc and kern.maxprocperuid were read-only (and thus essentially useless. Apparently no one uses them). - all the user sysctls were read-write (and thus it was possible for them to be inconsistent with the authoritative fixed values in the library). Removed unused #include.
* Rename KERN_DOMAINNAME to KERN_NISDOMAINNAME so that it can't be confusedwollman1996-07-251-2/+2
| | | | | | with a real Domain Name. Suggested by: Keith Bostic
* Move the "mib" variables out to their own file.phk1996-04-071-0/+170
OpenPOWER on IntegriCloud