Revision [290]

This is an old revision of ioCanRenameImage made by JohnMcIntosh on 2008-10-21 02:48:49.

 

Image write security


sqInt ioCanRenameImage(void);
sqInt ioCanWriteImage(void);
sqInt ioDisableImageWrite(void);

Parms: NONE
return: NONE, fake return of zero
From: Interpreter
Why:
Enables the ability to make the image non-writeable.
Responsibility:
Normally you can write the existing image to the filesystem, either replacing the existing image, or saving to another location, assuming
the file system lets you write anywhere.

These calls let you turn off the feature of rename/write. Their implementation on all platforms is below. Once you call ioDisableImageWrite then
there is no way to allow writing again.

static int allowImageWrite = 1; int ioCanRenameImage(void) {
return allowImageWrite; }

int ioCanWriteImage(void) {
return allowImageWrite;
}

int ioDisableImageWrite(void) {
allowImageWrite = 0;
}


BUGS

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki