[Twisted-Python] SetUID per XML RPC client

Faraz Khan faraz.khan at emergen.biz
Thu Mar 20 05:36:23 MDT 2008


Dear all,
What Im trying to do is the following. Please suggest whether this  
makes sense or not (I dont think it does- so am asking for  
suggestions!):

1. I have a XML RPC Server using xmlrpc.XMLRPC
2. Clients connect to it using SSL (am using reactor.listenSSL with a  
custom context factory)

3. This server (or agent) is being used for sys admin tasks. I want to  
connect, auth and then be able to do various sys admin tasks which the  
XMLRPC server lets them do.

4. What i wish to be able to do is that a UID/GID is set (based on  
their auth credentials) for that particular request.

I personally think this is impossible to do with threads. I have done  
something simliar using Fork & C though.

Doing os.setuid works but (obviously) changes the main process's UID  
which is not what I want.

Any advice would be highly appreciated.


-- 
Faraz R Khan
Chief Architect
Emergen Consulting Pvt Ltd
www.emergen.biz





More information about the Twisted-Python mailing list