]> git.proxmox.com Git - pve-common.git/commitdiff
Tools: add setns system call
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 22 Jan 2016 10:55:27 +0000 (11:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 23 Jan 2016 07:59:07 +0000 (08:59 +0100)
src/PVE/Tools.pm

index 64a57e9596dcbdcc15dff98d38161be38cbdf91e..9f08aa6fbf0c08da62e2f17078684cc2136d5b14 100644 (file)
@@ -1185,4 +1185,9 @@ sub unshare($) {
     return 0 == syscall(272, $flags);
 }
 
+sub setns($$) {
+    my ($fileno, $nstype) = @_;
+    return 0 == syscall(308, $fileno, $nstype);
+}
+
 1;