summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-12-15 20:52:31 (GMT)
committerGuido van Rossum <guido@python.org>1992-12-15 20:52:31 (GMT)
commit195a4f70a3156d0fe6045a7f30210cd35b521163 (patch)
tree170bc4a57257979a9f62eea1e2d8f08be590da09
parente3cafbe7b85c350d4dbeb2af53fd8fc1ae66689b (diff)
downloadcpython-195a4f70a3156d0fe6045a7f30210cd35b521163.zip
cpython-195a4f70a3156d0fe6045a7f30210cd35b521163.tar.gz
cpython-195a4f70a3156d0fe6045a7f30210cd35b521163.tar.bz2
Add explicit auth object
-rw-r--r--Demo/rpc/nfsclient.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Demo/rpc/nfsclient.py b/Demo/rpc/nfsclient.py
index 2260139..645a2a7 100644
--- a/Demo/rpc/nfsclient.py
+++ b/Demo/rpc/nfsclient.py
@@ -3,6 +3,7 @@
# (See mountclient.py for some hints on how to write RPC clients in
# Python in general)
+import rpc
from rpc import UDPClient, TCPClient
from mountclient import FHSIZE, MountPacker, MountUnpacker
@@ -124,6 +125,11 @@ class NFSClient(UDPClient):
self.packer = NFSPacker().init()
self.unpacker = NFSUnpacker().init('')
+ def mkcred(self, proc):
+ if self.cred == None:
+ self.cred = rpc.AUTH_UNIX, rpc.make_auth_unix_default()
+ return self.cred
+
def Getattr(self, fh):
self.start_call(1)
self.packer.pack_fhandle(fh)