summaryrefslogtreecommitdiffstats
path: root/sys/netncp/ncp_conn.c
Commit message (Collapse)AuthorAgeFilesLines
* In ncp_conn_alloc(), a new credential pointer, 'owner', is set up to pointrwatson2007-05-271-3/+4
| | | | | | | | | | | | | | | at the credential to be used by the connection. However, the pointer's value was ignored when actually setting hcp->nc_owner. (1) Do set nc_owner to the owner pointer value so that the credential is not discarded after being carefully configured. (2) In the case where we create a new credential with modified uid, copy the existing credential to initialize non-uid fields to existing values, which will lead to a fully initialized MAC label, groups, etc. Found with: Coverity Prevent(tm) CID: 2226
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-0/+1
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* In ncp_sysctl_connstat(), the SLIST_FOREACH() logic to check 'error'rwatson2006-01-141-7/+1
| | | | | | | | | resulted in deadcode, as 'error' could never be 0. What this logic was originally meant to handle is not clear -- it's been this way (broken) since at least RELENG_4. Found with: Coverity Prevent(tm) MFC after: 3 days
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Split the mlock() kernel code into two parts, mlock(), which unpackstruckman2004-02-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the syscall arguments and does the suser() permission check, and kern_mlock(), which does the resource limit checking and calls vm_map_wire(). Split munlock() in a similar way. Enable the RLIMIT_MEMLOCK checking code in kern_mlock(). Replace calls to vslock() and vsunlock() in the sysctl code with calls to kern_mlock() and kern_munlock() so that the sysctl code will obey the wired memory limits. Nuke the vslock() and vsunlock() implementations, which are no longer used. Add a member to struct sysctl_req to track the amount of memory that is wired to handle the request. Modify sysctl_wire_old_buffer() to return an error if its call to kern_mlock() fails. Only wire the minimum of the length specified in the sysctl request and the length specified in its argument list. It is recommended that sysctl handlers that use sysctl_wire_old_buffer() should specify reasonable estimates for the amount of data they want to return so that only the minimum amount of memory is wired no matter what length has been specified by the request. Modify the callers of sysctl_wire_old_buffer() to look for the error return. Modify sysctl_old_user to obey the wired buffer length and clean up its implementation. Reviewed by: bms
* Use __FBSDID().obrien2003-06-111-1/+4
|
* Use td->td_ucred instead of td->td_proc->p_ucred.jhb2003-03-201-1/+1
|
* Catch up with KSE changes.fjoe2003-02-261-86/+98
| | | | Reviewed by: tjr
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Wire the sysctl output buffer before grabbing any locks to preventtruckman2002-07-281-0/+1
| | | | | | | SYSCTL_OUT() from blocking while locks are held. This should only be done when it would be inconvenient to make a temporary copy of the data and defer calling SYSCTL_OUT() until after the locks are released.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-2/+2
| | | | also don't use ANSI string concatenation.
* Change the kernel's ucred API as follows:jhb2001-10-111-4/+2
| | | | | | | | - crhold() returns a reference to the ucred whose refcount it bumps. - crcopy() now simply copies the credentials from one credential to another and has no return value. - a new crshared() primitive is added which returns true if a ucred's refcount is > 1 and false (0) otherwise.
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-06-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind
* Move bindery authentication ncps to ncp_ncp.c file. ncp_login.c will staybp2001-03-221-0/+25
| | | | empty for a while.
* Properly set flags on the broken connection.bp2001-03-221-1/+13
|
* Major update of NCP requester:bp2001-03-101-42/+119
| | | | | | | | | | | | | | | | | Use mchain API to work with mbuf chains. Do not depend on INET and IPX options. Allocate ncp_rq structure dynamically to prevent possible stack overflows. Let ncp_request() dispose control structure if request failed. Move all NCP wrappers to ncp_ncp.c file and all NCP request processing functions to ncp_rq.c file. Improve reconnection logic. Misc style fixes.
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-2/+2
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Make malloc use M_ZERO in some more locations.dwmalone2000-10-291-6/+3
| | | | | | | | Don't check for a null pointer if malloc called with M_WAITOK. Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: bp
* Convert lockmgr locks from using simple locks to using mutexes.jasone2000-10-041-0/+8
| | | | | | Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
* Remove duplicate SYSCTL_NODE() declaration. Kernel linker can't dealbp2000-10-021-1/+0
| | | | with it well.
* 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)
* Back out the previous change to the queue(3) interface.jake2000-05-261-4/+4
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-4/+4
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Do not panic if request issued by kernel.bp2000-04-051-1/+2
| | | | Reported by: Vladimir Poliakov <vnp@mail.kccm.ru>
* Remove unnessary includes.bp1999-10-121-2/+0
|
* Fixed "misspelling" of bcmp as memcmp. memcmp doesn't exist in thebde1999-10-031-1/+1
| | | | | | | | | | kernel, but gcc provides a pessimal builtin for it. Makefile.i386: Added a variable (CONF_CFLAGS) for configuration-specific compiler flags. LINT: Use CONF_CFLAGS to inhibit use of gcc builtins.
* Import kernel part of ncplib: netncp and nwfsbp1999-10-021-0/+541
Reviewed by: msmith, peter Obtained from: ncplib
OpenPOWER on IntegriCloud