The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Perinci::Sub::Property::drops_privilege - Declare that function drops privilege during running

VERSION

This document describes version 0.07 of Perinci::Sub::Property::drops_privilege (from Perl distribution Perinci-Sub-Property-drops_privilege), released on 2016-03-09.

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.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Perinci-Sub-Property-drops_privilege.

SOURCE

Source repository is at https://github.com/sharyanto/perl-Perinci-Sub-Property-drops_privilege.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Sub-Property-drops_privilege

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Perinci

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.