home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HomeWare 14
/
HOMEWARE14.bin
/
utils1
/
a_lock12.arj
/
A-LOCK.DOC
< prev
next >
Wrap
Text File
|
1994-03-07
|
6KB
|
155 lines
************************
* A-Lock v1.2 *
* by Dario Rosati *
************************
LEGAL STUFF
This program is absolutely freeware, you can do what you want with it,
except gaining money by selling it to someone.
However, I strongly raccomend to read this entire Doc file, because i
take NO RESPONSABILITY if you lock your system and can't get back, thus
loosing your day's work.
If you want to contact me, for flames, bugs, chat or whatsoever, see the
section AUTHOR.
INTRODUCTION
Do you have a young brother, who seems only to wait the moment you leave
your Amy alone just for wreak havoc trough your harddisk or your system?
Have you lost your 4000's keys?
Are you using your Amy in a public place for a demonstration?
You lucky have a local net of Amy, and simply want to descourage other
peoples from using your machine while you are away for a while?
If so, A-Lock is for you.
It is based on a version of X-Lock running on Unix machines in my
university lab.
REQUIREMENTS
You need the incredibile amount of 12k ram and OS 2.04 to run this program.
CPU Doesn't matter.
Ah, sorry, pearl.font also needed (I like them :)).
INSTRUCTIONS
It's not so difficult, I mean.
First, and MOST IMPORTANT, take a look at the tooltypes in the program's
icon.
The first is PASSWORD, and you MUST fill it with a LOWERCASE password.
The reason is explained in the technical section.
The second is AUTOLOCK; setting it to YES will cause A-Lock to
automatically lock when launched.
This is *VERY* useful (thanks to Jochen Becher for the suggestion)
because now you can place A-Lock in the WB-Startup drawer with the
tooltypes DONOTWAIT and STARTPRI, and so the system will boot LOCKED!
Thus, even toggling power will prevent stupid people to access your
computer!
If for example you have the opportunity to lock your drives, there is
* NO WAY * to access your computer now.
The only method is to boot from a floppy disk.
Forgetting the password in autolock mode can now cause some troubles, so be
careful with it.
Then, you can simply doubleclick your icon and a small window will appear.
Now you may:
-Quit in the usual way (Upper left gadget of the window...)
-Lock the system by pressing the "Lock" gadget
-Have a small info requester by pressing "About".
If you lock the system, you'll notice some small :) things to happen...
The mouse will appear like a closed lock, and left mouse button will act
like the right.
Naaa, only? Yes, I threat you to do something different than typing your
password, cause you'll soon realize (i hope :)) that you can't no longer
interact with the system.
After typing the password, you will hear an acknowledgment beep and then
the situation will return as before.
Now you are probably thinking "Such programs still exists, so why...", and
I answer that all I saw in the past had four drawbacks:
1) Too complicated
2) Too big
3) Doesn't allow multitasking when locked
4) Doesn't work on my Amiga 4000/030.
A-Lock is simple, allows running tasks to continue their works and runs
on my 4000/30 :).
TECHNICAL SECTION
This program was a four-days work on my 4000/30 with SAS 6.5 and DevPac
3.04. Yes yes, I had to write a part in assembly (the most skilled of you
have probably still realised WHAT part... or not? ;)).
I wrote this program mainly to learn how device handlers and events work.
In fact, when the user locks, the program sets up a high-priority assembly
handler in the input-handlers queue.
This handler simply trashes all leftmouse events and all key-related
qualifiers (such as IEQUALIFIER_RSHIFT --> this is the reason why you MUST
specify a LOWERCASE PASSWORD in the PASSWORD tooltype...), preventing the
user from accessing to other screens, other windows, menus, gadgets, icons,
commodities and so on. As ulterior security the programs reacts to
IDCMP_INACTIVEWINDOW bringing the screen to front and making its own
window active; this is needed to prevent AUTOPOINT features of some
commodities. Using A-Lock when such feature is present causes a hugly
effect on the pointer and the screen title, but the situation remains equally
under control, don't worry.
I have not yet discovered any weak point, except the fact that the password
stays in the icon (but you can change it when you want, and there is no way
to read it when the program is locked).
The handler is written in assembly because there can be many programs
waiting for events and you must handle them as fast as possible to prevent
the loss of someone.
If you are interested in the source code, contact me in one of the ways
described in the section below.
THE AUTHOR
I can be reached for bug reports, ideas, congratulations (:)), chats and all
what you want in three ways:
- E-Mail at rosati@ghost.dsi.unimi.it
- BBS: +39-[0]2-27201236 or 27200576
- Normal Mail:
Dario Rosati
Piazza Piola 11
20133 Milano - Italy
HISTORY
10-Jan-94: First release
04-Feb-94: Version 1.1
- Forgot to release some memory
- Forgot to lower the priority after unlocking
- Instead of raising the priority at the fixed value
of 21, now A-Lock checks the priority of the input.device
and then raises his priority to one unit more than them.
This allow A-Lock to run in almost any situation.
07-Mar-94: Version 1.2
- Added AUTOLOCK feature, making A-Lock more useful.
Now A-Lock can be placed into WBStartup drawer,
if the user wants to lock the system on startup.
TO DO
- Allow opening on public screens
- Password file encription
- Timeout autolocking (also suggested by Jochen Becker)
GREETINGS
- Special greetings to Andrea Marenghi, without whom I probably
had never learned C language (Asm rulez ;))
- Also greetings to Dario Maggiorini, who gave me the idea
- Jason L. Tatum, who gave me an hint
- And to Kichkaha & Willow of Skandal.
Have fun! And sorry for my scholastic english!