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