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

« back to all changes in this revision

Viewing changes to bin/trampoline/trampoline.c

  • Committer: David Coles
  • Date: 2009-08-06 04:07:28 UTC
  • Revision ID: coles.david@gmail.com-20090806040728-pbajxo9iztw8qmhu
Fix up the documentation of trampoline you don't have to dig in the code to work out how to call it (it's still quite nightmareish)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 * Scripts (such as Python programs) should be executed by supplying
28
28
 * "/usr/bin/python" as the program, and the script as the first argument.
29
29
 *
30
 
 * Usage: trampoline uid jail-path working-path program [args...]
31
30
 * Must run as root. Will safely setuid to the supplied uid, checking that it
32
31
 * is not root. Recommended that the file is set up as follows:
33
32
 *  sudo chown root:root trampoline; sudo chroot +s trampoline
122
121
{
123
122
    fprintf(stderr,
124
123
        "usage: %s [-d] [-u] <uid> <base> <src> <system> <jail> <cwd> <program> [args...]\n", nm);
 
124
    fprintf(stderr, "  -d       \tDaemonize\n");
 
125
    fprintf(stderr, "  -u       \tPrint usage\n");
 
126
    fprintf(stderr, "  <uid>    \tUID to run program as\n");
 
127
    fprintf(stderr, "  <base>   \tDirectory that jails will be mounted in\n");
 
128
    fprintf(stderr, "  <src>    \tDirectory containing users jail data\n");
 
129
    fprintf(stderr, "  <system> \tDirectory containing main jail file system\n");
 
130
    fprintf(stderr, "  <jail>   \tDirectory of users mounted jail\n");
 
131
    fprintf(stderr, "  <cwd>    \tDirectory inside the jail to change dir to\n");
 
132
    fprintf(stderr, "  <program>\tProgram inside jail to execute\n");
125
133
    exit(1);
126
134
}
127
135