]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/Tools.pm
createSchema: include type property
[pve-common.git] / src / PVE / Tools.pm
index 26f008059df0104c04331482d70830cc5c03c29d..1a342ee04cc660f88dd567d4442ba895be5a0f43 100644 (file)
@@ -63,6 +63,13 @@ our $IPV6RE = "(?:" .
     "(?:(?:(?:(?:$IPV6H16:){0,5}$IPV6H16)?::" .            ")$IPV6H16)|" .
     "(?:(?:(?:(?:$IPV6H16:){0,6}$IPV6H16)?::" .                    ")))";
 
+use constant (CLONE_NEWNS   => 0x00020000,
+              CLONE_NEWUTS  => 0x04000000,
+              CLONE_NEWIPC  => 0x08000000,
+              CLONE_NEWUSER => 0x10000000,
+              CLONE_NEWPID  => 0x20000000,
+              CLONE_NEWNET  => 0x40000000);
+
 sub run_with_timeout {
     my ($timeout, $code, @param) = @_;
 
@@ -1153,4 +1160,9 @@ sub parse_host_and_port {
     return; # nothing
 }
 
+sub unshare {
+    my ($flags) = @_;
+    syscall 272, $flags;
+}
+
 1;