~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to src/bin/trampoline-python

  • Committer: mattgiuca
  • Date: 2007-12-19 07:02:43 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:86
apps/server: Now calls trampoline-python.
bin/trampoline-python: Commented out throttle call (didn't work).
        Set jail relative to my test jail (will have to change).

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
def runscript(uid, jail, cwd, script):
59
59
    if uid == 0:
60
60
        sys.exit(sys.argv[0] + ": cannot run scripts as root!\n")
61
 
    # os.chroot(os.path.join(<<base-directory-for-jails>>, jail))
62
 
    os.chroot(jail)
 
61
    os.chroot(os.path.join("/home/mgiuca/playground", jail))
 
62
    #os.chroot(jail)
63
63
    os.chdir(cwd)
64
64
    os.setuid(uid)
65
 
    throttle()
 
65
    # throttle()
66
66
    m = compile(file(script,'r').read(), script, 'exec')
67
67
    g = {}
68
68
    g['__builtins__'] = globals()['__builtins__']
72
72
    #eval(m)
73
73
    sys.exit(0)
74
74
 
75
 
runscript(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4])
 
75
runscript(int(sys.argv[1]), sys.argv[2], sys.argv[3], sys.argv[4])