Register
It is currently Sun Oct 19, 2014 10:24 pm

BASH Sandboxing


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Mon Mar 31, 2014 9:01 pm   

Joined: Mon Mar 31, 2014 8:44 pm
Posts: 2
I am looking for a way to run in a virtual sandbox. I frequently have multiple gcc variations and custom programs that require a hijacked shared libraries to run. A good example is libcrypto and MONO, I have modified these libraries to work for specific programs but have had to replace them in /usr/ directly to make programs work.

It would be great to have multiple copies of the same programs and libraries in say /usr/share/sandbox/PROGRAM/LIBRARIES and when I run a program it would point all $PATH variabls for that session to the modified ones and then restore the original $PATH. That's not the part I am having issues with though, some programs load other programs and those always use the system $PATH. Also is there a way to used different shared libraries for a program and its children?

Thanks!


Top
 Profile  
 PostPosted: Tue Apr 01, 2014 3:13 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
You could use virtulization software such as vmware or virtualbox to run the specifalized environment, or maybe use chroot.
https://www.google.co.uk/#q=chroot+howto


Top
 Profile  
 PostPosted: Tue Apr 01, 2014 6:12 am   

Joined: Mon Mar 31, 2014 8:44 pm
Posts: 2
The problem with chroot is it will create a jailed stripped system. launching a graphical program from chroot is a bit of a chore.

Are their any system/user variables that a program searches for its shared libraries from? I doubt there is as when you change shared libraries you need to run ldconfig to update the system. I thought of swapping /etc/ld.so.cache to reflect my changes for that program launching but if something loads in the background or the swap goes wrong that is a terrible error.


Top
 Profile  
 PostPosted: Tue Apr 01, 2014 9:45 am   
Moderator
User avatar

Joined: Thu Oct 11, 2007 7:12 am
Posts: 229
Location: London - UK
I've heard from devs that LD_LIBRARY_PATH can be used to alter which libs are loaded, however all of the devs then said that this is not a good system to use although I'm unsure why heh


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP