[cod] Beware...

Tomé Duarte tome.duarte at gmail.com
Fri May 29 11:31:18 EDT 2009


I looked a little better into shell scripting and realized it after my post.
I guess I should've looked into it first, sorry for "spamming".
I agree with setting the immutable flag in the binaries, wouldn't that solve
the problem for once, no syncs/checks/etc required?
I mean, you could go as far as using something like tripwire on the
gameserver executables, but that's kind of overkill, no?

On Fri, May 29, 2009 at 3:28 PM, Darren M <darren at cpanel.net> wrote:

> > Maybe I'm misunderstanding your script, but won't the initial rm
> > delete the clients' dirs, thus removing the config files as well as
> > possible mods installed, etc?
>
> The /home/users it rm's is a list created 2 lines after (or 4 lines
> before, depending on which one); just a safety check to be sure you
> aren't using an old list of users it would seem. He mentioned not
> having any config files in the /home/install "seed" directory to
> prevent overwriting users' config files. If you want to go this far
> howver, you may want to just set the immutable flag on the main
> binaries for the user as well so they can never change it.
>
> > > update-files.bsh
> > >
> > > #!/bin/bash
> > > rm -f /home/users
> > > chattr -R +i /home/install
> > > cd /home
> > > ls -1p|grep /|grep -v install|cut -d "/" -f1 > users
> > > for user in `cat users`
> > > do
> > > rsync -av /home/install/cod4 /home/$user/
> > > done
> > > rm -f /home/users
> > > exit $?
> _______________________________________________
> cod mailing list
> cod at icculus.org
> http://icculus.org/mailman/listinfo/cod
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/cod/attachments/20090529/2b519896/attachment.htm>


More information about the cod mailing list