The MEM Device

Anything QL Software or Programming Related.
Post Reply
User avatar
pjw
QL Wafer Drive
Posts: 1315
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

The MEM Device

Post by pjw »

I moved this from the Announcing availability of a QLNET driver for the Q68 (ND-Q68) topic.

Re the MEM device and network security:
tofro wrote: Fri Mar 08, 2024 2:02 pm <>
Block, yes (simply don't start FSERVE or the mem driver), limit, well, no. QL designers believed in the good in people. You could maybe use Toolkit III, that allows to restrict access to files and devices by users (and, BTW, comes with yet another MEM device driver). I don't know how secure that is, however. (Toolkit II introduces a file access flag "HOST ONLY" - which forbids exposure of a file to the file server)
<>
Ok, I misunderstood: The MEM device (naturally!) has to be installed on the target system to be a threat.

I never really tried the MEM device that I remember. A nice simple example of a device driver! However, I couldnt get it to work on QPC2. I assembled and used Lau's variant as his was fixed to be Minerva-compatible, which I assumed might be a closer match to SMSQ/E. It also has some enhancements. One can move around in the space, but try doing anything else, like PUTting anything in and it errors with an end of file.

I havent investigated, because at this point Im not all that interested, but it would be nice to give it a spin. So has anyone else encountered this issue and, better still, fixed it?


Per
dont be happy. worry
- ?
martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: The MEM Device

Post by martyn_hill »

Hi Per!

I developed the MEM driver a bit further than Simon's and Lau's originals and it works under SMSQe quite nicely.

I'll digit out and share the (revised) source and binary when I'm back at my laptop.


User avatar
pjw
QL Wafer Drive
Posts: 1315
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: The MEM Device

Post by pjw »

Great! Looking forward. Thanks


Per
dont be happy. worry
- ?
bixio60
Brittle Membrane
Posts: 111
Joined: Sun May 04, 2014 7:05 am

Re: The MEM Device

Post by bixio60 »

martyn_hill wrote: Sat Mar 09, 2024 2:11 pm Hi Per!

I developed the MEM driver a bit further than Simon's and Lau's originals and it works under SMSQe quite nicely.

I'll digit out and share the (revised) source and binary when I'm back at my laptop.
Thank you Martyn and all people that gave me suggestions.
I implemented successfully your idea to use netTime=FUPDT(\tempDateFile$), all ok and finally all the QLs in the net have the date&time updated.

Looking forward to try your MEM enhanced driver.

Fabrizio


martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: The MEM Device

Post by martyn_hill »

Ah, good! I was hoping to hear whether you had been successful with the original time synchronisation project!


User avatar
tofro
Font of All Knowledge
Posts: 2702
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: The MEM Device

Post by tofro »

Sometimes, apparently, problems need to sink in deeply for a while until they collide with something else in my memory that happens to be the solution. Same case here, I totally forgot about NASERVE until a small LED went blinking in my brain:

With regards to the MEM device and security concerns (overall, also other files and devices, but MEM seems to have specific risks...) about FSERVE, you might want to have a look at Martin Head's NASERVE program. It does pretty much the same as FSERVE, but with opposite policy: While FSERVE exposes all devices and files to the outside world, NSERVE, per default, exposes nothing - You need to use the NAS_SHARE command to list the files and devices you want to be seen from the outside world. There's options on when you might want to expose stuff read-only or read-write and whether you want NASERVE to apply its policies globally or to specific network stations.

Problem solved.

NASHARE is part of Martin Head's network router project and should be available from the usual places.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Martin_Head
Aurora
Posts: 853
Joined: Tue Dec 17, 2013 1:17 pm

Re: The MEM Device

Post by Martin_Head »

tofro wrote: Sun Mar 10, 2024 12:00 pm Sometimes, apparently, problems need to sink in deeply for a while until they collide with something else in my memory that happens to be the solution. Same case here, I totally forgot about NASERVE until a small LED went blinking in my brain:

With regards to the MEM device and security concerns (overall, also other files and devices, but MEM seems to have specific risks...) about FSERVE, you might want to have a look at Martin Head's NASERVE program. It does pretty much the same as FSERVE, but with opposite policy: While FSERVE exposes all devices and files to the outside world, NSERVE, per default, exposes nothing - You need to use the NAS_SHARE command to list the files and devices you want to be seen from the outside world. There's options on when you might want to expose stuff read-only or read-write and whether you want NASERVE to apply its policies globally or to specific network stations.

Problem solved.

NASHARE is part of Martin Head's network router project and should be available from the usual places.
The NASERVE is part of the IP Network driver. I also did a version for the QL to replace the TKII FSERVE https://dilwyn.qlforum.co.uk/internet/NAServe100.zip


User avatar
pjw
QL Wafer Drive
Posts: 1315
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: The MEM Device

Post by pjw »

martyn_hill wrote: Sat Mar 09, 2024 2:11 pm Hi Per!

I developed the MEM driver a bit further than Simon's and Lau's originals and it works under SMSQe quite nicely.

I'll digit out and share the (revised) source and binary when I'm back at my laptop.
Hi Martyn,
Is this still happening? I was hoping to test whether NASERVE blocks it, as tofo suggested.


Per
dont be happy. worry
- ?
martyn_hill
Aurora
Posts: 933
Joined: Sat Oct 25, 2014 9:53 am

Re: The MEM Device

Post by martyn_hill »

Hi Per!

I was reviewing my mod'ed driver (after 6 years :-) and found a bunch of debug stuff still left in whilst I was still getting it to run on both Minnie and SMSQe (some different trap register usage), so am just tidying up the source ready to reassemble.

I've been using it on and off in both environments since then without problems, but that's not to say I didn't screw up something when adding the features I was after (such as EOF handling for buffered MEM channels and such like.)

I'll share the source and binary at the weekend.


User avatar
pjw
QL Wafer Drive
Posts: 1315
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: The MEM Device

Post by pjw »

Hi Martyn,

No rush on my account, I still have a lot of figuring out to do.

Thanks for taking the trouble!


Per
dont be happy. worry
- ?
Post Reply