Commit Graph

219 Commits

Author SHA1 Message Date
christos
e7ae23fd9e include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
ozaki-r
b71bd7bda7 Remove leftover IPX-related stuffs
No objection on tech-kern and tech-net.
2015-05-25 08:29:01 +00:00
rtr
7d22c643f0 pass connect address directly to soconnect()
instead of allocating an mbuf, copying the address into it and then
mtod()'ing it back to a sockaddr * for soconnect.
2015-05-22 22:05:32 +00:00
rtr
fd12cf39ee make connect syscall use sockaddr_big and modify pr_{send,connect}
nam parameter type from buf * to sockaddr *.

final commit for parameter type changes to protocol user requests

* bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect}
2015-05-02 17:18:03 +00:00
nakayama
8c1c14022f Adjust smbfs/netsmb for filenames byte length changes that come as
a result of iconv conversion.  Most codes are taken from FreeBSD.
2014-11-15 18:52:44 +00:00
nakayama
fb45a1eb84 Make rump_smbfs(8) uses host iconv(3) to convert filenames
character set.
2014-11-15 18:49:04 +00:00
matt
82ef6ef7b8 Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.
2014-09-05 09:26:16 +00:00
dholland
f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
rmind
4ae03c1815 - Split off PRU_ATTACH and PRU_DETACH logic into separate functions.
- Replace malloc with kmem and eliminate M_PCB while here.
- Sprinkle more asserts.
2014-05-19 02:51:24 +00:00
pooka
545c78295e whoops, remove testing printf 2014-04-25 15:54:12 +00:00
pooka
2324105436 Remove pollsock(). Since it took only a single socket, it was essentially
a complicated way to call soreceive() with a sb_timeo.  The only user
(netsmb) already did that anyway, so just had to delete the call to
pollsock().
2014-04-25 15:52:45 +00:00
dholland
a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
joerg
5698ed750d Don't dereference NULL pointers. 2014-02-20 11:08:57 +00:00
nakayama
fb4e31b6db Improve smbfs timestamp handling.
Don't round timestamp to 2 seconds resolution if the server
supports the CAP_INFOLEVEL_PASSTHRU capability.
2012-11-30 23:24:21 +00:00
nakayama
5f60ff96cb - fix endian cofusion around FID, which is used as is, so no need
to do byte swapping.
- put right value to ByteCount of SMB_COM_NT_CREATE_ANDX request.

The fix makes smbfs actually works on big-endian port.
2012-11-24 19:48:24 +00:00
nakayama
361b8e4249 Tabify. 2012-05-12 01:40:37 +00:00
nakayama
0c073a1ca9 Since "len" has changed to (unsinged) size_t, the while loop
condition (len > 0) became less able to detect its underflow.
So check the subtrahend to avoid the underflow.

Should fix PR kern/44092.
2012-05-11 14:51:39 +00:00
dsl
e05eb71de5 Remove everything to do with 'struct malloc_type' and the malloc link_set.
To make code in 'external' (etc) still compile, MALLOC_DECLARE() still
  has to generate something of type 'struct malloc_type *', with
  normal optimisation gcc generates a compile-time 0.
MALLOC_DEFINE() and friends have no effect.
Fix one or two places where the code would no longer compile.
2012-04-29 20:27:31 +00:00
elad
0c9d8d15c9 Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
2012-03-13 18:40:26 +00:00
christos
8b0d7f915b rename SMBFS_MAXFNAMELEN to SMBFS_MAXNAMLEN for consistency 2011-09-27 02:05:10 +00:00
christos
9d292e0f12 remove unused constant 2011-09-27 01:16:35 +00:00
chs
4364c9c0d3 don't mix static and non-static MALLOC_DEFINE()s in the same file,
it fails to compile with gcc 4.5 on alpha.
2011-09-25 13:42:30 +00:00
plunky
7f3d4048d7 NULL does not need a cast 2011-08-31 18:31:02 +00:00
pooka
f4f60017b9 * remove #ifdef nonsense (which caused the lossage in the first place)
* make it a DRIVER so that it autoloads when /dev/nsmb is opened
2010-12-17 14:27:34 +00:00
pooka
3a3ba15647 Try to unbreak module a little. It would be really nice to not
utterly break things in the name of modularization, especially if
avoiding breakage takes 2min.
2010-12-17 13:24:45 +00:00
pooka
8fb9443f66 unifdef -D__NetBSD__ 2010-12-17 13:05:29 +00:00
ahoka
3531a9ba6c take two on module support
XXX this wont work as a builtin module
2010-12-15 12:58:13 +00:00
christos
a39b3d540d Back this out. Fails lockdebug with duplicate lock initialization.
Please test with LOCKDEBUG!
2010-12-11 04:21:17 +00:00
ahoka
6110939092 Module support for NetBSD 2010-12-10 19:44:18 +00:00
christos
94320bc4fd Convert sizes/lengths to unsigned (size_t) or uint32_t
(for binary compatibility).
2010-07-12 02:58:01 +00:00
hannken
245651a23d Remove vlockmgr(). Generic vnode lock operations now use a rwlock located
in the vnode.  All LK_* flags move from sys/lock.h to sys/vnode.h.  Calls
to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK().

Welcome to 5.99.34.

Discussed on tech-kern.
2010-07-01 13:00:54 +00:00
tron
f996d27b06 Fix cut & paste error spotted by Nicolas Joly. 2009-10-18 23:20:31 +00:00
tron
9c260cf349 Fix detection of SMB capabilities according to the CIFS spec:
1.) SMB_CAP_LARGE_FILES advertises support for 64-bit file offsets.
2.) SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX advertise support for
    large reads and writes (larger than 64KB).
The code previously only used SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX
which is not correct and doesn't work for the Apple Time Capsule which
only supports SMB_CAP_LARGE_FILES. With these changes SMBFS can copy a
5GB to a Time Capsule and read it back without problems.

Thanks a lot to Allen Briggs for pointing out the broke assumptions
and explaining the CIFS spec to me. This fixes PR kern/42175.
2009-10-18 22:53:36 +00:00
njoly
3ca0c64cb2 Do not call smb_rqpool_fini() on device close. Otherwise, we'll crash
trying to use destroyed pools for SMB request.
2009-09-21 14:13:35 +00:00
pooka
df6e37fb47 Convert POOL_INITs to proper cons/destructors. 2009-09-12 12:52:21 +00:00
pooka
d42676af17 add comment to previous stating periodic wakeups can be nuked
once smb is mpsafe.
2009-09-04 16:18:34 +00:00
pooka
d25f4faa30 defensive programming: wake up iod thread once a second "just in case" 2009-09-04 16:16:52 +00:00
pooka
56df608091 Send data for as long as there is new data available. Otherwise
there was a danger of smb_iod_recvall() blocking, hence releasing
the kernel lock, new data creeping into the queue, and a wakeup
being missed (well, there's still a race, but since it's theoretical
enough for me to never have encountered it, I'll rather solve it
by periodic wakeups).
2009-09-04 16:12:45 +00:00
tls
8c208552ae Grr. One last thing from the upcall-direction patch which I failed to
check in correctly.
2009-09-04 01:41:06 +00:00
pooka
7f37fbb7ea Install smb headers relevant for userspace and make mount_smbfs
use installed headers instead of src/sys.
2009-09-03 12:04:50 +00:00
pooka
3ef732fbf6 fix tybo 2009-09-01 12:23:36 +00:00
njoly
03324155b9 Do initialise the callout when fetching a new request structure from
the pool, not when starting the timer. Likewise, destroy the callout
when giving back the item to the pool.
2009-07-06 11:46:49 +00:00
njoly
d90ab2e01d Do not call callout_stop() unless the structure was previoulsy
initialised for a non null timeout.
2009-07-01 10:01:28 +00:00
tsutsui
d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
christos
2b1b4bc6ef Move the internal poll/select related API's to use timespec instead
of timeval (rides the uvm bump).
2009-03-29 19:21:19 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
35fb64746b bcmp -> memcmp 2009-03-18 15:14:29 +00:00
yamt
812bb0d164 restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.
2009-01-21 06:59:29 +00:00
cegger
dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00