summaryrefslogtreecommitdiffstats
path: root/sys/netsmb
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.tanimura2002-05-311-9/+1
| | | | Requested by: hsu
* Fix trivial warning:peter2002-05-241-0/+1
| | | | smb_iod.c:560: deprecated use of label at end of compound statement
* Lock down a socket, milestone 1.tanimura2002-05-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a mutex (sb_mtx) to struct sockbuf. This protects the data in a socket buffer. The mutex in the receive buffer also protects the data in struct socket. o Determine the lock strategy for each members in struct socket. o Lock down the following members: - so_count - so_options - so_linger - so_state o Remove *_locked() socket APIs. Make the following socket APIs touching the members above now require a locked socket: - sodisconnect() - soisconnected() - soisconnecting() - soisdisconnected() - soisdisconnecting() - sofree() - soref() - sorele() - sorwakeup() - sotryfree() - sowakeup() - sowwakeup() Reviewed by: alfred
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.tanimura2002-04-301-4/+7
| | | | | | | | | | Requested by: bde Since locking sigio_lock is usually followed by calling pgsigio(), move the declaration of sigio_lock and the definitions of SIGIO_*() to sys/signalvar.h. While I am here, sort include files alphabetically, where possible.
* Move the new byte order function prototypes from <sys/param.h> tomike2002-04-263-0/+3
| | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD.
* Initialize thread select queue in the same way as rev 1.93 of sys_generic.cbp2002-04-231-0/+3
| | | | | | does. Missed and found by: alfred
* Recongnize more error codes returned by W2K servers.bp2002-04-172-1/+14
| | | | MFC after: 4 days
* Add more NetBIOS name types.bp2002-04-171-2/+9
| | | | MFC after: 4 days
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | 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@
* Missed this file for select SMP fixes associated with rev 1.93 ofalfred2002-03-141-27/+24
| | | | kern/sys_generic.c
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-274-5/+4
| | | | reference.
* Remove redundant checks for iovcnt > 1. This should be handled properlybp2002-02-211-7/+7
| | | | | | | in the subr_mchain. Obtained from: Darwin project MFC after: 2 weeks
* Add unicode related definition for future use. Descibe Samba bug.bp2002-02-212-1/+10
| | | | | Obtained from: Darwin project MFC after: 2 weeks
* Add subfunction definition for future use.bp2002-02-211-0/+1
| | | | MFC after: 2 weeks
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-131-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Spelling fixes.bp2001-12-316-14/+14
| | | | | | PR: kern/33131 Submitted by: Anders Andersson <anders@hack.org> MFC after: 1 week
* o Make the credential used by socreate() an explicit argument torwatson2001-12-311-1/+2
| | | | | | | | | | | | | | socreate(), rather than getting it implicitly from the thread argument. o Make NFS cache the credential provided at mount-time, and use the cached credential (nfsmount->nm_cred) when making calls to socreate() on initially connecting, or reconnecting the socket. This fixes bugs involving NFS over TCP and ipfw uid/gid rules, as well as bugs involving NFS and mandatory access control implementations. Reviewed by: freebsd-arch
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-103-8/+8
| | | | also don't use ANSI string concatenation.
* - Replace M_WAIT with M_TRYWAIT since the M_WAIT flag is deprecated.arr2001-12-092-2/+2
| | | | Spotted by: bde
* Pull netsmb requester from the pre-KSE world. This update mostly basedbp2001-12-0210-176/+188
| | | | on the patches submitted by Max Khon <fjoe@iclub.nsu.ru>
* Map errdos:67 to the ENOENT.bp2001-08-211-0/+1
| | | | | Obtained from: Mac OS X MFC after: 1 week
* Use local wrappers instead of direct calls to mtx_destroy().bp2001-08-211-3/+3
| | | | | Obtained from: Mac OS X MFC after: 1 week
* Remove unnecessary "#if __FreeBSD_version".bp2001-08-213-59/+0
|
* Use proper endian conversions.bp2001-08-212-2/+2
| | | | | Obtained from: Mac OS X MFC after: 1 week
* Fix an old off-by-one error causing well known 'wrong bucket' panic.bp2001-08-211-1/+1
| | | | | Submitted by: Conrad Minshall <conrad@mac.com> MFC after: 1 week
* Remove bogus include.bp2001-06-141-3/+0
|
* 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
* Sync with recent KAME.ume2001-06-111-2/+2
| | | | | | | | | | | | | | | | | | This work was based on kame-20010528-freebsd43-snap.tgz and some critical problem after the snap was out were fixed. There are many many changes since last KAME merge. TODO: - The definitions of SADB_* in sys/net/pfkeyv2.h are still different from RFC2407/IANA assignment because of binary compatibility issue. It should be fixed under 5-CURRENT. - ip6po_m member of struct ip6_pktopts is no longer used. But, it is still there because of binary compatibility issue. It should be removed under 5-CURRENT. Reviewed by: itojun Obtained from: KAME MFC after: 3 weeks
* Back out scanning file descriptors with holding a process lock.tanimura2001-05-151-2/+16
| | | | | selrecord() requires allproc sx in pfind(), resulting in lock order reversal between allproc and a process lock.
* - Convert msleep(9) in select(2) and poll(2) to cv_*wait*(9).tanimura2001-05-141-9/+13
| | | | | | | | | | | | | - Since polling should not involve sleeping, keep holding a process lock upon scanning file descriptors. - Hold a reference to every file descriptor prior to entering polling loop in order to avoid lock order reversal between lockmgr and p_mtx upon calling fdrop() in fo_poll(). (NOTE: this work has not been done for netncp and netsmb yet because a socket itself has no reference counts.) Reviewed by: jhb
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-6/+7
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* This file also depends on sys/types.h and sys/ioccom.h.bp2001-04-131-7/+6
| | | | | | Remove some old junk. Submitted by: bde
* Pull constants from netsmb/smb.h.bp2001-04-111-0/+2
|
* Import kernel part of SMB/CIFS requester.bp2001-04-1017-0/+6690
Add smbfs(CIFS) filesystem. Userland part will be in the ports tree for a while. Obtained from: smbfs-1.3.7-dev package.
OpenPOWER on IntegriCloud