# TOY: setuid+pidfile.patch...

Shadow (shadow@worldone.com)
Thu, 27 Feb 1997 20:47:17 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    -----BEGIN PGP SIGNED MESSAGE-----

    After the previous discussion re: setuid() capability in the server, I
    whipped up a quick hack that can be found at:

    ftp://ftp.worldone.com/pub/LambdaMOO/patches/setuid+pidfile.patch.

    This patch provides two (IMHO Useful) modifications to the server:

    It adds the ability for the server to switch users (you *MUST* start the
    server as root, at least under Linux, in order for it to work properly).
    Note that this will only allow proper bind() behavior under the BSD
    networking code; I don't use sysV or anything else, so I left them alone.

    [ Note:  If I get beaten on hard enough, I'll make the changes for the
    SysV code and such as well.  Otherwise, if anyone else does it please
    forward the patch to me for inclusion in the archive if you'd be so kind
    ;) ]

    2.  The server now creates a moo.pid file, containing the process ID of
    the main server.  This is useful for two things:  Automated shutdown of
    the MOO, and automated shutdown of the MOO :-)  An interesting note is
    that the server will attempt to autocleanup the .pid file;  I did this
    mostly so that a system shutdown script can -TERM the server, and when the
    .pid file disappears it knows the checkpoint is finished and can complete
    the shutdown procedure.

    Questions/Comments > shadow@worldone.com
    Flames > /dev/null.

    - --Shadow

    *..__--<< You know something's up when your Thought process is idle. >>--__..*

    USER       PID %CPU %MEM   VSZ  RSS TTY      S    STARTED         TIME COMMAND
    shadow   28365  0.0  0.2 2.84M 264K ttyp1    S    12:57:12     0:00.02 Thought

    Steven M. Doyle, President, World One Telecommunications
    	         Webmaster, Decade Communications
    		 IRC Administrator, los-angeles.ca.us.undernet.org

                     Finger shadow@dragon.worldone.com for PGP public key.

    -----BEGIN PGP SIGNATURE-----
    Version: 2.6.2

    iQCVAwUBMxZjWZ664xtexA+FAQHgUAP/fQp0xLtLoKPGp2MHFHFp5F5AjAFlYyOW
    sgSRPALcO5bQ5Pi0sJLvcBcKXqAg4PnyEv65kBYMqSZk06LlAj6OWFJmsmRrr6Zs
    yW25pP4swXv2hB0NrnDLjfRjt2DadKukmD5YkyfA0Of9kHYzzLxBjaVP7+/0KcYf
    u8PK+bP/CBA=
    =V1lf
    -----END PGP SIGNATURE-----