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

« back to all changes in this revision

Viewing changes to src/common/jail.py

  • Committer: drtomc
  • Date: 2007-12-20 01:27:46 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:90
Add the source for trampoline. It depends on the presence of conf.h which should
define a static const char* jail_base. For example:

#ifndef CONF_H
#define CONF_H

static const char* jail_base = "/tmp/ivle/jails";

#endif /* CONF_H */

I don't really think it belongs here. We need to do some serious reorganisation!

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    if uid == 0:
5
5
        raise Exception, 'I will not setup a root jail! Go away!'
6
6
 
 
7
    if os.getuid() != <<www-uid>>>:
 
8
        raise Exception, 'I will not setup a root jail! Go away!'
 
9
 
7
10
    # FIXME - config this
8
11
    os.chroot(os.path.join('<<jail_base>>', jail))
9
12
    os.chdir(cwd)