Page 1 of 2

symlink not supported ?

Posted: Tue Apr 26, 2011 11:25 am
by TsT
Hello,

I understand the symlink inside zip file (.love file) was not supported (and it's not my problem).
My problem went I'm running love for development like :

Code: Select all

love mydirectory/
symlink are reallly usefull to have a tree like :

Code: Select all

common/lib/ -- where every lua and love lib are available
project1/   -- a first love game project
    main.lua
    lib -> ../common/lib -- a symlink to access the lib without making copies

project2/   -- a second love game project
    main.lua
    lib -> ../common/lib -- a symlink to access the lib without mading copies
The love.filesystem.exists(), load(), enumerate() don't see my symlink files.
Is not supporting symlink is a choice or just a miss ?

Regards,

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 1:15 pm
by bartbes
It's a default by the lib we use for love.filesystem, and we see no reason to set it to allow symlinks.

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 1:56 pm
by Robin
Maybe hardlinking is an alternative here?

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 2:15 pm
by TsT
bartbes wrote:It's a default by the lib we use for love.filesystem, and we see no reason to set it to allow symlinks.
And I don't understand why... symlink are so usefull !
Robin wrote:Maybe hardlinking is an alternative here?
Not really. hardlinking directories is not a good idea, and hardlinking every files are boring (and keeping synced are not automatic).

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 6:38 pm
by bmelts
TsT wrote:And I don't understand why... symlink are so usefull !
Consider the following file structure:

Code: Select all

evil.love
    EvilSymlink -> ~
    EvilerSymlink -> /usr/local
Symlinking breaks sandboxing. Whether LÖVE should be sandboxed or not is another debate (boy is it ever), but as long as it is, symlinks are not acceptable.

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 9:56 pm
by TsT
I need symlink for personnal development use. I build my own symlink and I don't be afraid of myself :ultraglee:

You speak about security and sandboxing ... when os.remove(), io.open and loadstring and are available ?

If we have a love.filesystem.isSymlink(file) and/or love.filesystem.getSymlinkTarget(file) (to get where the symlink is pointing to)
it should possible to check what you want really load or not.
And be able to filter this kind of files for people that want this !

I like security and sandboxing, I doing from scratch my old own security project for löve, love-master started in 2008.
But just now I guest be able to use symlink. I prefer be able to restrict dangerous features and be able to use it with take than nothing.

For now my workaround is to patch the love.filesystem.load() to check if love.filesystem.exists return false then trying directly with loadstring.

I guest having a love --insecure that allow every dangerous functions (usefull for developement) and running love by default without dangerous functions.
Am I wrong ?

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 10:03 pm
by TechnoCat
TsT wrote:You speak about security and sandboxing ... when os.remove(), io.open and loadstring and are available ?
Shhhh!!! People can hear you!

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 10:27 pm
by TsT
:rofl:

Re: symlink not supported ?

Posted: Tue Apr 26, 2011 10:59 pm
by BlackBulletIV
Lol, yeah, using symlinks are the easier counter part of hacking around with os.execute and the io.* functions.

As for sandboxing, I personally think that folders and merged executables should have full rights, only to have their rights governed by the OS. This would make LOVE a good game development platform. But when it comes to a .love, sandboxing should be started; this makes LOVE a good game platform.

Re: symlink not supported ?

Posted: Wed Apr 27, 2011 4:00 am
by bmelts
BlackBulletIV wrote:As for sandboxing, I personally think that folders and merged executables should have full rights, only to have their rights governed by the OS. This would make LOVE a good game development platform. But when it comes to a .love, sandboxing should be started; this makes LOVE a good game platform.
*downloads sandboxed .love*
*merges .love into executable*
:joker: