Commit Graph

414 Commits

Author SHA1 Message Date
christos
61f2f34223 add missing initializers 2006-09-03 21:29:37 +00:00
christos
2e139ee910 add missing initializers 2006-09-03 07:08:59 +00:00
christos
644f53e4e9 add missing initializers 2006-09-03 06:51:04 +00:00
christos
ce2bae8870 comment out empty code 2006-09-03 06:49:30 +00:00
christos
94de7229ef use c99 initializers 2006-09-03 06:48:26 +00:00
christos
9c03e39ea2 add missing initializer 2006-09-03 05:27:28 +00:00
christos
309d51fb22 add missing initializers 2006-09-03 04:56:33 +00:00
christos
88112b2ad5 add missing initializers 2006-09-02 07:30:30 +00:00
christos
66f851cf96 add missing initializers 2006-09-02 07:12:11 +00:00
reinoud
037fe176f0 Add shortcut for struct long_ad 's Unique ID hint that covers the lower 32
bits of the targeted files 64 bits Unique ID for recovery purposes.
2006-08-31 21:38:14 +00:00
christos
eef4aaba6b Fix getdirentries() issue from FreeBSD PR - 78953 Quoting from that:
If you perform this request on a directory with exactly 50 files
(plus '.' and '..' which brings the total to 52 objects), the first
reply for the SMB server completely satisfies the query (server
side is Windows 2000 Professional).

The smbfs client then performs a TRANS2_FIND_NEXT2 using the last
file name as the resume key.  The response returns a SearchCount
of zero (ctx->f_ecnt == 0) and an EndOfSearch code of zero.

Any attempt to get more entries with calls to TRANS2_FIND_NEXT2
result in Badfid (bad file descriptor).  I suspect the return of
SearchCount of zero means that end-of-search has been reached and
the Sid is now closed.

The solution is to set "SMB_RDD_EOF | SMB_RDD_NOCLOSE" after getting
back a zero SearchCount,  I've tested this in the field on a quite
a few systems, aggressively accessing Windows shares over smbfs
and it appears flawless.

I was initially concerned about the possibility of resource exhaustion
on the Windows server. I was afraid by not officially closing the
search, it would leave a resource hung-up and over time, exhaust
some sort of "open search table" limit.  I've since convinced myself
this is NOT the case.

Windows needs to be able to handle clients that come and go over
time.  If the search is not closed, Windows will close it if it
finds it needs more resources.  I've testing this on directory
searches descending into 10's of thousands of folders, with 100's
of thousands of files.
2006-08-28 15:56:56 +00:00
christos
e28a71d80a add missing initializers 2006-08-28 00:35:22 +00:00
christos
428665231e correct bogus loop test; used to be always true. 2006-08-28 00:28:51 +00:00
tsutsui
b5825ccf25 Change types from int8_t to char for arrays which store char names. 2006-08-26 14:04:55 +00:00
reinoud
5b2c16b797 Fix small though important errors in the Ecma-167 structure definitions. 2006-08-25 17:43:51 +00:00
reinoud
7915eb6468 Fix pool allocation/freeing problem for once and for all correctly. Since
it was initialised quite late due to its reliance on disc data the mount
process could have stopped before initialising and thus could panic again
only now for uninitialising an not initialised pool! *sigh*
2006-08-22 16:52:41 +00:00
reinoud
5223c4995c Make a better guess on VAT locations so discs that are semi-standard
formatted can be recognised. This also fixes the bug that prevented UDF to
mount an empty CD-R/DVD*R disc.
2006-08-21 23:52:19 +00:00
reinoud
445a215f26 Fix spurious panic when twice remounting a bad filingsystem. It then gets
the same memory block allocated as before and it bombs out on its
descriptor pool allready being initialised. It turns out that the pool was
not allways destroyed. This fix ought to clean it up whatever the cause of
the mishap that results in a reject.
2006-08-21 22:23:09 +00:00
gdt
7db024f8e7 When mounting an MSDOS fileysystem, do not require that bytes 252 and
253 of the superblock be zero.  Searching the net failed to find any
justification for checking these bytes; all available references say
that they are part of the boot code and not BOOTSIG2 and BOOTSIG3.

Modify the MSDOS 7.1 bootsector definition to have 420 bytes of boot
code and no BOOTSIG[23], rather than 418 bytes of boot code, to follow
available references and apparent Windows practice.  A test build
showed that these defines are not used other than in the check removed
by this commit.

Patch tested on netbsd-3, and enabled mounting of a 4 GB CF formatted
under Windows XP and then in a digital camera.  The CF was previously
unmountable.

Concept approved on tech-kern by christos@ and martin@.
2006-08-14 14:06:26 +00:00
reinoud
177a68d51b Fix comment; it stated a mimimum of 128 translations duh! a maximum it is! 2006-08-11 23:15:30 +00:00
reinoud
9e6b675112 Fix panic on badly or curruptly formatted discs due to an oddity in the
error handling chain.

If NetBSD 4.0 is allready branched at this time this ought to be pulled up.
2006-08-10 12:39:56 +00:00
reinoud
81e6c818c1 The local variable `index' seems shadowing an inbuild gcc variable (???)
when compiling from userland (kernel ok) so rename the variable to Index to
avoid the confusing warning.
2006-08-10 12:26:44 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
martin
a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
reinoud
b1b70c855b Fixing a bad case of walking/writing out of allocated space.... the
allocated space was 2048 bytes, but when adding 1024 to the variable
`unix_name' to split the allocated space in half it effectively starts just
OUTSIDE the allocated space. This ought to fix memory corruption bugs when
using UDF.

This is a routine to revisit one day.
2006-07-09 13:58:47 +00:00
martin
6bfe6be406 Make it compile on 64 bit machines 2006-07-06 21:55:06 +00:00
martin
931985243c Redo previous differently - just use time_second.
Pointed out by Frank Kardel.
2006-07-01 10:12:36 +00:00
martin
c627e877cf Make it compile post time-counter merge 2006-07-01 08:42:39 +00:00
tron
a0d2802c69 Make this compile again. 2006-06-20 09:17:14 +00:00
christos
18b73e414c Don't allocate too much stuff on the stack. 2006-06-20 03:22:12 +00:00
christos
0c1391f078 remove ; from }; 2006-06-12 00:20:21 +00:00
christos
06595cb85e stack polics: Don't allocate 4K on the stack.
remove ; from };
2006-06-12 00:18:06 +00:00
kardel
de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
yamt
725fa55be5 hide more by ifdef _KERNEL. 2006-05-27 09:12:31 +00:00
yamt
fa971123c3 revive copyright notice for the code derived from libc/locale/utf2.c.
i've asked jdolecek@ about this, but got no reply.
2006-05-20 08:28:27 +00:00
yamt
ad696ab2dc don't try to dereference kauth_cred_t. 2006-05-15 12:51:21 +00:00
yamt
240883e159 include kauth.h for NOCRED. 2006-05-15 11:16:16 +00:00
christos
641b7ad824 More kauth fallout. 2006-05-15 01:29:02 +00:00
christos
fc6d984beb kauth fallout 2006-05-15 00:05:16 +00:00
elad
fc9422c9d9 integrate kauth. 2006-05-14 21:31:52 +00:00
he
355013fbd7 Don't use MALLOC_DECLARE() unless _KERNEL is defined.
Fixes build problem of usr.bin/fstat/ for vax.
2006-05-14 12:25:11 +00:00
mrg
e012cb30a7 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-11 01:12:21 +00:00
mrg
79652075f7 ntfs_runtovrun takes u_int8_t * not caddr_t 2006-05-11 01:11:11 +00:00
christos
93f1cb3704 Do the count check after we process getargs. 2006-04-28 19:17:45 +00:00
snj
d97db3840b s/allready/already/ 2006-04-25 02:19:31 +00:00
christos
5da80a50f2 Coverity CID 1138: Add KASSERT before deref. 2006-04-15 04:06:03 +00:00
christos
4a420185b2 Coverity CID 1197: Add KASSERT before deref. 2006-04-15 04:02:40 +00:00
christos
daeb76efcb Coverity CID 1135: Add KASSERT before deref. 2006-04-15 04:01:41 +00:00
christos
2ce6f7c5c6 Coverity CID 1093: Fix NULL deref. 2006-04-15 03:59:23 +00:00
christos
03372c0db6 Coverity CID 1001: Avoid NULL deref. 2006-04-15 03:56:25 +00:00