Image write security


Optional

sqInt ioCanRenameImage(void); via secCanRenameImage
sqInt ioCanWriteImage(void); via secCanWriteImage
sqInt ioDisableImageWrite(void); via primitiveDisableImageWrite

Parms: NONE
return: NONE, fake return of zero
From: Interpreter
Why:
Enables the ability to make the image non-writeable. This is part of the security model embedded in the squeak file pluginn

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. This also disables the ability to get the imageName

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