Commit Graph
44 Commits
Author SHA1 Message Date
Olaf Barthel 561ca54b8f Updated to version 2.20
If the Examine/ExNext/ExAll functions need to restart directory scanning, the cache maintained by the smbfs directory reader is now always cleared.

Removed the directory cache expiration time feature, along with the just-introduced CACHEEXPIRES option. The context in which the expiration time was used did not justify it as a feature. It looked more like a bug...

Rewrote the smba_readdir() function to perform its only task in a much simpler manner. It now either fills the directory cache or retrieves the cache entries to be delivered to the caller, resuming the retrieval at a predefined position if required.
2019-02-28 11:04:35 +01:00
obarthel d8adddb851 Updated to version 2.19
smb_proc_readdir_short() now updates the scan resume information for every directory entry it can process and actually uses the scan resume information when asked to resume scanning.

If the directory cache becomes stale before the contents have been processed, scanning will have to be restarted. smbfs now tells the server that the scan operation has been aborted before it is started again.

Directory scanning in combination with deletion operations can collapse if the directory cache becomes stale before all the relevant entries have been processed. You can now tune how long the cache will remain active, which previously was a period of 5 seconds. The current default is 10 seconds, which definitely helps. Use the new CACHEEXPIRES option to change how long the cache is considered good enough.
2019-02-23 12:26:49 +01:00
obarthel 577723f797 Updated to version 2.14
Documented the directory cache a bit better, including the reason why the cache may have been invalidated while the directory contents were being read.

The directory read operation now verifies that it does not run out of cache entries while it is processing new directory records it received from the server.

The directory read operation now both detects whether or not the last entry has been read, this information is now also provided to the function which retrieved the directory entries. This change is in support of improved directory entry caching.

The directory cache now keeps better track of what's actually in it. If a directory entry could not be extracted and decoded, the number of directory entries read would not match the number of entries available from the cache, for example.

A flag now tracks if the directory cache is valid or not. Previously, checking for a valid cache involved looking at a NULL pointer.

If allocating memory for the directory cache failed partly, then there may have been invalid string pointers in the cache table, leading to a crash when trying to release the cache. Fixed.

Adding another entry to the cache, invalidating the cache or resetting the cache now all use dedicated functions instead of directly manipulating the assorted data structures.
2019-02-15 16:20:35 +01:00
obarthel 401f1291e3 Updated to version 2.12
Found a couple more cases in which debug output did not use the correct parameter information. This happened, for example, in the SMB write operation (which did not correctly report the 64 bit seek offset) and the ACTION_SET_COMMENT implementation which did not print the comment string correctly.

Added a proper string length limit check for the text buffers used by the DateToStr() function.

Enabled profiling support for SAS/C to learn more about the most frequently-used functions and their respective running times. Added inline qualifiers to these functions, or copied the respective function to where it was called, allowing it to be inlined.

The main file system processing loop no longer calls WaitSelect() every time it needs to wait for a new packet to arrive, or for a NetBIOS "keep alive" message to come along. It now defaults to calling Wait(), which has a much lower overhead than WaitSelect(). However, periodic calls to WaitSelect() and the associated NetBIOS "keep alive" handling are scheduled regularly every 10 seconds. That way the "keep alive" messages are dealt with without spending too much time with WaitSelect().
2019-01-06 10:45:39 +01:00
obarthel 2f0c186ff6 Updated to version 2.11
The ACTION_SETDATE operation again changes both the file/directory creation date/time and the last modification date/time. Because some SMB servers will not return a valid modification date/time, the creation date/time will be substituted when directory entry information is converted into the appropriate AmigaDOS data structures. This is problematic if only the modification time/dated is updated by the ACTION_SETDATE operation because the change may appear not to "stick".

The SMB function which would be used to update both the modification and the creation time stamps did not take care to preserve the creation time stamp. This might have contributed to the ACTION_SETDATE operation not having a noticeable effect.

The debug code no longer uses FORMAT_DEF for converting AmigaDOS time stamp information into readable text, but uses FORMAT_DOS instead. This is an attempt to track down a hard to detect bug in the debug code which might be related to locale.library date conversion. Because the buffer size for the date and time information is limited, the locale settings might just produce too much text to fit into the buffers. But that's only a theory so far...

The functions which the debug code uses to prepare 64 bit integers and strings for display are now a bit more paranoid in watching the lengths of the resulting strings, reporting possible buffer overflows.

Went over all the debug output text format strings with a fine-toothed comb and actually found a few instances of the formatting parameters not being entirely correct.

The assert.c code makes a bit more of an effort to handle NULL strings for display.

The non-debug builds of smbfs now complain again if any of the debug parameters are being used.
2018-12-31 12:16:16 +01:00
obarthel 781ed01675 Updated to version 2.10
The smb_receive_raw() function in "sock.c" again copies the NetBIOS header into the receive buffer separately, rolling back an earlier change which did not seem to be sound, and also served to make complicated code even more complicated :-/

Added the SCATTERGATHER tuning option which defaults to "no". Instead of breaking down write operations into two separate send() calls (one short, one very large), setting SCATTERGATHER=yes can call sendmsg() instead which allows the entire operation to be completed in one single step. This approach was suggested by Patrik Axelsson. Currently, I am uncertain if all AmiTCP V3/V4 TCP/IP stacks implement sendmsg() for TCP sockets in the same consistent manner, which is why this feature is not enabled by default.
2018-12-29 10:46:35 +01:00
obarthel d0250562c3 Updated to version 2.9
Added the TCP_NODELAY, SO_RCVBUF and SO_SNDBUF tuning options which serve the same purposes as their Samba configuration option counterparts.
2018-12-24 12:32:19 +01:00
Olaf Barthel 81598879d5 Updated to version 2.8
Added the WRITETHRESHOLD parameter which can be used to disable the separate transmission of the SMB message header and its payload if the combined sizes of both are smaller than or equal to the threshold value. This is intended to improve write performance for small amounts of data which would otherwise linger in the transmission queue.

Added the READTHRESHOLD counterpart to WRITETHRESHOLD which affects the read operations.

The smb_receive_raw() function in "sock.c" no longer copies the NetBIOS header into the receive buffer separately, but makes sure that the initial receive operation takes care of it.

The allocate_path_name() function in "smb_abstraction.c" failed to put the path separator character where it should be, resulting in the path name and the file/directory name to get lumped together. This affected creation of files and directories both.

The default values for READTHRESHOLD and WRITETHRESHOLD now have the effect of transmitting the SMB header and the payload separately, just like it was introduces in version 2.1.

Use something like READTHRESHOLD=1500 and WRITETHRESHOLD=1500 to send packets smaller than or equal to 1500 bytes as a combined lump of data, and data larger than 1500 bytes as separate SMB header and payload.

When processing the share name the limitations on the individual components (server name, share, port number/IP service name) are no longer verified using hard-coded lengths, but use the respective buffer limits instead. The port number/IP service name length check is new.

Added more debug log output to the code which now performs the file and lock name/address lookups instead of walking throug the entire file/lock lists.
2018-12-19 16:09:04 +01:00
obarthel 3a06bbdacf Updated to version 1.181
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-09-15 11:56:09 +02:00
obarthel 622eb1af6d Updated to version 1.154
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-16 18:39:52 +02:00
obarthel 7e518c9064 Updated to version 1.150
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-10 10:10:40 +02:00
obarthel 31c8fb0d77 Updated to version 1.146
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-03 11:36:04 +02:00
obarthel 41e8bc46bd Updated to version 1.143
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-30 18:59:23 +02:00
obarthel ea486c36c9 Updated to version 1.139
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-26 14:37:48 +02:00
Olaf Barthel 951e61cc62 Updated to version 1.136
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-22 12:34:02 +02:00
obarthel 8807ed9641 Updated to version 1.135
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-21 14:20:09 +02:00
obarthel 6773b8dcb4 Updated to version 1.134
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-20 17:27:47 +02:00
obarthel 5f07e3e857 Updated to version 1.133
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-20 11:19:48 +02:00
obarthel afe7b87f24 Updated to version 1.132
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-19 15:43:09 +02:00
obarthel 8daa23142f Updated to version 1.129
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-13 12:42:55 +02:00
obarthel 914915496f Small fixes for the AmigaOS4 build to work 2018-05-11 11:27:57 +02:00
obarthel d2a15bd63e Updated to version 1.128
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-11 11:07:04 +02:00
obarthel 047be4f827 Updated to version 1.124
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-06 16:50:02 +02:00
obarthel 61735b08c2 Updated to version 1.222
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-05 15:03:16 +02:00
obarthel cd5669e306 Updated to version 1.120
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-01 15:14:45 +02:00
obarthel 6b384df83d Updated the copyright text 2018-04-11 12:19:24 +02:00
obarthel 94cf193a82 Updated to version 1.116 2017-12-23 09:11:11 +01:00
Olaf Barthel 3af300e8ba If WRITEBEHIND option is enabled, do not wait for server response 2016-04-26 15:47:48 +02:00
Olaf Barthel 07fae3c4af For smb_request_write_raw() return values of 0 now indicate success.
Fixed decoding of maximum buffer size; this used to come out  as 0, which made smbfs switch back to the default minimum supported (1024 bytes).

Corrected use of the maximum raw write size as the size used by the client to perform raw reads with. The maximum allowed are 65535 bytes for a raw read request. Likewise, the maximum raw write size is 65535 bytes, too.
2016-04-17 11:32:14 +02:00
Olaf Barthel e952448551 Added note on where smb_receive_trans2() SMB errors are checked
smb_receive_trans2() exits with return code of -EIO if the SMB error code is set.
2016-04-09 11:25:56 +02:00
Olaf Barthel 8b0b3fbe48 Version bump 2016-04-04 14:22:20 +02:00
Olaf Barthel 85e33f1088 NetBIOS session header is decoded separately
Decoding is performed before the session header type is checked and, if necessary, rejected.

smb_receive_raw() now only accepts a single session header type (message) and rejects all others. At this stage "positive session response" should no longer appear.
2016-04-01 16:33:37 +02:00
Olaf Barthel 248d0cf759 Documentation comments added 2016-03-30 13:40:34 +02:00
Olaf Barthel e14e2d0133 Debug output now includes NetBIOS session header 2016-03-29 13:54:05 +02:00
Olaf Barthel 27acd498d2 Minor loop refactoring 2016-03-28 12:09:28 +02:00
Olaf Barthel 6b3e54c1db Added documentation comments
Made a note of the fact that the SMB_COM_READ_RAW may be followed by more than one response by the server. The current implementation only catches one response.

The data transmitted by the SMB_COM_WRITE_RAW command is no longer decoded as if it were an SMB message.
2016-03-27 18:13:11 +02:00
Olaf Barthel 46666ad167 Refactored the SMB decoder
Moved into separate "dump_smb.c" and "dump_smb.h" files.
2016-03-27 12:28:26 +02:00
Olaf Barthel 6ae4cc81ff Major update to SMB decoder
Major rework of the code which decodes individual commands,  their parameters and the responses. This is still incomplete, but it's a lot more useful now than before.
2016-03-25 17:47:10 +01:00
Olaf Barthel 56cee8e3fb Reworked the SMB decoder to handle ANDX commands better 2016-03-20 16:37:04 +01:00
Olaf Barthel 1c62774432 Reworked word/dword conversion code
The word/dword conversion code should be more robust now, using type casts where needed.

Cleaned up numeric comparisons, so that the types of the quantities compared match.

The SMB packet dump code now prints the current transmit buffer size along with the other packet information.
2016-03-06 15:25:40 +01:00
Olaf Barthel 333116eb78 Buffer size reduction due to NetBIOS header
Buffer size passed to smb_receive_raw() from smb_receive() reduced by 4 bytes to account for NetBIOS session header.
2016-02-28 13:39:34 +01:00
Olaf Barthel d00debee61 Added SMB command decoding functionality
All commands which the smbfs program receives or send through the network can now be decoded, printing header information and (eventually) more detailed information about the specific server command. This option is enabled at compile time.
2016-02-21 13:44:01 +01:00
Olaf Barthel 2f0d253eef smbfs 1.72 (14.4.2009)
- In proc.c, smb_setup_header() initialized the SMB header length
  field with a number which was too large by four bytes. Consequently,
  what was later committed to the wire would have four trailing data
  bytes which could contain random values. This often didn't do much
  harm, but it seems that Samba 3.2.4 and Windows Vista don't like the
  looks of the trailing junk bytes.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@20 26594b9e-b914-4e86-b7a1-9402bd427170
2009-04-14 11:33:05 +00:00
Olaf Barthel ed8def5209 - Initial import into sourceforge.net CVS.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@3 26594b9e-b914-4e86-b7a1-9402bd427170
2005-05-24 13:22:14 +00:00