1 #
   2 # Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
   3 #
   4 
   5 #
   6 # Sun::Solaris::Ucred documentation.
   7 # 
   8 
   9 =head1 NAME
  10 
  11 Sun::Solaris::Ucred - Perl interface to User Credentials
  12 
  13 =head1 SYNOPSIS
  14 
  15  use Sun::Solaris::Ucred qw(:ALL);
  16 
  17 This module provides wrappers for the Ucred-related system and
  18 library calls.
  19 
  20 =head2 Functions
  21 
  22 B<C<ucred_get($pid)>>
  23 
  24 This function returns the credential of the process specified by $pid,
  25 if the process exists and the calling process is permitted to obtain
  26 the credentials of that process.
  27 
  28 B<C<getpeerucred($fd)>>
  29 
  30 If $fd is a connected connection oriented TLI endpoint, a connected
  31 SOCK_STREAM or SOCK_SEQPKT socket, getpeerucred will return the user
  32 credential of the peer at the time the connection was established,
  33 if availble.
  34 
  35 B<C<ucred_geteuid($ucred)>>
  36 
  37 This function returns the effective uid of a user credential, if available.
  38 
  39 B<C<ucred_getruid($ucred)>>
  40 
  41 This function returns the real uid of a user credential, if available.
  42 
  43 B<C<ucred_getsuid($ucred)>>
  44 
  45 This function returns the saved uid of a user credential, if available.
  46 
  47 B<C<ucred_getegid($ucred)>>
  48 
  49 This function returns the effective group of a user credential, if available.
  50 
  51 B<C<ucred_getrgid($ucred)>>
  52 
  53 This function returns the real group of a user credential, if available.
  54 
  55 B<C<ucred_getsgid($ucred)>>
  56 
  57 This function returns the saved group of a user credential, if available.
  58 
  59 B<C<ucred_getgroups($ucred)>>
  60 
  61 This function returns the list of supplemental groups of a user
  62 credential, if available.  An array of groups is returned in ARRAY
  63 context; the number of groups is returned in SCALAR context.
  64 
  65 B<C<ucred_getprivset($ucred, $which)>>
  66 
  67 This function returns the privilege set specified by $which of a user
  68 credential, if available.
  69 
  70 B<C<ucred_getpflags($ucred, $flags)>>
  71 
  72 This function returns the value of a specific process flag of a user
  73 credential, if available.
  74 
  75 B<C<ucred_getpid($ucred)>>
  76 
  77 This function returns the process id of a user credential, if available.
  78 
  79 B<C<ucred_getzoneid($ucred)>>
  80 
  81 This function returns the zone id of a user credential, if available.
  82 
  83 B<C<ucred_getprojid($ucred)>>
  84 
  85 This function returns the project id of a user credential, if available.
  86 
  87 =head2 Class methods
  88 
  89 None.
  90 
  91 =head2 Object methods
  92 
  93 None.
  94 
  95 =head2 Exports
  96 
  97 By default nothing is exported from this module. The following tags can be
  98 used to selectively import constants and functions defined in this module:
  99 
 100  :SYSCALLS    ucred_get(), getpeerucred()
 101 
 102  :LIBCALLS    ucred_geteuid(), ucred_getruid(), ucred_getsuid(),
 103               ucred_getegid(), ucred_getrgid(), ucred_getsgid(),
 104               ucred_getgroups(), ucred_getprivset(), ucred_getpflags(),
 105               ucred_getpid(), ucred_getzoneid(), ucred_getprojid()
 106 
 107  :CONSTANTS
 108 
 109  :VARIABLES   %PRIVILEGES, %PRIVSETS
 110 
 111  :ALL         :SYSCALLS, :LIBCALLS, and :CONSTANTS
 112 
 113 =head1 ATTRIBUTES
 114 
 115 See C<attributes(5)> for descriptions of the following attributes:
 116 
 117   ___________________________________________________________
 118  |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
 119  |_____________________________|_____________________________|
 120  | Availability                | CPAN (http://www.cpan.org)  |
 121  |_____________________________|_____________________________|
 122  | Interface Stability         | Evolving                    |
 123  |_____________________________|_____________________________|
 124 
 125 =head1 SEE ALSO
 126 
 127 C<getpeerucred(2)>, C<ucred_get(3C)>, C<attributes(5)>