• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

FSProxy.pyD23-Nov-20237.6 KiB302238

RCSProxy.pyD23-Nov-20234.6 KiB199149

READMED23-Nov-20234.2 KiB12291

client.pyD23-Nov-20234.6 KiB158125

cmdfw.pyD23-Nov-20234.5 KiB145124

cmptree.pyD23-Nov-20235.6 KiB209187

cvslib.pyD23-Nov-20239.9 KiB365302

cvslock.pyD23-Nov-20236.6 KiB281212

mac.pyD23-Nov-2023352 2017

makechangelog.pyD23-Nov-20232.9 KiB11089

rcsbumpD23-Nov-2023745 3419

rcsclient.pyD23-Nov-20231.8 KiB7258

rcslib.pyD23-Nov-202310.1 KiB335253

rcvsD23-Nov-2023117 94

rcvs.pyD23-Nov-202313.3 KiB478385

rrcsD23-Nov-2023117 94

rrcs.pyD23-Nov-20233.9 KiB161142

security.pyD23-Nov-20231.1 KiB3429

server.pyD23-Nov-20234.5 KiB146121

sumtree.pyD23-Nov-2023518 2520

README

1Filesystem, RCS and CVS client and server classes
2=================================================
3
4*** See the security warning at the end of this file! ***
5
6This directory contains various modules and classes that support
7remote file system operations.
8
9CVS stuff
10---------
11
12rcvs			Script to put in your bin directory
13rcvs.py			Remote CVS client command line interface
14
15cvslib.py		CVS admin files classes (used by rrcs)
16cvslock.py		CVS locking algorithms
17
18RCS stuff
19---------
20
21rrcs			Script to put in your bin directory
22rrcs.py			Remote RCS client command line interface
23
24rcsclient.py		Return an RCSProxyClient instance
25			(has reasonable default server/port/directory)
26
27RCSProxy.py		RCS proxy and server classes (on top of rcslib.py)
28
29rcslib.py		Local-only RCS base class (affects stdout &
30			local work files)
31
32FSProxy stuff
33-------------
34
35sumtree.py		Old demo for FSProxy
36cmptree.py		First FSProxy client (used to sync from the Mac)
37FSProxy.py		Filesystem interface classes
38
39Generic client/server stuff
40---------------------------
41
42client.py		Client class
43server.py		Server class
44
45security.py		Security mix-in class (not very secure I think)
46
47Other generic stuff
48-------------------
49
50cmdfw.py		CommandFrameWork class
51			(used by rcvs, should be used by rrcs as well)
52
53
54Client/Server operation
55-----------------------
56
57The Client and Server classes implement a simple-minded RPC protocol,
58using Python's pickle module to transfer arguments, return values and
59exceptions with the most generality.  The Server class is instantiated
60with a port number on which it should listen for requests; the Client
61class is instantiated with a host name and a port number where it
62should connect to.  Once a client is connected, a TCP connection is
63maintained between client and server.
64
65The Server class currently handles only one connection at a time;
66however it could be rewritten to allow various modes of operations,
67using multiple threads or processes or the select() system call as
68desired to serve multiple clients simultaneously (when using select(),
69still handling one request at a time).  This would not require
70rewriting of the Client class.  It may also be possible to adapt the
71code to use UDP instead of TCP, but then both classes will have to be
72rewritten (and unless extensive acknowlegements and request serial
73numbers are used, the server should handle duplicate requests, so its
74semantics should be idempotent -- shrudder).
75
76Even though the FSProxy and RCSProxy modules define client classes,
77the client class is fully generic -- what methods it supports is
78determined entirely by the server.  The server class, however, must be
79derived from.  This is generally done as follows:
80
81	from server import Server
82	from client import Client
83
84	# Define a class that performs the operations locally
85	class MyClassLocal:
86		def __init__(self): ...
87		def _close(self): ...
88
89	# Derive a server class using multiple inheritance
90	class MyClassServer(MyClassLocal, Server):
91		def __init__(self, address):
92			# Must initialize MyClassLocal as well as Server
93			MyClassLocal.__init__(self)
94			Server.__init__(self, address)
95		def _close(self):
96			Server._close()
97			MyClassLocal._close()
98
99	# A dummy client class
100	class MyClassClient(Client): pass
101
102Note that because MyClassLocal isn't used in the definition of
103MyClassClient, it would actually be better to place it in a separate
104module so the definition of MyClassLocal isn't executed when we only
105instantiate a client.
106
107The modules client and server should probably be renamed to Client and
108Server in order to match the class names.
109
110
111*** Security warning: this version requires that you have a file
112$HOME/.python_keyfile at the server and client side containing two
113comma- separated numbers.  The security system at the moment makes no
114guarantees of actuallng being secure -- however it requires that the
115key file exists and contains the same numbers at both ends for this to
116work.  (You can specify an alternative keyfile in $PYTHON_KEYFILE).
117Have a look at the Security class in security.py for details;
118basically, if the key file contains (x, y), then the security server
119class chooses a random number z (the challenge) in the range
12010..100000 and the client must be able to produce pow(z, x, y)
121(i.e. z**x mod y).
122