lxcsu-internal to set LD_PRELOAD and HOME (resulting process wtill ends up in / though)
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 2 Jul 2013 11:32:20 +0000 (13:32 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 2 Jul 2013 11:32:20 +0000 (13:32 +0200)
lxcsu-internal

index 9dbb9ef..638fbdf 100755 (executable)
@@ -186,7 +186,8 @@ def main ():
             exec_args = [arch,'/usr/sbin/capsh','--','--login']+args.command_to_run
 
         os.environ['SHELL'] = '/bin/sh'
             exec_args = [arch,'/usr/sbin/capsh','--','--login']+args.command_to_run
 
         os.environ['SHELL'] = '/bin/sh'
-# Thierry's suggestion:os.environ['HOME'] = '/home/%s'%slice_name
+        os.environ['HOME'] = '/home/%s'%slice_name
+        os.environ['LD_PRELOAD'] = '/etc/planetlab/lib/bind_public.so'
         if debug: print 'lxcsu-internal:execv:','/usr/bin/setarch',exec_args
         os.execv('/usr/bin/setarch',exec_args)
     else:
         if debug: print 'lxcsu-internal:execv:','/usr/bin/setarch',exec_args
         os.execv('/usr/bin/setarch',exec_args)
     else: