[pve-devel] [PATCH common 1/2] Tools: add setns system call

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jan 22 11:55:27 CET 2016


---
 src/PVE/Tools.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 64a57e9..9f08aa6 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -1185,4 +1185,9 @@ sub unshare($) {
     return 0 == syscall(272, $flags);
 }
 
+sub setns($$) {
+    my ($fileno, $nstype) = @_;
+    return 0 == syscall(308, $fileno, $nstype);
+}
+
 1;
-- 
2.1.4





More information about the pve-devel mailing list