documentation and webdemo updates
[freeside.git] / htdocs / docs / man / FS / UID.html
index cad23d5..9c4da49 100644 (file)
 <HTML>
 <HEAD>
 <TITLE>FS::UID - Subroutines for database login and assorted other stuff</TITLE>
-<LINK REV="made" HREF="mailto:none">
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
 </HEAD>
 
 <BODY>
 
+<A NAME="__index__"></A>
 <!-- INDEX BEGIN -->
 
 <UL>
 
-       <LI><A HREF="#NAME">NAME</A>
-       <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
-       <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
-       <LI><A HREF="#SUBROUTINES">SUBROUTINES</A>
-       <LI><A HREF="#CALLBACKS">CALLBACKS</A>
-       <LI><A HREF="#VERSION">VERSION</A>
-       <LI><A HREF="#BUGS">BUGS</A>
-       <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+       <LI><A HREF="#name">NAME</A></LI>
+       <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+       <LI><A HREF="#description">DESCRIPTION</A></LI>
+       <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
+       <LI><A HREF="#callbacks">CALLBACKS</A></LI>
+       <LI><A HREF="#version">VERSION</A></LI>
+       <LI><A HREF="#bugs">BUGS</A></LI>
+       <LI><A HREF="#see also">SEE ALSO</A></LI>
 </UL>
 <!-- INDEX END -->
 
 <HR>
 <P>
-<H1><A NAME="NAME">NAME</A></H1>
-<P>
-FS::UID - Subroutines for database login and assorted other stuff
-
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::UID - Subroutines for database login and assorted other stuff</P>
 <P>
 <HR>
-<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
-<P>
-<PRE>  use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker
-  checkeuid checkruid swapuid);
-</PRE>
-<P>
-<PRE>  adminsuidsetup $user;
-</PRE>
-<P>
-<PRE>  $cgi = new CGI;
-  $dbh = cgisuidsetup($cgi);
-</PRE>
-<P>
-<PRE>  $dbh = dbh;
-</PRE>
-<P>
-<PRE>  $datasrc = datasrc;
-</PRE>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+  use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker
+  checkeuid checkruid swapuid);</PRE>
+<PRE>
+  adminsuidsetup $user;</PRE>
+<PRE>
+  $cgi = new CGI;
+  $dbh = cgisuidsetup($cgi);</PRE>
+<PRE>
+  $dbh = dbh;</PRE>
+<PRE>
+  $datasrc = datasrc;</PRE>
+<PRE>
+  $driver_name = driver_name;</PRE>
 <P>
 <HR>
-<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
-<P>
-Provides a hodgepodge of subroutines. 
-
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>Provides a hodgepodge of subroutines.</P>
 <P>
 <HR>
-<H1><A NAME="SUBROUTINES">SUBROUTINES</A></H1>
+<H1><A NAME="subroutines">SUBROUTINES</A></H1>
 <DL>
-<DT><STRONG><A NAME="item_adminsuidsetup">adminsuidsetup USER</A></STRONG><DD>
-<P>
-Sets the user to USER (see config.html from the base documentation). Cleans
-the environment. Make sure the script is running as freeside, or setuid
-freeside. Opens a connection to the database. Swaps real and effective
-UIDs. Runs any defined callbacks (see below). Returns the DBI database
-handle (usually you don't need this).
-
-<DT><STRONG><A NAME="item_cgisuidsetup">cgisuidsetup CGI_object</A></STRONG><DD>
-<P>
-Stores the CGI (see <A HREF=".././FS/CGI.html#">the CGI manpage</A>) object for later use. (CGI::Base is depriciated) Runs adminsuidsetup.
-
-<DT><STRONG><A NAME="item_cgi">cgi</A></STRONG><DD>
-<P>
-Returns the CGI (see <A HREF=".././FS/CGI.html#">the CGI manpage</A>) object.
-
-<DT><STRONG><A NAME="item_dbh">dbh</A></STRONG><DD>
-<P>
+<DT><STRONG><A NAME="item_adminsuidsetup">adminsuidsetup USER</A></STRONG><BR>
+<DD>
+Sets the user to USER (see config.html from the base documentation).
+Cleans the environment.
+Make sure the script is running as freeside, or setuid freeside.
+Opens a connection to the database.
+Swaps real and effective UIDs.
+Runs any defined callbacks (see below).
+Returns the DBI database handle (usually you don't need this).
+<P></P>
+<DT><STRONG><A NAME="item_cgisuidsetup_CGI_object">cgisuidsetup CGI_object</A></STRONG><BR>
+<DD>
+Takes a single argument, which is a CGI (see <A HREF=".././FS/CGI.html">the CGI manpage</A>) or Apache (see <EM>Apache</EM>)
+object (CGI::Base is depriciated).  Runs cgisetotaker and then adminsuidsetup.
+<P></P>
+<DT><STRONG><A NAME="item_cgi">cgi</A></STRONG><BR>
+<DD>
+Returns the CGI (see <A HREF=".././FS/CGI.html">the CGI manpage</A>) object.
+<P></P>
+<DT><STRONG><A NAME="item_dbh">dbh</A></STRONG><BR>
+<DD>
 Returns the DBI database handle.
-
-<DT><STRONG><A NAME="item_datasrc">datasrc</A></STRONG><DD>
-<P>
+<P></P>
+<DT><STRONG><A NAME="item_datasrc">datasrc</A></STRONG><BR>
+<DD>
 Returns the DBI data source.
-
-<DT><STRONG><A NAME="item_getotaker">getotaker</A></STRONG><DD>
-<P>
+<P></P>
+<DT><STRONG><A NAME="item_driver_name">driver_name</A></STRONG><BR>
+<DD>
+Returns just the driver name portion of the DBI data source.
+<P></P>
+<DT><STRONG><A NAME="item_getotaker">getotaker</A></STRONG><BR>
+<DD>
 Returns the current Freeside user.
-
-<DT><STRONG><A NAME="item_cgisetotaker">cgisetotaker</A></STRONG><DD>
-<P>
-Sets and returns the CGI REMOTE_USER. <A HREF="#item__cgi">$cgi</A> should
-be defined as a CGI.pm object. Support for CGI::Base and derived classes is
-depriciated.
-
-<DT><STRONG><A NAME="item_checkeuid">checkeuid</A></STRONG><DD>
-<P>
+<P></P>
+<DT><STRONG><A NAME="item_cgisetotaker">cgisetotaker</A></STRONG><BR>
+<DD>
+Sets and returns the CGI REMOTE_USER.  $cgi should be defined as a CGI.pm
+object (see <A HREF=".././FS/CGI.html">the CGI manpage</A>) or an Apache object (see <EM>Apache</EM>).  Support for CGI::Base
+and derived classes is depriciated.
+<P></P>
+<DT><STRONG><A NAME="item_checkeuid">checkeuid</A></STRONG><BR>
+<DD>
 Returns true if effective UID is that of the freeside user.
-
-<DT><STRONG><A NAME="item_checkruid">checkruid</A></STRONG><DD>
-<P>
+<P></P>
+<DT><STRONG><A NAME="item_checkruid">checkruid</A></STRONG><BR>
+<DD>
 Returns true if the real UID is that of the freeside user.
-
-<DT><STRONG><A NAME="item_swapuid">swapuid</A></STRONG><DD>
-<P>
+<P></P>
+<DT><STRONG><A NAME="item_swapuid">swapuid</A></STRONG><BR>
+<DD>
 Swaps real and effective UIDs.
-
-<DT><STRONG><A NAME="item_getsecrets">getsecrets [ USER ]</A></STRONG><DD>
-<P>
-Sets the user to USER, if supplied. Sets and returns the DBI datasource,
-username and password for this user from the
-`/usr/local/etc/freeside/mapsecrets' file.
-
-</DL>
+<P></P>
+<DT><STRONG><A NAME="item_getsecrets_%5B_USER_%5D">getsecrets [ USER ]</A></STRONG><BR>
+<DD>
+Sets the user to USER, if supplied.
+Sets and returns the DBI datasource, username and password for this user from
+the `/usr/local/etc/freeside/mapsecrets' file.
+<P></P></DL>
 <P>
 <HR>
-<H1><A NAME="CALLBACKS">CALLBACKS</A></H1>
-<P>
-Warning: this interface is likely to change in future releases.
-
-<P>
-A package can install a callback to be run in adminsuidsetup by putting a
-coderef into the hash %FS::UID::callback :
-
-<P>
-<PRE>    $coderef = sub { warn &quot;Hi, I'm returning your call!&quot; };
-    $FS::UID::callback{'Package::Name'};
-</PRE>
+<H1><A NAME="callbacks">CALLBACKS</A></H1>
+<P>Warning: this interface is likely to change in future releases.</P>
+<P>A package can install a callback to be run in adminsuidsetup by putting a
+coderef into the hash %FS::UID::callback :</P>
+<PRE>
+    $coderef = sub { warn &quot;Hi, I'm returning your call!&quot; };
+    $FS::UID::callback{'Package::Name'};</PRE>
 <P>
 <HR>
-<H1><A NAME="VERSION">VERSION</A></H1>
-<P>
-$Id: UID.html,v 1.2 2000-03-03 18:22:42 ivan Exp $
-
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: UID.html,v 1.3 2001-04-23 12:40:30 ivan Exp $</P>
 <P>
 <HR>
-<H1><A NAME="BUGS">BUGS</A></H1>
-<P>
-Too many package-global variables.
-
-<P>
-Not OO.
-
-<P>
-No capabilities yet. When mod_perl and Authen::DBI are implemented,
-cgisuidsetup will go away as well.
-
-<P>
-Goes through contortions to support non-OO syntax with multiple datasrc's.
-
-<P>
-Callbacks are inelegant.
-
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Too many package-global variables.</P>
+<P>Not OO.</P>
+<P>No capabilities yet.  When mod_perl and Authen::DBI are implemented, 
+cgisuidsetup will go away as well.</P>
+<P>Goes through contortions to support non-OO syntax with multiple datasrc's.</P>
+<P>Callbacks are inelegant.</P>
 <P>
 <HR>
-<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
-<P>
-<A HREF="../FS/Record.html">FS::Record</A>, <A HREF=".././FS/CGI.html#">the CGI manpage</A>, <EM>DBI</EM>, config.html from the base documentation.
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/CGI.html">the CGI manpage</A>, <EM>DBI</EM>, config.html from the base documentation.</P>
 
 </BODY>