Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2011, 04:07 PM
fearlessfrog fearlessfrog is offline
Approved Member
 
Join Date: Jul 2010
Posts: 64
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
Are you sure this is true? I can't see any reason why the scripts would need to be downloaded onto each clients computer and ran there. Sure, a script could mess up a server, but that's the server admin's responsibility.

I don't even think the mission files are downloaded to clients' computers, just the info about where things are and such.

If this is true, it means that every client is a server and they are somehow collaborating to keep everybody's game the same. A pretty silly way to do it and not what I would expect from the dev team.



I don't have any friends to connect to my servers but somebody might as well try it. I have a feeling anything like that would only affect the server.

Anyway, here's code that will create a directory and file in the root directory of the c: partition. Uncomment the commented stuff to delete it. It works on a server, I doubt it will work on a client connected to a server.

Code:
public override void Init(maddox.game.ABattle battle, int missionNumber)
    {
        base.Init(battle, missionNumber);

        // Specify a "currently active folder"
        string activeDir = @"c:\youve\been\";

        System.IO.Directory.CreateDirectory(activeDir);

        string newFileName = "duped";

        string newPath = System.IO.Path.Combine(activeDir, newFileName);

        if (!System.IO.File.Exists(newPath))
        {
            using (System.IO.FileStream fs = System.IO.File.Create(newPath))
            {
                for (byte i = 0; i < 100; i++)
                {
                    fs.WriteByte(i);
                }
            }
        }

        // Delete a directory and all subdirectories with Directory static method...
        //if (System.IO.Directory.Exists(@"c:\youve"))
        //{
        //    try
        //    {
        //        System.IO.Directory.Delete(@"c:\youve", true);
        //    }

        //    catch (System.IO.IOException e)
        //    {
        //        Console.WriteLine(e.Message);
        //    }
        //}
    }
Thanks for that.

For me it looks like MP is ok, but SP needs a sandbox.

Agreed?
Reply With Quote
  #2  
Old 05-22-2011, 11:08 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by fearlessfrog View Post
Thanks for that.

For me it looks like MP is ok, but SP needs a sandbox.

Agreed?
I'm not familiar with .Net permissions, but they probably shouldn't have complete filesystem access. If you could limit it to certain directories that would be nice.
Reply With Quote
  #3  
Old 05-24-2011, 07:39 PM
Ralith Ralith is offline
Approved Member
 
Join Date: Aug 2010
Posts: 34
Default

Cliffs of Dover would hardly be the first game to require you to trust maps and mods you download, but despite this, sandboxing for the host doesn't seem entirely inappropriate, albeit certainly low-priority. You can stop going around declaring the sky to be falling, though, as there's no danger to people who aren't running unvetted content.
Reply With Quote
  #4  
Old 05-24-2011, 08:04 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Скрипт на сервере, клиентом не закачивается и повредить что-то у клиента не сможет .
"A server script is not downloaded by a client and can not damage anything at client side."
naryv, member of the dev team http://www.sukhoi.ru/forum/showthrea...=1#post1626549
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.