aboutsummaryrefslogtreecommitdiff
path: root/sys/netsmb
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite the code that uses the try/catch paradigm implemented byMarcel Moolenaar2003-08-233-124/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | goto and abstracted by the itry, ithrow and icatch macros (among others). The problem with this code is that it doesn't compile on ia64. The compiler is sufficiently confused that it inserts a call to __ia64_save_stack_nonlock(). This is a magic function that saves enough of the stack to allow for non-local gotos, such as would be the case for nested functions. Since it's not a compiler defined function, it needs a runtime implementation. This we have not in a standalone compilation as is the kernel. There's no indication that the compiler is not confused on other platforms. It's likely that saving the stack in those cases is trivial enough that the compiler doesn't need to off-load the complexity to a runtime function. The code is believed to be correctly translated, but has not been tested. The overall structure remained the same, except that it's made explicit. The macros that implement the try/catch construct have been removed to avoid reintroduction of their use. It's not a good idea. In general the rewritten code is slightly more optimal in that it doesn't need as much stack space and generally is smaller in size. Found by: LINT Notes: svn path=/head/; revision=119376
* Reserve space for the trailing null byte in the srvname member ofTim J. Robbins2003-07-271-1/+1
| | | | | | | | | struct smb_vc_info. PR: 46902 Notes: svn path=/head/; revision=118078
* size_t != int. Make this compile on 64 bit platforms (eg: amd64).Peter Wemm2003-07-241-2/+1
| | | | | | | Also, "u_short value; if (value > 0xffff)" can never be true. Notes: svn path=/head/; revision=117949
* Add a f_vnode field to struct file.Poul-Henning Kamp2003-06-221-1/+1
| | | | | | | | | | | | | | | Several of the subtypes have an associated vnode which is used for stuff like the f*() functions. By giving the vnode a speparate field, a number of checks for the specific subtype can be replaced simply with a check for f_vnode != NULL, and we can later free f_data up to subtype specific use. At this point in time, f_data still points to the vnode, so any code I might have overlooked will still work. Notes: svn path=/head/; revision=116678
* Avoid dereferencing the thread pointer in smb_iod_addrq() if it's NULL.Tim J. Robbins2003-06-141-1/+2
| | | | | | | | Fixes mdconfig -t vnode on smbfs: mdsetcred()'s "horrible kludge" calls into smbfs VOP_READ with a NULL uio_td. Notes: svn path=/head/; revision=116339
* Use __FBSDID().David E. O'Brien2003-06-119-18/+35
| | | | Notes: svn path=/head/; revision=116189
* - Merge struct procsig with struct sigacts.John Baldwin2003-05-131-1/+3
| | | | | | | | | | | | | | | | | | | | - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson) Notes: svn path=/head/; revision=114983
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withJeff Roberson2003-03-314-10/+12
| | | | | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK. Notes: svn path=/head/; revision=112888
* Remove fragments of support for the FreeBSD 3.x and 4.x branches.Tim J. Robbins2003-03-062-5/+0
| | | | Notes: svn path=/head/; revision=111944
* Finish driving a stake through the heart of netns and the associatedPeter Wemm2003-03-051-3/+0
| | | | | | | | | ifdefs scattered around the place - its dead Jim! The SMB stuff had stolen AF_NS, make it official. Notes: svn path=/head/; revision=111926
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+5
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* Use noread(), nowrite() and nopoll() instead of our own stub functions.Tim J. Robbins2003-02-271-24/+3
| | | | Notes: svn path=/head/; revision=111621
* NODEVFS cleanup: Don't call cdevsw_{add,remove}()Poul-Henning Kamp2003-02-261-2/+0
| | | | Notes: svn path=/head/; revision=111574
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-198-25/+25
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Lock proc while manipulating p_sigmask p_sigignore and p_siglist.Tim J. Robbins2003-02-141-1/+5
| | | | Notes: svn path=/head/; revision=110849
* Pass a minor number instead of a unit number to make_dev().Tim J. Robbins2003-02-071-3/+4
| | | | | | | Devices with the wrong major were being created for units >255. Notes: svn path=/head/; revision=110525
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-218-25/+25
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Bow to the whining masses and change a union back into void *. RetainMatthew Dillon2003-01-131-1/+1
| | | | | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it. Notes: svn path=/head/; revision=109153
* Change struct file f_data to un_data, a union of the correct structMatthew Dillon2003-01-121-1/+1
| | | | | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit. Notes: svn path=/head/; revision=109123
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-011-1/+1
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* When compiling the kernel do not implicitly include filedesc.h from proc.h,Alfred Perlstein2003-01-011-0/+1
| | | | | | | | | this was causing filedesc work to be very painful. In order to make this work split out sigio definitions to thier own header (sigio.h) which is included from proc.h for the time being. Notes: svn path=/head/; revision=108524
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} andBosko Milekic2002-12-191-1/+1
| | | | | | | | | | | | | the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}. o Fix a bpf_compat issue where malloc() was defined to just call bpf_alloc() and pass the 'canwait' flag(s) along. It's been changed to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT flag (and only one of those two). Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++) Notes: svn path=/head/; revision=108107
* Remove the hto(be|le)[slq] and (be|le)toh[slq] macros defined inRobert Drehmel2002-12-164-5/+5
| | | | | | | | | | | | | | _KERNEL scope from "src/sys/sys/mchain.h". Replace each occurrence of the above in _KERNEL scope with the appropriate macro from the set of hto(be|le)(16|32|64) and (be|le)toh(16|32|64) from "src/sys/sys/endian.h". Tested by: tjr Requested by: comment marked with XXX Notes: svn path=/head/; revision=107940
* fix connecting to (samba) server when share-level security is in effectMax Khon2002-12-071-1/+1
| | | | | | | | | | (do not send second password at all) Approved by: bp, re MFC after: 1 week Notes: svn path=/head/; revision=107666
* Fix a fatal typo introduced in revision 1.13 that caused the mbuf chains toTim J. Robbins2002-11-261-1/+1
| | | | | | | | | be created incorrectly for requests larger than NB_SORECEIVE_CHUNK bytes. Approved by: re Notes: svn path=/head/; revision=107293
* - Change mb_copy_t to take a size_t as the length argument instead of anJohn Baldwin2002-11-081-2/+2
| | | | | | | | | | int. - Change the local variable in smb_copy_iconv() from an int to a size_t. These make smb_copy_iconv() happy in a 64-bit world. Notes: svn path=/head/; revision=106667
* Some kernel threads try to do significant work, and the default KSTACK_PAGESScott Long2002-10-021-1/+1
| | | | | | | | | | | | | | | | doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates. Reviewed by: jake, peter, jhb Notes: svn path=/head/; revision=104354
* Back our kernel support for reliable signal queues.Juli Mallett2002-10-011-3/+2
| | | | | | | Requested by: rwatson, phk, and many others Notes: svn path=/head/; revision=104306
* Convert use of p_siglist and old SIG*() macros to use <sys/ksiginfo.h>Juli Mallett2002-09-301-2/+3
| | | | | | | | | prototyped functions to get a sigset_t, and further to check for any queued signals, rather than an empty signal set, to go with the move to signal queues rather than signal sets. Notes: svn path=/head/; revision=104235
* Use m_length() instead of home-rolled versions.Poul-Henning Kamp2002-09-181-3/+1
| | | | Notes: svn path=/head/; revision=103554
* Add missing #include <sys/mbuf.h>Poul-Henning Kamp2002-09-181-0/+1
| | | | Notes: svn path=/head/; revision=103543
* Permit an empty username which is useful for browsing.Boris Popov2002-09-181-0/+4
| | | | Notes: svn path=/head/; revision=103529
* Increase send/receive queue to accomodate large readx/writex requests.Boris Popov2002-09-182-22/+78
| | | | | | | | | | Receive packets in a small pieces (NB_SORECEIVE_CHUNK), so TCP slowstart will get its ACKs faster. Obtained from: Darwin Notes: svn path=/head/; revision=103528
* Reserve a transport parameter name and number for Darwin.Boris Popov2002-09-161-0/+1
| | | | | | | | Obtained from: Darwin MFC after: 2 weeks Notes: svn path=/head/; revision=103397
* Implement support for mixed case passwords.Boris Popov2002-09-162-7/+77
| | | | | | | | Obtained from: Darwin MFC after: 2 weeks Notes: svn path=/head/; revision=103396
* Add support for large readx and writex functions if server supports them.Boris Popov2002-09-162-0/+178
| | | | | | | | Obtained from: Darwin MFC after: 2 weeks Notes: svn path=/head/; revision=103395
* Enable browsing of NetApp servers (use ascii mode).Boris Popov2002-09-161-1/+4
| | | | | | | | Obtained from: Darwin (PR-3002667) MFC after: 2 weeks Notes: svn path=/head/; revision=103391
* Add more constants for future use in kernel and userland.Boris Popov2002-09-161-8/+64
| | | | | | | Obtained from: Darwin Notes: svn path=/head/; revision=103389
* <sys/lock.h> is a prerequisite for <sys/mutex.h>, so include the formerBruce Evans2002-08-271-0/+1
| | | | | | | | here before the latter instead of depending on namespace pollution in <sys/mumble.h> or on accidentally placed includes in netsmb/*.c. Notes: svn path=/head/; revision=102481
* Include <sys/lockmgr.h> for old lock interfaces instead of includingBruce Evans2002-08-271-1/+1
| | | | | | | <sys/lock.h> solely for its namespace pollution. Notes: svn path=/head/; revision=102479
* Wire the sysctl output buffer before grabbing any locks to preventDon Lewis2002-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. Notes: svn path=/head/; revision=100831
* Back out my lats commit of locking down a socket, it conflicts with hsu's work.Seigo Tanimura2002-05-311-9/+1
| | | | | | | Requested by: hsu Notes: svn path=/head/; revision=97658
* Fix trivial warning:Peter Wemm2002-05-241-0/+1
| | | | | | | smb_iod.c:560: deprecated use of label at end of compound statement Notes: svn path=/head/; revision=97209
* Lock down a socket, milestone 1.Seigo 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 Notes: svn path=/head/; revision=96972
* Revert the change of #includes in sys/filedesc.h and sys/socketvar.h.Seigo 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. Notes: svn path=/head/; revision=95759
* Move the new byte order function prototypes from <sys/param.h> toMike Barcroft2002-04-263-0/+3
| | | | | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD. Notes: svn path=/head/; revision=95533
* Initialize thread select queue in the same way as rev 1.93 of sys_generic.cBoris Popov2002-04-231-0/+3
| | | | | | | | | does. Missed and found by: alfred Notes: svn path=/head/; revision=95313
* Recongnize more error codes returned by W2K servers.Boris Popov2002-04-172-1/+14
| | | | | | | MFC after: 4 days Notes: svn path=/head/; revision=94914
* Add more NetBIOS name types.Boris Popov2002-04-171-2/+9
| | | | | | | MFC after: 4 days Notes: svn path=/head/; revision=94913