]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add explicit auth object
authorGuido van Rossum <guido@python.org>
Tue, 15 Dec 1992 20:52:31 +0000 (20:52 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 15 Dec 1992 20:52:31 +0000 (20:52 +0000)
Demo/rpc/nfsclient.py

index 22601398ff03b7f52b60b0c3e25ab1fae2a1ef68..645a2a70dc8d1e0653858a3bd4b263979d9240da 100644 (file)
@@ -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)