🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.misc
Article #3170

Re: using share in dos4

#3170
From: Heath Ian Hunnicutt
Date: Sun, 19 May 1991 14:43
42 lines
2801 bytes
In article <1991May18.125629.24555@ibmpcug.co.uk> gmurray@ibmpcug.co.uk (G  
Murray) writes:
> In article <1991May17.160145.10245@nntp-server.caltech.edu> heathh@kanga  
(Heath Ian Hunnicutt) writes:
> > 
> > Imagine you have the following config.sys:
> > 1: DEVICE=C:OLDTHING.SYS
> > 2: INSTALL SHARE.EXE
> > 
> > Further imagine that OLDTHING uses FCBs.  Now imagine what happens if  
OLDTHING  
> > starts out using FCBs and then SHARE comes along and buts in.  Now imagine  
a  
> > hard drive full of worhtless random bytes.
> 
>  I think that you will find that OLDTHING *cant* use FCBs, or handles for
> that matter. As it is in a DEVICE= line on config.sys, this implies that
> it is a device driver. Only a very limited number of DOS calls are allowed
> in a device driver, either during initialisation or during running. In
> particular, no file handling calls, either FCB or handle based, are allowed.
> Hence, OLDTHING.SYS shouldn't be able to trash the Hard Disk because it is
> loaded before SHARE.EXE
Well, during the start-up (loading) phase of the device driver's existence, it  
can use whatever it pleases, including FCBs.  However, by the time DOS gets to  
the next line of CONFIG.SYS, loading is complete, so it cannot make new DOS  
calls unless it goes to _extreme_ trouble.  BUT - A properly written device  
driver can monitor various flags in the DOS variable area and determine whether  
it is safe to (say) access a file or whatnot.  Most don't, but it _is_  
possible.  I wrote one myself (that uses handles, thank you) and it is able to  
write to a log file opened during loading.  Any such driver, though, might  
require DOS versions greater than 2.0... I should check on that.  If so, there  
is _no_ reason to use an FCB.

--
Heath Hunnicutt              | X-Wing Pilot: "Ahhh! I'm gonna die!"
heathh@pooh.cco.caltech.edu  | Rebel Command: "Stay on target..."
131.215.48.30                | ... my life at Caltech
---------------------------------------------------------------------------
In the unlikely event that I might seem to be representing Caltech's opinion on  
any matter, I am not.  In fact, if it is brought to my attention that I share  
any particular opinion with Caltech's administration and other assorted Yahoos,  
I will change that opinion of mine.
Technical Details
Message-ID: <1991May19.144321.8990@nntp-server.caltech.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!nntp-server.caltech.edu!news
References: <1991May18.125629.24555@ibmpcug.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!jarthur!nntp-server.caltech.edu!news
From: heathh@roo (Heath Ian Hunnicutt)
Newsgroups: comp.os.msdos.misc
Subject: Re: using share in dos4
Message-ID: <1991May19.144321.8990@nntp-server.caltech.edu>
Date: 19 May 91 14:43:21 GMT
References: <1991May18.125629.24555@ibmpcug.co.uk>
Sender: news@nntp-server.caltech.edu
Organization: California Institute of Technology, Pasadena
Lines: 42