Created
November 7, 2010 12:21
-
-
Save berekuk/666100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Ubic::Credentials; | |
my $current_cr = Ubic::Credentials->current; | |
my $service_cr = $service->credentials; # or maybe to avoid adding one more method to Ubic::Service interface, Ubic->credentials($service_name) | |
$guard = $service_cr->effective_guard; # guard | |
... # write status file | |
undef $guard; | |
$service_cr->activate; # there is no way back from here - you can't change real uid and then change it back |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment