[PATCH pynfs] Add the ability to have NFS3Client connect using a secure port.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bryan Schmersal <bryan@xxxxxxxxxxxxx>

Signed-off-by: Bryan Schmersal <bryan@xxxxxxxxxxxxx>
---
 nfs4.1/nfs3client.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nfs4.1/nfs3client.py b/nfs4.1/nfs3client.py
index 9dee653..2993f6e 100644
--- a/nfs4.1/nfs3client.py
+++ b/nfs4.1/nfs3client.py
@@ -118,8 +118,8 @@ class Mnt3Client(rpc.Client):
         return res.mountinfo.fhandle
 
 class NFS3Client(rpc.Client):
-    def __init__(self, host='localhost', port=None, ctrl_proc=16, summary=None):
-        rpc.Client.__init__(self, NFS_PROGRAM, NFS_V3)
+    def __init__(self, host='localhost', port=None, ctrl_proc=16, summary=None, secureport=False):
+        rpc.Client.__init__(self, NFS_PROGRAM, NFS_V3, secureport=secureport)
         self.portmap = PORTMAPClient(host=host)
         self.mntport = self.portmap.get_port(MOUNT_PROGRAM, MOUNT_V3)
         if not port:
@@ -136,7 +136,7 @@ class NFS3Client(rpc.Client):
 
     def get_pipe(self):
         if not self._pipe or not self._pipe.is_active():
-            self._pipe = self.connect(self.server_address)
+            self._pipe = self.connect(self.server_address, secure=self.secureport)
         return self._pipe
 
     def set_cred(self, credinfo):
-- 
2.34.1





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux