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

Re: So many cookies



Evan K. Langlois wrote:

>[...making Supexec() root-only...]

I was looking at mint.doc recently -- the one that came with MiNT v0.96,
though, but it should still apply -- and it says that programs should
detect the presence of MiNT by looking in the cookie jar.  It also says
that an alternative method would be to make a Syield() (?) call, and
see if it returns an error, but that this was not recommended because
a non-MiNT system may use that function code for something else.

So, if Supexec() is to become root-only, how do you now find out whether
you're running under MiNT?  I guess you try to Supexec() first, and look
for the cookie, and if Supexec() doesn't work, assume you're running
under a secure MiNT.  Or maybe the kernel should place some value into
the process's basepage to tell it that it should expect to be unable to
switch to supervisor mode...  Alternatively, there was the suggestion
some time ago of a new executable binary type, which would support TOS-
incompatible features...

This looks to me as if it could be a problem.

>How about making Super() and Supexec() a root-only <<would this be euid==0?>>

If so, setuid programs would be able to install cookies.  Is that
necessary?

>[...new, protected, domain for unix-style programs...]

Great idea, but for a minor problem: it needs a way for programs to know
which domain they're running in...  You can't check which domain you're
in until you know you're running under MiNT, and you can't Supexec() and
read a cookie if you're running under MiNT in the unix domain!

I suppose this again raises the question of what direction MiNT is
basically going in.  The objective (as I understood it) was originally
to make it as unixey (POSIXey?) as possible, without loosing TOS
compatibility.  I suppose the unix domain would be the 'ultimate' in
this: a unix-compatible environment, running concurrently with a TOS-
compatible environment.  (Btw, isn't this very similar to what Microsoft
has done with Windows NT?)

--
Charles Briscoe-Smith
2nd Year student of Computer Science
University of Kent at Canterbury, United Kingdom, European Union.