1. 28 Aug, 2021 1 commit
    • Robert Sprowson's avatar
      Preserve full load/exec for untyped files · ddfde4f4
      Robert Sprowson authored
      Rather than turning any untyped file into ",lxa" suffix (and in the reverse direction giving the base address of the Kernel back), support ",llllllll-xxxxxxxx" style suffixes like RPCEmu does in order to preserve the full load and execution addresses.
      Xlate.c: Extra code to parse the suffix, and simplification of existing suffix checkers.
      CoreFn.c/Xlate.h: Need to pass on the exec address too for when creating new files via Xlt_AddROType.
      Makefile/LanMan_MH: Case of CMHG file changed to match sources.
      Version 2.68. Tagged as 'OmniLanManFS-2_68'
  2. 19 May, 2021 1 commit
    • Colin Granville's avatar
      Option to enable hidden files to be seen in LanManFS · 1c0801eb
      Colin Granville authored
        Allow name mode to select visibility of hidden files to be switched on or off.
        The default remains off.
        Resources/UK/CmdHelp, cmhg/LanMan_MH, c/LanMan and c/SMB modified. SMB_Delete, SMB_Rename and SMB_GetAttibs
        in c/SMB modified to work with switch.
        Tested with ARMX6 connected to Armbian.
      Version 2.67. Tagged as 'OmniLanManFS-2_67'
  3. 31 Aug, 2020 1 commit
    • Chris Collins's avatar
      Fix SMB read to not exceed our negotiated buffer size · 1052e13e
      Chris Collins authored
      The limit for data length in the read operation is set by
      MaxBufferSize (MAX_RX_BLOCK_SIZE in the source).
      The problem is, in executing the read, there was no allowance for the
      SMB overhead, so we're asking for reads that produce packets larger than
      our buffer, which Samba4 is rightfully rejecting and giving us a short
      response to fit into the buffer we said we needed it to fit into.
      Actually, Samba should abort the connection, but it responds to deal
      with Win2k having a similar bug.
       * Definition of MaxBufferSize [MS-CIFS v20180912 s, pg 282]
       * Definition of SMB_COM_READ [MS-CIFS v20180912 s2.2.4.11, pg 120]
      Version 2.66. Tagged as 'OmniLanManFS-2_66'
  4. 11 Jul, 2020 1 commit
    • Colin Granville's avatar
      Limit n_names to fit in unsigned short · e7ce75bf
      Colin Granville authored
      n_names in Func_ReadDir1 can be larger than an unsigned short
      which cause problems when cast to an unsigned short for SMB
      notably 7Backup would go into an infinite loop.
      Other parameters to Func_ReadDir1 sanity checked.
      Tested with 7Backup from 7thSoftware and compiling and cleaning
      OmniLanManFS sources over LanManFS
      Version 2.65. Tagged as 'OmniLanManFS-2_65'
  5. 16 May, 2020 1 commit
    • Colin Granville's avatar
      Fixed deletion of directory trees · 343b54e4
      Colin Granville authored
        Rewrite of directory enumeration so that when directory trees are deleted when they are completely deleted.
        Modified fsentry_func in CoreFN.c so that the ReadDirectory reason codes call the new Func_ReadDir1 which uses SMBFind_EnumDir implemented in SMB.c and SMBfind.h
        Tested with Windows and Samba on Armbian.
      Version 2.64. Tagged as 'OmniLanManFS-2_64'
  6. 27 Apr, 2020 1 commit
    • Colin Granville's avatar
      Length of usernames and passwords increased · 3c1bc966
      Colin Granville authored
        Usernames on Windows can be email addresses which are longer than the 16 byte
        NAME_LIMIT so usernames and passwords are given their own name limit and
        this is increased to 64 bytes.
        Tested with Windows 10.
      Version 2.63. Tagged as 'OmniLanManFS-2_63'
  7. 04 Jun, 2019 1 commit
    • Robert Sprowson's avatar
      Build fix · 45886dc7
      Robert Sprowson authored
      Ensure that when built for ROM, the RES_OBJ is created, as LanManFS is a little unusual in carrying its own 3rd party resources.
      Version 2.62. Not tagged
  8. 03 Jun, 2019 1 commit
    • Robert Sprowson's avatar
      Makefile simplification · 5ad5163b
      Robert Sprowson authored
      Use the INSTRES_FILES specifier to pick up the resource files and generate the Messages rather than having a local static dependency.
      Version 2.62. Not tagged
  9. 04 Aug, 2018 1 commit
    • ROOL's avatar
      Fix for double name translation, header ordering · 873c2106
      ROOL authored
        Xlate.c: Directory names containing characters requiring translation (eg. "AcornC/C++", "A B/C") would be translated twice, leading to a 'Directory not found' error when trying to open a file within. Submission from Colin Granville.
        TCPIP.h: Order the headers so that 'netdb.h' comes after its dependents. Submission for TCP/IP bounty.
        Test case test/Contentious run, passed OK.
      Version 2.62. Tagged as 'LanManFS-2_62'
  10. 03 Jan, 2018 1 commit
    • Robert Sprowson's avatar
      Name resolution, wildcarded FSEntry_File 5 & 9, and buffer overrun fixes · 517c6bdb
      Robert Sprowson authored
      Make SMB_RxWords a bit bigger per static anaylsis
      when LONGNAMES is undefined, since NT LM 0.12 dialect is allowed at the same time as short names.
      A change to name translation in LanManFS-2_60 broke all forms of nested contentious name resolution, ie. where a leafname containing a contentious character was itself in a directory containing one.
      The cited problem names ('1 2/3' and '1 /s') can both be resolved at one level only, no 2nd pass is required. The resolution function walks along the elements of the path one at a time to reach the leaf (ie. no element is processed twice). A test case has been created to allow some regression testing when making future changes in this area.
      When building tboxlibint
        Copy h.* <Lib$Dir>.tboxlibint.h.*
      when the directory is empty FileSwitch checks the destination ending in ...\h\* which the short names translation would error with ENOWILDCARD, but the long names translation attempts to resolve it by finding the trailing '\' and appending a '*' (ie. not doing anything), this returns no results and is passed back unfaulted. The special check in fsentry_file() for ENOWILDCARD for the two ReadCatalogueInformation thus doesn't trigger, and an attempt to FileGetAttribs() is made on the still wildcarded path. This is rejected by the server when in SMB_GetAttribsX2() does a TRANSACT2_QUERYPATHINFORMATION, which expects a non wildcarded object (on Windows servers at least), propagating an error back up to the user.
      This stopped a ROM build from completing the exports phase via LanManFS on a Windows share.
      Const-ify a few things.
      Changed files
        Xlate.c: Revert change from revision 1.21, return ENOWILDCARD when appropriate.
        SMC.c: Increase MAX_WCT buffer size to 17.
        UK/CmdHelp: Add some missing chevrons round the command syntax for required parameters.
        test/Contentious: Test case for nested contentious character resolution code.
      Version 2.61. Tagged as 'LanManFS-2_61'
  11. 23 Jan, 2017 2 commits
    • John Ballance's avatar
      Resolved issue where RISC OS name '1 2/3' gets wrongly translated. · 7587ab10
      John Ballance authored
      The translate routine that converts contentious characters in  a RiscOS
      file name to equivalent DOS ones was being invoked a second time. Normally
      this wouldn't be critical, but a / in riscos was converted to the . in DOS,
      correctly , then converted back again. This error mode with more than one
      contentious character in (particularly) a directory name had recently
      come to light.
      Tested by building a RiscOS rom image on a pc based LanManFS mount without
      Version 2.60. Tagged as 'LanManFS-2_60'
    • John Ballance's avatar
      Resolved issue where RISC OS name '1 2/3' gets wrongly translated. · 98a15172
      John Ballance authored
      The translate routine that converts contentious characters in a RiscOS
      file name to equivalent DOS ones was being invoked a second time. Normally
      this wouldn't be critical, but a / in riscos was converted to the . in DOS,
      correctly , then converted back again. This error mode with more than one
      contentious character in (particularly) a directory name had recently
      come to light.
      Tested by building a RiscOS rom image on a pc based LanManFS mount without
      Version 2.60. Tagged as 'LanManFS-2_60'
  12. 21 Jan, 2017 1 commit
    • Robert Sprowson's avatar
      Fix for truncating writes to servers that declare MaxBufferSize >= 64k smb.c,... · e6b73849
      Robert Sprowson authored
      Fix for truncating writes to servers that declare MaxBufferSize >= 64k smb.c, lines 2726 onwards: when chopping up the next buffer, make sure the size sent still fits in the SMB_COM_WRITE count field (16 bits). For completeness, make sure the estimate of bytes remaining is similarly saturated too.
      smb.c, lines 2711-2713: cifs-v1-spec-02 section 5.27 says the server always expects to receive up to 65535 bytes, so this test should not be subject to the negotiated MaxBufferSize, and is expected to often exceed it. Currently we use 32k, if this is ever increased we really ought to take into account MaxRawSize that the server tells us.
      Tested with a handful of files of power-of-2 sizes and odd sizes. Inspection in Wireshark looks OK. Variation of a diagnosis by Will Ling https://www.riscosopen.org/forum/forums/4/topics/8966
      Version 2.59. Tagged as 'LanManFS-2_59'
  13. 23 Oct, 2016 1 commit
  14. 18 Aug, 2016 1 commit
    • Robert Sprowson's avatar
      Fix out-by-1 error reporting monitor name · 9904c568
      Robert Sprowson authored
      For *OPT1,2 the FS is supposed to report the leafname. LanManFS uses strrchr() to find the dot but hadn't incremented past it when returning the pointer.
      Version 2.57. Tagged as 'LanManFS-2_57'
  15. 14 May, 2016 1 commit
    • ROOL's avatar
      [419] LanManFS does not see all visible files · e6ff7fc3
      ROOL authored
        When the number of files read from the server didn't fit in the OS_GBPB buffer, continuation of the enumeration would fail.
        Resume key *and* filename used when resuming a directory enumeration to the same directory.
        Submission from Colin Granville.
      Version 2.56. Tagged as 'LanManFS-2_56'
  16. 14 Apr, 2016 1 commit
  17. 03 Apr, 2016 1 commit
    • Robert Sprowson's avatar
      Fix for buffer overrun · a596ce3c
      Robert Sprowson authored
      The PRM entry for Free reason 1 is very vague, it requires the length of the drive name including a terminator, not strlen() of the drive name. Free uses this directly to allocate RMA to copy into (though for drive names that aren't a multiple of 8 we're saved by OS_Module rounding up claims).
      Also use Free SWI values from headers rather than defining them again locally.
      Version 2.54. Tagged as 'LanManFS-2_54'
  18. 17 Mar, 2016 1 commit
    • Robert Sprowson's avatar
      Fix for garbled translation · d06e3e50
      Robert Sprowson authored
      One too many %s's in the code, one too few in the messages file. This resulted in diagnostics messages (eg. at the bottom of *ListFS) to show a %s that hadn't got substituted.
      Version 2.53. Tagged as 'LanManFS-2_53'
  19. 09 Aug, 2015 1 commit
    • ROOL's avatar
      Add support for NTLM authenticated logins · f1009949
      ROOL authored
      Line 875 don't free chain pB that early it is (and was being) used later on.
      Fixes to correct which SMB_RxWords the Sesskey and bloblen are retrieved from, for each of the dialects supported.
      Call the new auth code when the protocol flags require it.
      Don't uppercase passwords all the time, the server may require case sensitivity.
      Verbatim copies of the RSA reference implementations of MD4 and MD5 from the respective RFC's.
      Implementation of the hash/mash/reply that Microsoft requires. Define AUTHTEST of this file to build a simple application that verifies the algorithms.
      Tested against a Win7 install, inspecting in Wireshark that the passwords are no longer sent in the clear.
      Implements ticket #332.
      Submission from Colin Granville.
      Version 2.52. Tagged as 'LanManFS-2_52'
  20. 02 Aug, 2015 2 commits
    • Robert Sprowson's avatar
      Build fix · 68b81856
      Robert Sprowson authored
      RES_PATH needs the component name too.
      Version 2.51. Tagged as 'LanManFS-2_51'
    • Robert Sprowson's avatar
      Build fix · cf8805b3
      Robert Sprowson authored
      RES_PATH needs the component name too.
      Version 2.51. Tagged as 'LanManFS-2_51'
  21. 12 Jul, 2015 1 commit
    • ROOL's avatar
      Be more efficient with buffers · 44df7e69
      ROOL authored
      Take note of, and use, the MaxBufferSize that the server tells us during negotiation rather than a fixed value.
      If the server doesn't say, use 1k as the default as before.
      Submission from Colin Granville.
      Version 2.50. Tagged as 'LanManFS-2_50'
  22. 05 Jul, 2015 1 commit
  23. 14 Mar, 2015 1 commit
    • Robert Sprowson's avatar
      Add a quick exit for the timeout=0 case · e5ce78dc
      Robert Sprowson authored
      Careful analysis of packet captures by Colin Granville reveals that LanManFS waits for at least 1cs when no timeout was requested, so add a quick exit for that case. Timeouts of >= 1cs still delay for at least the requested time, and up to 0.999cs longer as before.
      This reduces the turn around time which is most beneficial for interfaces faster than 10baseT.
      Version 2.48. Tagged as 'LanManFS-2_48'
  24. 06 Aug, 2014 1 commit
    • Robert Sprowson's avatar
      Get version number from messages file · e03efcd9
      Robert Sprowson authored
      Also, rationalise the two Omni_RegisterClient calls to both use _swix since they're virtually the same function repeated twice.
      Version 2.47. Tagged as 'LanManFS-2_47'
  25. 14 Jul, 2014 1 commit
    • Robert Sprowson's avatar
      Sync up the error messages · 52ed32eb
      Robert Sprowson authored
      Due to an inability to count to 10 accurately, all the error tokens were wrong, leading to some inappropriate error messages.
      Fixes problem "Message token E13 not found" when the SMB server gives a DOS error back.
      Version 2.46. Tagged as 'LanManFS-2_46'
  26. 31 May, 2014 1 commit
    • Robert Sprowson's avatar
      Ammendments to short name translation table · 478370c8
      Robert Sprowson authored
      The table was ambiguously translating () to () and also [] to (). Now, we error names containing ,[] in the same manner as DOSFS.
      The substitutions for ^% have also been changed to match DOSFS so copying from one to the other doesn't give two representations if viewed on a PC.
      Marked both tables as const to save 512B of RMA.
      This change is slightly academic since most of the time the long filename resolution is in use.
      Tested against WinXP SP3 with a build with long filename support turned off.
      Version 2.45. Tagged as 'LanManFS-2_45'
  27. 19 Jan, 2014 1 commit
    • Robert Sprowson's avatar
      Make name cache flush unconditional · 22f3ec34
      Robert Sprowson authored
      The size returned by OS_File 5 might not match the size shown in the Filer viewer (or via *EX) because the last cached version was being returned. This would manifest itself as an error from !Edit if the file on the server had grown since last queried, when loading the file the amount of memory reserved was for the smaller (stale cache copy size).
      The name cache is now always flushed on exit from the FileSwitch functions, this doesn't alter performance because the size was already being queried across the network, it was just that the result was overridden by the cached copy.
      Be more robust and only capture the default driver name when it starts up.
      This could be a problem if LanManFS starts after the ethernet driver, and the value of Inet$EtherType is unset. When the driver dies LanManFS would have taken that name as the default - leading to "Bad parameter" when trying to connect to a share.
      Tested on IOMD with WinXP SP3.
      Version 2.44. Tagged as 'LanManFS-2_44'
  28. 22 Nov, 2013 1 commit
  29. 04 Oct, 2013 1 commit
  30. 03 Oct, 2013 3 commits
    • Robert Sprowson's avatar
      Wrap stats report in DEBUG switch · 55ce84d9
      Robert Sprowson authored
      Missed in earlier internationalisation but spotted in the binary - the stats report function is only called from a debug command, but the linker wasn't spotting that and removing the table of stats names.
      Translate the descriptive text in debug_err in RPC.c.
      Retagged as LanManFS-2_41.
    • Robert Sprowson's avatar
      Removed verbose mode · 8a3f55c4
      Robert Sprowson authored
      With LanManFS in ROM it's not actually possible to enable verbose mode, since it relies on command arguments being passed to it on initialisation. Since RMREINIT doesn't allow that you can't ever pass '-v'. Even the RAM loaded case isn't that useful, since the verbose text is output via printf() which doesn't appear in the desktop (with OmniClient).
      Swap the few uses of verbose mode to route via DebugLib instead, controlled via the 'DEBUG' predefine.
        Makefile ammended so debug version has a rule to make the resources area.
      Built, but not tested.
      Version 2.41. Tagged as 'LanManFS-2_41'
    • Robert Sprowson's avatar
      Internationalised · e3559214
      Robert Sprowson authored
      Unused LMFiler put in the attic.
      As LanMan has historically put its resources into ThirdPart/OmniClient this component has no ROM resources phase - it still registers the resources at run time.
      Version 2.40. Tagged as 'LanManFS-2_40'
  31. 30 Sep, 2013 1 commit
    • Robert Sprowson's avatar
      Makefile recreated from fragments · 95372462
      Robert Sprowson authored
      Fixed up a couple of trivial warnings with the stricter checking.
      Removed OmniS_FastMultiply64 and rewrote the function in C, this allows the compiler to spot and use UMULL on architectures supporting that instruction.
      Tested in a RAM build against a WinXP SP3 server with a drive > 4GB.
      Version 2.39. Tagged as 'LanManFS-2_39'
  32. 11 Nov, 2012 1 commit
    • Robert Sprowson's avatar
      Fix and speed up EXT#handle=number doing nothing when number is beyond 2GB · 18a0315a
      Robert Sprowson authored
      Internally LanManFS was representing file offsets and data lengths as signed numbers, while in general this doesn't matter (they are passed through opaquely as just numbers and not manipulated) in a couple of places they were being used as while () loop exit conditions.
      Function WriteZeroes (used when extending a file via OS_Args) therefore never performed the call to SMB_Write when beyond 2G because the loop condition was never met.
      Additionally, it was literally transferring buffers of zeros across the network which is unnecessary as the server is documented as doing a zero fill itself, this represents at least a x40 speed up (on a slow 1MB/s drive write speed at the server end) or more.
      Changed offset & lengths from int to uint.
      Added the earlier CIFS spec (the later copy is missing section 5 for some reason) to docs.
      Version 2.38. Tagged as 'LanManFS-2_38'
  33. 21 Sep, 2012 1 commit
    • Robert Sprowson's avatar
      Fix reporting of unstamped file info · db8c11e7
      Robert Sprowson authored
      When a file ended in ',xxx' (unfinished DEADDEAD) or ',lxa' (load/execution addresses) LanManFS was correctly identifying these internally but at the last moment OR'd the result unconditionally with 0xFFF00000 when calculating the date stamp/access attributes.
      Now, an unstamped file will propagate the load & exec addresses properly.
      Tested with WinXP SP3 and a variety of hand constructed examples, plus copying a large file with the filer showed the incomplete file icon until done.
      Version 2.37. Tagged as 'LanManFS-2_37'
  34. 14 Apr, 2012 1 commit
  35. 14 Dec, 2011 1 commit
  36. 15 Oct, 2011 1 commit
    • Robert Sprowson's avatar
      Fix for *INFO dates not matching *EX dates · a0fb97c2
      Robert Sprowson authored
      These two displays take different code paths, and *INFO goes via a check to workaround a bug in Win98 servers. Unfortunately, the check no longer works because Microsoft don't return the '.' and '..' entries in SMB Trans2 FIND_FIRST, and the logic previously always set the "need to frig the dates" flag. Now, the flag is only set if something comes back and after doing a test swap the results are also correct.
      Turned on the 'auto close Trans2 FIND_FIRST' flag in the request block to save having to do a second transaction to close it.
      Swapped the LDMFD/STMFD for Push and Pull in the assembler.
      Tested against WinXP SP3, dates are no longer bonkers.
      Version 2.35. Tagged as 'LanManFS-2_35'