[uWSGI] before_privileges_drop in python

Paul Pieralde pmp at eventbrite.com
Mon Oct 14 19:56:58 CEST 2013


I am looking at the recent check-ins related to hooks. These look really
promising.

My previous pull request contained a python hook for as_root which allowed
us to hook before dropping privs.

We are effectively looking to have something like the following in our
production.wsgi config

from uwsgidecorators import before_privilege_drop

@before_privilege_drop
def root_required_initialization():
    ... do stuff ...


Is the preferred method to do this as a C module and hook in via the
as_root hooks or to extend the python plugin to provide this new hook akin
to post_fork
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20131014/08fd0d41/attachment.html>


More information about the uWSGI mailing list