MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: temporary wizbit



At 12:23 PM 4/17/96 PDT, Joe Shaw wrote:
>You could do this, I suppose, but an easier (and perhaps safer) way to do
>it would be:
>
>#110.wizard = 1;
>set_task_perms(#110);
>fork (1)
>  shutdown();
>endfork
>#110.wizard = 0;

Nope... let's go through this and see what the server would do...

Is caller_perms() a wizard?  Yes?  OK, set prop #110.wizard to 1.
Is caller_perms() a wizard?  Yes?  OK, change task perms to #110.
A fork... ok, I'll do that code in 1 second...
Is caller_perms() a wizard?  Yes?  OK, set peop #110.wizard to 0.
(a second later)
a shutdown():  caller_perms().wizard?  No.  E_PERM.

- Kipp
-----BEGIN GEEK CODE BLOCK-----
GCS/CC d- s+:- a16 C++ UL++++ P+ L++ E-? W+ !N--@ !o-- K->K++++++
w++(--) O- M-- V--? PS++(+) PE(--) Y+ PGP-? t+ 5(+) X++ R+++(*)
!tv b+ DI++++ D++++ G e* h!()(*) r+ !y+
------END GEEK CODE BLOCK------
-----BEGIN NOT SO GEEKY BLOCK-----
MOO projects:
  Breakthrough MOO project:  paradigm.microwave.com 5000
  MOO2000:                   moo.microwave.com 2000
  MundoHispano:              europa.syr.edu 8888
------END NOT SO GEEKY BLOCK------




Home | Subject Index | Thread Index