From: Guido van Rossum Date: Tue, 15 Dec 1992 20:52:31 +0000 (+0000) Subject: Add explicit auth object X-Git-Tag: v0.9.8~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=195a4f70a3156d0fe6045a7f30210cd35b521163;p=thirdparty%2FPython%2Fcpython.git Add explicit auth object --- diff --git a/Demo/rpc/nfsclient.py b/Demo/rpc/nfsclient.py index 22601398ff03..645a2a70dc8d 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)