summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_xxx.c
Commit message (Collapse)AuthorAgeFilesLines
* more caddr_t removal.alfred2002-06-291-2/+2
|
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-3/+3
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* KSE Milestone 2julian2001-09-121-27/+27
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Pushdown Giant for: profil(), ntp_adjtime(), ogethostname(),dillon2001-09-011-36/+86
| | | | osethostname(), ogethostid(), osethostid()
* This is kind of a hack, but it should work. Currently, world is brokenpeter2001-03-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | because libc/rpc/key_call.c references uname(), and ps/print.c also defines uname(), and ps is linked statically. This leads to a symbol clash. The userland uname(3) kinda sucked anyway as the hostname etc was too short. And since the libc rpc interface now uses the utsname.nodename which gets truncated, I was tempted into doing something about it. Create a new userland uname function, called __xuname() which takes an extra argument that allows you to change the size of the fields. uname() becomes a static inline function in sys/utsname.h that passes the extra argument in. struct utsname has its field members expanded by default now in userland. We still provide a 'uname' externally linkable function for things that either think that they ``know'' the utsname format and assume 32 character strings and bypass the include file, or objects that are linked against old libcs. ie: just about every plausible case that I can think of is covered. Should we ever change the default lengths again, a libc major bump should not be required as the size is now passed to the function. XXX the uname(2) in the kernel is for FreeBSD 1.1 binary compatability! All the uname(3) functions that are exported to userland are actually implemented in libc with sysctl. uname(1) uses sysctl directly and does not call uname(3). PR: bin/4688
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* This Implements the mumbled about "Jail" feature.phk1999-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* Suser() simplification:phk1999-04-271-4/+4
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Change various syscalls to use size_t arguments instead of u_int.dfr1998-08-241-3/+6
| | | | | | | | | | Add some overflow checks to read/write (from bde). Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags and vm_object::paging_in_progress to use operations which are not interruptable. Reviewed by: Bruce Evans <bde@zeta.org.au>
* Make COMPAT_43 and COMPAT_SUNOS new-style options.eivind1997-12-161-1/+3
|
* Move the "retval" (3rd) parameter from all syscall functions and putphk1997-11-061-18/+10
| | | | | | | | | | | | it in struct proc instead. This fixes a boatload of compiler warning, and removes a lot of cruft from the sources. I have not removed the /*ARGSUSED*/, they will require some looking at. libkvm, ps and other userland struct proc frobbing programs will need recompiled.
* 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.
* Collect all the functioons concerned with rebooting into one placejulian1996-08-191-55/+1
| | | | | also add the at_shutdown callout list, and change the one user of the present (broken) method (the vn driver) to use the new scheme.
* Removed unnecessary #includes of vm stuff. Most of them were oncebde1995-12-061-2/+1
| | | | | | | prerequisites for <sys/sysctl.h>. subr_prof.c: Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
* Completed function declarations and/or added prototypes.bde1995-12-021-2/+2
|
* Remove unused var.phk1995-11-201-2/+2
|
* Get rid of domainnamelen.phk1995-11-141-2/+3
|
* Restored the (buggy) historical behaviour of getdomainname().bde1995-11-121-6/+6
| | | | | Negative name lengths for getdomainname() and setdomainname() were converted to large positive ones by misdeclaring the args struct.
* Included <sys/sysproto.h> to get central declarations for syscall argsbde1995-11-121-1/+18
| | | | | | | | | | structs and prototypes for syscalls. Ifdefed duplicated decentralized declarations of args structs. It's convenient to have this visible but they are hard to maintain. Some are already different from the central declarations. 4.4lite2 puts them in comments in the function headers but I wanted to avoid the large changes for that.
* Fixed types of ogethostid() and osethostid(). The args struct namesbde1995-11-111-6/+9
| | | | | | conflicted with the machine generated ones in <sys/sysproto.h>. Fixed type of oquota(). It didn't even use an args struct.
* Make the old compat functions use the sysctl front door, rather thanphk1995-11-091-19/+27
| | | | | crashing through the walls. This should save Peters blood pressure and netscapes uname call.
* Removed unused local variable from shutdown_nice()nate1995-09-061-3/+1
|
* Call boot() instead of cpu_reset() if init isn't running in shutdown_nice.dg1995-08-201-7/+6
|
* Extentd David's recent change to shutdown_nice() by callingjoerg1995-08-061-1/+5
| | | | cpu_reset() directly in case init(8) is *not* running.
* Rewrote shutdown_nice() to fix the init-not-yet-started panic().dg1995-07-301-3/+3
|
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Implemented a "TEXT_SET" called 'cleanup_set' which will be called beforephk1994-12-041-1/+20
| | | | | the reboot takes place (if not RB_NOSYNC that is). The vn driver needs this. Other places might benefit too.
* All of this is cosmetic. prototypes, #includes, printfs and so on. Makesphk1994-10-021-1/+2
| | | | GCC a lot more silent.
* While in the real world, I had a bad case of being swapped out for a lot ofphk1994-09-251-5/+5
| | | | | | | | cycles. While waiting there I added a lot of the extra ()'s I have, (I have never used LISP to any extent). So I compiled the kernel with -Wall and shut up a lot of "suggest you add ()'s", removed a bunch of unused var's and added a couple of declarations here and there. Having a lap-top is highly recommended. My kernel still runs, yell at me if you kernel breaks.
* oget/sethostname: add missing argument to kern_sysctlache1994-09-191-3/+3
| | | | | | Reviewed by: Submitted by: Obtained from:
* Fix up some sloppy coding practices:wollman1994-08-181-6/+1
| | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
* Define a sysctl MIB variable for the YP domain name.wollman1994-08-081-3/+3
|
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+130
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+138
OpenPOWER on IntegriCloud