|
|
|
@ -12,6 +12,7 @@ import subprocess |
|
|
|
|
|
|
|
|
|
log = logging.getLogger('RUNSCRIPT') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run_as(uid, gid, groups): |
|
|
|
|
"""Closure that changes the current running user and groups. Called before |
|
|
|
|
executing scripts by Subprocess.""" |
|
|
|
@ -22,6 +23,7 @@ def run_as(uid, gid, groups): |
|
|
|
|
os.setuid(uid) |
|
|
|
|
return set_acc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def run_script(form_def, form_values, stdout=None, stderr=None): |
|
|
|
|
""" |
|
|
|
|
Perform a callback for the form `form_def`. This calls a script. |
|
|
|
|