1 /* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*-
3 * Copyright (C) 2011 Canonical Ltd.
4 * Author: Martin Pitt <martin.pitt@ubuntu.com>
6 * This program is free software: you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
13 /* This is a simple wrapper which just re-execve()'s the program given as its
14 * arguments. This allows MAC systems like AppArmor or SELinux to apply a
15 * policy on this wrapper which applies to guest sessions only. */
24 main (int argc, char *argv[], char *envp[])
28 fprintf (stderr, "Usage: %s COMMAND [ARGS]\n", argv[0]);
32 execve (argv[1], argv+1, envp);
34 fprintf (stderr, "Failed to run guest session '%s': %s\n", argv[1], strerror (errno));