skip wrote: > hi all, > > I am making a control panel application that will do things like let > people change their unix password and view a list of their files. > > Is there some technique/method/something I can google for which will > enable me to effectively set the unix user running the script to the > user logged in? > > For example if I have user skip logged in, uid 5402, the script runs > under uid 5402. This is a safeguard so people can only use the script > for what their unix user allows them to do. > > Any ideas? Possible?
Note if you (or someone else here) wanted to get all fancy with this, you could spawn a subprocess that runs flup/fcgi, use wphp.fcgi_app to communicate with it, and then you could dispatch to subprocesses like any other WSGI app. While FastCGI can only send string values, potentially you could at least specifically mark non-CGI keys that you want to be sent along in pickled form (many values cannot be pickled, but it's generally safe to throw things from the environment away though you may lose some information you didn't want to lose as a result). Then, building on subprocess handling, you could create parameterized pools where subprocesses will be created on demand and cleaned up if they haven't been used for a while. This should keep it fairly light, since you'll only have a few active processes, but also speedy for the people using the system. However, a simpler option would probably be to use one of the forking flup setups, run as root, and setuid early on in the process. I don't konw if flup reuses worker processes? Maybe that's what you are already planning to do. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss -~----------~----~----~----~------~----~------~--~---
