Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

look::DbUser Class Reference

Class for managing username and logins. More...

#include <dbuser.h>

List of all members.

Static Public Methods

LookString GetCurrentUserName (void)
 Who is the current user?

bool Login (const LookString &theUserName, const LookString &thePassword)
 Login. More...

void SetCurrentUserName (void)
 Find out who is the current user. More...


Static Protected Attributes

LookString itsCurrentUserName


Detailed Description

Class for managing username and logins.

This knows the current user name and can also login (suid) under unix.

I'm not sure that the login is terribly useful at the moment - you don't need to use it.


Member Function Documentation

bool look::DbUser::Login ( const LookString & theUserName,
const LookString & thePassword ) [static]
 

Login.

Under Win32 this does nothing except set itsCurrentUserName. Under unix it tries to do a setuid with password checking via getpwnam and crypt.

You don't need to use this under unix - you can use SetCurrentUserName if you're already logged.

Parameters:
theUserName  
thePassword  
Returns:
true for success

void look::DbUser::SetCurrentUserName ( void ) [static]
 

Find out who is the current user.

Works out the current user via geteuid and getpwuid.


The documentation for this class was generated from the following files:
Generated at Thu Jan 17 12:53:08 2002 for liblookdb by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001