RPC-Serialized

 view release on metacpan or  search on metacpan

lib/RPC/Serialized.pm  view on Meta::CPAN

# The C<UCSPI/TCP> server will look for the C<TCPREMOTEINFO> environment
# variable, if authorization is enabled. See the C<ucspi-tcp> documentation for
# details if you don't know how to enable this.
# 
# =item C<IPCREMOTEEUID not set> in an C<X::Authorization>
# 
# The C<UCSPI/IPC> server will look for the C<IPCREMOTEINFO> environment
# variable, if authorization is enabled. See the <ucspi-ipc> documentation for
# details if you don't know how to enable this.
# 
# =item C<getpwuid $uid failed> in an C<X::Authorization>
# 
# The C<UCSPI/IPC> server failed to get the username for the calling user. Only
# happens if authorization has been enabled.
# 
# =item C<Not a RPC::Serialized::AuthzHandler> in an C<X::Application>
# 
# Server authorization is enabled but the specified handler does not inherit
# from L<RPC::Serialized::AuthzHandler>.
# 
# =item C<Failed to open GDBM file...> in an C<X::System>

lib/RPC/Serialized/Server/UCSPI/IPC.pm  view on Meta::CPAN

use base 'RPC::Serialized::Server::UCSPI';

use RPC::Serialized::Exceptions;

sub subject {
    my $self = shift;

    my $uid  = $ENV{IPCREMOTEEUID}
        or throw_authz 'IPCREMOTEEUID not set';

    my $username = getpwuid($uid)
        or throw_authz 'getpwuid $uid failed';

    return $username;
}

1;

# ABSTRACT: RPC server managed by ucspi-ipc


__END__



( run in 0.300 second using v1.01-cache-2.11-cpan-8d75d55dd25 )