[Simh] FW: Simh on Windows - long startup delays and long shutdowndelays

Villy Madsen Villy.Madsen at shaw.ca
Sun Dec 16 16:40:19 EST 2007


 

-----Original Message-----
From: Villy Madsen [mailto:Villy.Madsen at shaw.ca] 
Sent: Sunday, December 16, 2007 12:28
To: 'Toby Thain'
Subject: RE: [Simh] Simh on Windows - long startup delays and long
shutdowndelays

I wouldn't really call it a security issue - what it really is (from my
perspective) a wake-up to the fact that file locking should be built into the
operating system - not left as an add on to be added by the programmer.

fopen does not support the concept of setting permissions on the file.

fopen_s locks the file and allows no other application to have access to it.
There is a another call that allows sharing of the file...  (An additional point
is the the idea of the returned value from the call being an status code rather
than the file pointer is also (from my perspective) an improvement.  Rather
VMSish I think).

I am not a great fan of uSoft, but in this case I think that they did the right
thing.  Come-up with something that adds some control over file operations.  The
issue is of course that C grew out of *ix, and since *ix doesn't support file
locking, then of course there was no need to address the concept in C.

I grew up on VMS, I couldn't fathom how anyone could have written (or for that
matter continue to use) a system that didn't support file and record locking (ok
record locking really is dependent upon RMS - which I guess we could think of as
an add-on) as an integral part of the OS.

As far as adding it to SimH, there is a lot of OS dependent code in SimH right
now - another conditional within scp_fio should not be a big deal..

In the event,  I am not sure that the change fixes the problem in it's entirety
- only time will tell..

Villy

-----Original Message-----
From: simh-bounces at trailing-edge.com [mailto:simh-bounces at trailing-edge.com] On
Behalf Of Toby Thain
Sent: Sunday, December 16, 2007 10:05
To: Thomas Pfau
Cc: SIMH List
Subject: Re: [Simh] Simh on Windows - long startup delays and long
shutdowndelays


On 16-Dec-07, at 3:01 PM, Thomas Pfau wrote:

> Davis Johnson wrote:
>> The basic difficulty is that fopen() is standard. I had never heard 
>> of
>> fopen_s() so I did a little googling and, so far as I can tell, 
>> fopen_s is a Microsoft invention, not part of any standard.
>> From my limited experiences with the latest Visual Studio, it would
> appear that Microsoft has declared half the standard C RTL as 
> deprecated claiming some kind of security problems.  I think it's 
> really about lock-in.  If they can come up with new versions of 
> standard functions and make you think you need to use them for 
> security's sake, they can keep you from easily porting your program to 
> another platform.

I think you're on to something...

--Toby

> I fail
> to see the security issues they raise for most of the functions 
> they've replaced.
>
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh

_______________________________________________
Simh mailing list
Simh at trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh





More information about the Simh mailing list