This file is indexed.

/usr/share/doc/pyro/examples/sessions/storage_server_caller.py is in pyro-examples 1:3.14-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import Pyro.core
import Pyro.naming
import sys

# server based on using caller object on the TLS to store session data


print """
This is the storage server that depends on the caller object in the TLS to
keep track of what the resource is for that given session. Because that object
is always equal to the current active client connection, it will work with
or without multithreading enabled. You can check this by looking at the
output on the screen and the contents of the datafiles."""
print

Pyro.config.PYRO_MULTITHREADED=raw_input("Enable multithreading y/n? ") in ('y','Y')


# The datastore.
# It will store lines of text in a file named after the 'user'.
# The resource that is owned by this user session (the file handle) is stored
# on the caller object on the TLS.
class DataStore(Pyro.core.ObjBase):
	def init(self, username):
		caller=self.getLocalStorage().caller
		caller.datastore=open("datastorage_%s.txt"%username,"w")
		
	def addline(self, textline):
		caller=self.getLocalStorage().caller
		sys.stdout.write("adding line to "+caller.datastore.name+"\n")
		sys.stdout.flush()
		caller.datastore.write(textline+" | came from "+str(caller)+"\n")
	
	def close(self):
		caller=self.getLocalStorage().caller
		caller.datastore.close()	
			
		

daemon=Pyro.core.Daemon()
ns=Pyro.naming.NameServerLocator().getNS()
daemon.useNameServer(ns)

try:
	ns.createGroup(":test")
except Exception:
	pass
try:
	ns.unregister(":test.datastorage")
except Exception:
	pass

daemon.connect(DataStore(), ":test.datastorage")

print "Server (caller version) is running."
daemon.requestLoop()