RPC::Serialized::Server::UCSPI::IPC - RPC server managed by ucspi-ipc


RPC-Serialized documentation Contained in the RPC-Serialized distribution.

Index


Code Index:

NAME

Top

RPC::Serialized::Server::UCSPI::IPC - RPC server managed by ucspi-ipc

VERSION

Top

version 1.110470

SYNOPSIS

Top

 use RPC::Serialized::Server::UCSPI::IPC;

 # set up the new server
 my $s = RPC::Serialized::Server::UCSPI::IPC->new;

 # begin a single-process loop handling requests on STDIN and STDOUT
 $s->process;

DESCRIPTION

Top

This module provides an extension to RPC::Serialized which enhances support for the ucspi-ipc network services system, produced by SuperScript Technology, Inc..

In ucspi-land, servers communicate using Standard Input and Standard Output, so things are very simple. The services system takes care of setting up a listening network socket, and forking off child handlers. Those child handlers are simple setup scripts just like that shown in the SYNOPSIS above.

Within the examples directory of this distribution, there is an example tcpserver startup script which can be easily adapted to use this module.

There is no additional server configuration necessary, although you can of course supply arguments to new() as described in the RPC::Serialized manual page.

This module provides support for using the IPCREMOTEINFO environment variable in the call authorization phase of RPC::Serialized. Although not well documented, this is fully working and there are example scripts in this distribution.

THANKS

Top

This module is a derivative of YAML::RPC, written by pod and Ray Miller, at the University of Oxford Computing Services. Without their brilliant creation this system would not exist.

AUTHOR

Top

Oliver Gorwits <oliver@cpan.org>

COPYRIGHT AND LICENSE

Top


RPC-Serialized documentation Contained in the RPC-Serialized distribution.

package RPC::Serialized::Server::UCSPI::IPC;
BEGIN {
  $RPC::Serialized::Server::UCSPI::IPC::VERSION = '1.110470';
}

use strict;
use warnings FATAL => 'all';

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__