iSqueak Wikki : ioCanRenameImage

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Revision [293]

Most recent edit made on 2008-10-21 03:06:20 by JohnMcIntosh

Additions:
sqInt ioCanRenameImage(void); via secCanRenameImage
sqInt ioCanWriteImage(void); via secCanWriteImage
sqInt ioDisableImageWrite(void); via primitiveDisableImageWrite
there is no way to allow writing again. This also disables the ability to get the imageName


Deletions:
sqInt ioCanRenameImage(void);
sqInt ioCanWriteImage(void);
sqInt ioDisableImageWrite(void);
there is no way to allow writing again.




Revision [292]

Edited on 2008-10-21 03:02:50 by JohnMcIntosh

Additions:
Optional




Revision [291]

Edited on 2008-10-21 02:58:48 by JohnMcIntosh

Additions:
Enables the ability to make the image non-writeable. This is part of the security model embedded in the squeak file pluginn


Deletions:
Enables the ability to make the image non-writeable.




Revision [290]

The oldest known version of this page was edited on 2008-10-21 02:48:49 by JohnMcIntosh

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; /* allow writing the image */
int ioCanRenameImage(void) {
return allowImageWrite; /* only when we're allowed to save the image */
}

int ioCanWriteImage(void) {
return allowImageWrite;
}

int ioDisableImageWrite(void) {
allowImageWrite = 0;
}


BUGS

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0458 seconds