mirror of https://github.com/python/cpython
Add explicit auth object
This commit is contained in:
parent
e3cafbe7b8
commit
195a4f70a3
|
@ -3,6 +3,7 @@
|
||||||
# (See mountclient.py for some hints on how to write RPC clients in
|
# (See mountclient.py for some hints on how to write RPC clients in
|
||||||
# Python in general)
|
# Python in general)
|
||||||
|
|
||||||
|
import rpc
|
||||||
from rpc import UDPClient, TCPClient
|
from rpc import UDPClient, TCPClient
|
||||||
from mountclient import FHSIZE, MountPacker, MountUnpacker
|
from mountclient import FHSIZE, MountPacker, MountUnpacker
|
||||||
|
|
||||||
|
@ -124,6 +125,11 @@ class NFSClient(UDPClient):
|
||||||
self.packer = NFSPacker().init()
|
self.packer = NFSPacker().init()
|
||||||
self.unpacker = NFSUnpacker().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):
|
def Getattr(self, fh):
|
||||||
self.start_call(1)
|
self.start_call(1)
|
||||||
self.packer.pack_fhandle(fh)
|
self.packer.pack_fhandle(fh)
|
||||||
|
|
Loading…
Reference in New Issue