Skip to content
Tcl Source Code Artifact [cd4da8806f]
Login

Artifact [cd4da8806f]

Artifact cd4da8806fd657ec185921c229d1452d6e2c19aa60c99aaf02e057f334a1bfe5:

Ticket change [cd4da8806f] - Ticket [1613456fffffffff|1613456fff] <i>file readable lies with samba shared folder or file</i> status still Open with 3 other changes by sebres on 2018-03-21 19:25:33.
D 2018-03-21T19:25:33.779
J icomment Admittedly\sI\sstill\scould\snot\sreproduce\sit\sdirectly,\sbut\sI\ssaw\sin\ssome\slogs\sof\smy\scustomers\sthe\ssignals\sit\smay\sindeed\stake\splace\s(successful\sopening\simplicitly\safter\slogging\sit\swas\snot\sreadable).\r\n\r\nLooking\sinto\sNativeAccess\sin\stclWinFile.c\scould\spossibly\sexplain\sit,\sbecause\sIMHO\scurrent\srealization\smay\sbe\snot\salways\ssuitable\sfor\ssome\sconstellations\swith\ssamba\sshares.\r\nAdditionally\sit\scould\scause\sthe\srace\sconditions\sinside.\r\n\r\nBy\sthe\sway,\sI\sbelieve\sit\sshould\sbe\sextremely\sinperformant\son\ssome\snetwork\sshares,\sso\sI\shad\stested\sit\sand\sindeed\snoticed\sa\shigh\sperformance\sdegradation.\r\nEven\sopen/close\sis\smore\sfaster.\r\n\r\nSo\sI\shave\sbound\s(via\sffidl)\sthe\sCRT-access_s\sfunction\s(just\sto\scompare\sit\salso),\sbelow\syou'll\sfind\sthe\sresults\sof:\r\n\r\n<pre><code>\r\npackage\srequire\sFfidlrt\r\nffidl::callout\s_access_s\s{pointer-utf8\sint}\sint\s[ffidl::symbol\smsvcr90.dll\s_access_s]\sstdcall\r\nffidl::callout\s_waccess_s\s{pointer\sint}\sint\s[ffidl::symbol\smsvcr90.dll\s_waccess_s]\sstdcall\r\n\r\nset\spath\s{z:\\any\\path\\with\\read\\access\\on\\network\\drive.txt}\r\n\r\n#\stimerate\sit\s250ms\s...\s#\r\n\r\n%\s\sfile\sexists\s$path\s\r\n58.0534\sµs/#\s4305\s#\s17225.5\s#/sec\s249.920\snett-ms\r\n\r\n%\s\sset\sf\s[open\s$path\srb];\sclose\s$f\s\r\n145.348\sµs/#\s1721\s#\s6880.0\s#/sec\s250.144\snett-ms\r\n\r\n%\s\sfile\sreadable\s$path\s\r\n3882.55\sµs/#\s65\s#\s257.56\s#/sec\s252.366\snett-ms\r\n\r\n%\s\s_access_s\s$path\s04\s\r\n54.0879\sµs/#\s4620\s#\s18488.4\s#/sec\s249.886\snett-ms\r\n\r\n%\s\s_waccess_s\s[::ffidl::get-unicode\s$path]\s04\s\r\n55.5223\sµs/#\s4501\s#\s18010.8\s#/sec\s249.906\snett-ms\r\n</code></pre>\r\n\r\n@Harald,\spossibly\sif\syou\scan\sreproduce\sit\sagain,\sand\sif\syou've\sffidl,\scould\syou\spossibly\stest\sthis\s`expr\s{[_access_s\s$path\s04]\s==\s0}`\swill\sreturn\s1\s(GRANTED),\swhere\s`file\sreadable\s$path`\sstill\sreturns\s0.\r\n\r\nIn\sthis\scase\swe\scould\srewrite\sit\susing\sthis\sCRT-primitives\s(and\sfor\sexec/owner\scheck\susing\s`fstat`\swith\s_S_IREAD|_S_IWRITE|_S_IEXEC\scombinations\sor\ssomething\ssimilar).
J login sebres
J mimetype text/x-fossil-wiki
K 1613456fffffffffffffffffffffffffffffffff
U sebres
Z 3665ed3c30816cdc8df40314809e2b79