]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Always try to create lxcpath
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 14 Jan 2014 22:54:16 +0000 (17:54 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 15 Jan 2014 15:04:04 +0000 (10:04 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_create.c

index d02daccebf7a2c8d12d1ff92ad8dd75acc4df3fe..6d94709d1ff85eb2ced339e1910f0e0bb012609b 100644 (file)
@@ -206,6 +206,9 @@ int main(int argc, char *argv[])
                exit(1);
 
        if (geteuid()) {
+               if (mkdir_p(my_args.lxcpath[0], 0755)) {
+                       exit(1);
+               }
                if (access(my_args.lxcpath[0], O_RDWR) < 0) {
                        fprintf(stderr, "You lack access to %s\n", my_args.lxcpath[0]);
                        exit(1);