NAME

Ubic::Credentials - base class for OS-specific credential methods

VERSION

version 1.33_04

SYNOPSIS

$creds = Ubic::Credentials->new(user => "mmcleric", group => ["ppb"]);
$creds = Ubic::Credentials->new(); # current credentials
$creds = Ubic::Credentials->new(service => $service); # credentials from the given service

$creds->set_effective; # change effective credentials only, enables tainted mode
$creds->reset_effective; # back to normality

$creds->eq(Ubic::Credentials->new); # check if set() call is required to apply the credentials
$creds->set; # apply all credentials; there is no way back

METHODS

new()
new(service => $service)
new(user => $user, group => $group)

Constructor.

It constructs credentials with current user and group if no parameters are specified, takes user and group from given service if service parameter is specified or uses any user and group which you pass directly to it.

set_effective()

Set credentials user and group as effective user and group.

reset_effective()

Restore effective user and group to their original values.

eq($other_creds)

Compare current creds with other creds object.

Returns true value if credentials are equivalent.

set()

Set credentials as effective and real group and user permanently.

AUTHOR

Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Yandex LLC.

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