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

Re: How to handle multiple versions of binaries




On Sun, 12 Dec 1999, Seth R Arnold wrote:

> On Sun, Dec 12, 1999 at 11:34:23PM -0800, ferret@phonewave.net wrote:
> > Disclaimer: IATTIMS
Or IATTWA

> [this is a new one to me! :]
> 
> [... cutting and compressing ...]
[More cutting]

> > So what it looks like at this point:
> > 
> > Main configuration file in /etc/<package>.conf
> > ELF binaries installed in /usr/lib/<package>/
> > Wrapper script installed in /usr/bin/
> > "default" dataset(s) installed in /usr/share/<package>/
> > Init script checks in /usr/local/games/<package>/<foo>/ and optionally
> > ~<user>/.<package>/<foo>/ for valid datasets to load.
> 
> I would like to say that an init script that loads automatically from
> ~<user>/.package/foo/ scares me a bit. I don't think I have any documents to
> back me up on this, but It Seems To Me That having a server boot script
> depend upon data in users' home directories is Very Wrong.

This "feature" depends on a line in the main configuration file, will be
turned off by default, and will run those instances as the user. Heck,
loading any of the potential datasets is turned off in the default
as-shipped configuration file.

I'm currently in the middle of writing the wrapper scripts.

I'm going to have anything automatic turned off `as-shipped', and merely
inform the admin to edit the configuration file. Later I'll add support
for debconf.

> I suppose one could argue that an administrator wouldn't install the package
> unless the administrator was willing to accept this, especially if the
> server isn't part of the critical function of the server. But, many people,
> when installing linux for the first time, take the approach of "Lets take it
> ALL." (It took me four or five installs before I figured out this isn't
> quite the best approach... :)
> 
> If the server is started as root, then there is the distinct possibility
> that a buffer overflow or careless argument checking could cause commands to
> be executed with root permission by being read at boot from the users' home
> directories. (!!) If the server is started as a dedicated user, that isn't
> as bad; it is likely to be a risk many admins wouldn't mind taking, if the
> server provides enough functionality.

Server shouldn't be running as root. It's running as root on my box only
because I'm testing it right now. Probably making a `system' user named
after the package and running everything suid <package> sgid games will be
best?

> In summary, provide such a script if you wish, but please do not make it the
> default startup script. Provide this script in the
> /usr/share/doc/<package>/examples directory. (Tounge-in-cheek, no flames
> needed, provided for humor only: I am not sure I would tell how to replace
> the one provided in /etc/init.d -- if the admin doesn't know that, should
> they be able to programmatically make such a blatant change? :)

I've taken care of most things like that pre-planned. It's just hard to
remember everything when you're asleep on the keyboard and typing with
your forehead muscles. :>

-- Ferret no baka



Reply to: