]>
git.proxmox.com Git - mirror_lxc.git/blob - src/tests/may_control.c
3 * Copyright © 2013 Canonical, Inc
4 * Author: Serge Hallyn <serge.hallyn@ubuntu.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2, as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #include <lxc/lxccontainer.h>
26 static void usage(const char *me
)
28 printf("Usage: %s name [lxcpath]\n", me
);
32 int main(int argc
, char *argv
[])
34 const char *lxcpath
= NULL
, *name
;
36 struct lxc_container
*c
;
46 c
= lxc_container_new(name
, lxcpath
);
48 may
= c
->may_control(c
);
50 printf("You may%s control %s\n", may
? "" : " not", name
);