NAME
Perinci::Sub::property::drops_privilege - Declare that function drops privilege during running
VERSION
version 0.04
SYNOPSIS
# in your function metadata
drops_privilege => 'temp'
DESCRIPTION
Valid values: '', 'temporary' (or 'temp'), or 'permanent' (or 'perm').
This property declares that function drops privilege (either temporarily by setting EUID ($>), or permanently by setting UID ($<)) during execution. Usually the function is run by superuser and needs to perform things on behalf of normal users.
This property's wrapper implementation currently does this: If privilege is dropped temporarily, make sure that we switch back to superuser. Sometimes when the function dies, privileges are not restored, causing failure to subsequent operation.
SEE ALSO
AUTHOR
Steven Haryanto <stevenharyanto@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.