Re: GTK+-1.2.9 Released



On Wed, 07 Mar 2001, Valdis Kletnieks vt edu wrote:
> On Mon, 05 Mar 2001 17:47:24 GMT, "J. Ali Harlow" said:
> > Slash'EM can't drop privileges before calling GTK+ because it will need to
> > update score files, write out saved levels, and other associated files. This
> 
> Sure it can.  Open the files, save the file descriptor in a global variable,
> and then drop privs before callling GTK+.  Pretty standard program
> design.  Look at what BIND does - if you tell it to run as non-root, it
> opens port 53 and THEN tosses the privs...

I'm glad you know so much about what Slash'EM can do :-) Actually, you're wrong.
The reason being that it needs to create and delete files during the course of
the game, the names of which cannot be determined at the start of the game. To
change this would require a complete game re-design. You could use a double
directory and use privileges to cd into the outer one, and allow others to
create and delete files inside the inner one, but it'd be pretty gross.

Alternately, you could move all the files Slash'EM currently might create into
one large file (effectively re-implementing UNIX directories in Slash'EM). This
would also be a lot of work, quite apart from difficulties with locking the
relevant parts of the file.

I'd sooner go for the helper option that either of these, for all the problems
that has.

-- 
Ali Harlow                              Email: ali avrc city ac uk
Research programmer                     Tel:   (020) 7477 8000 X 4348
Applied Vision Research Centre          Intl: +44 20 7477 8000 X 4348
City University                         Fax:   (020) 7505 5515
London                                  Intl: +44 20 7505 5515




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