Re:VFS shim that allows a SQLite database to be appended to ...
by JackCh on Friday June 08, 2018 @11:22AM
(#17266312)
I expect that even if it works on 'naked' Windows, many antivirus systems will take a dim view of it.
Re:VFS shim that allows a SQLite database to be appended to ...
by phaedrus on Friday June 08, 2018 @11:30AM
(#17266410)
Many Windows programs embed resources (such as icons) in the executable; perhaps this access pattern would be indistinguishable from what common programs already do?
I'm honestly not sure - for instance maybe the embedded resources get loaded into RAM not read from the file. But if that is the case couldn't the embedded SQLite file be marked as a resource and loaded by the same mechanism?
Re:VFS shim that allows a SQLite database to be appended to ...
by JackCh on Friday June 08, 2018 @11:55AM
(#17266653)
I'd expect reading to be fine, but probably not writing. I could be wrong though, I'm just speculating.
Re:VFS shim that allows a SQLite database to be appended to ...
by dfox on Friday June 08, 2018 @12:26PM
(#17267005)
In DOS days AVG's heuristic detection engine had flag for programs that did write into their own binary (it was reported as +i AFAIK), but it didn't have much weight as essentially anything compiled with Borland Pascal was flagged in this way (IIRC including AVG itself).
On Linux this probably works fine because writing past the executable part of the file does not change any offsets beforehand.
(On NFS systems you can definitely overwrite in-use executables at any point, which works until the relevant bit gets paged out then back in)
Reading, on the other hand, ought to work fine everywhere. This continues "SQLite is a replacement for fopen()" - you can use it in similar cases to self-extracting ZIP files or self-executing JAR files.