Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

AccessControl Class Reference

#include <AccessControl.H>

List of all members.

Public Types

typedef IdentityRepIdentity
typedef Bit32 ModeBits
enum  Class {
  unrestricted, administrative, ownership, read,
  write, search, del, setuid,
  setgid, agreement
}

Public Member Functions

uid_t toUnixUser () throw ()
gid_t toUnixGroup () throw ()
bool check (Identity who, Class cls, const char *value=NULL) throw ()

Static Public Member Functions

static uid_t globalToUnixUser (const char *user) throw ()
static gid_t globalToUnixGroup (const char *group) throw ()
static const char * unixToGlobalUser (uid_t uid) throw ()
static const char * unixToGlobalGroup (gid_t gid) throw ()
static void refreshAccessTables () throw (ParseError)
static bool admit (Identity who) throw ()
static Identity self () throw ()
static ModeBits parseModeBits (const char *char_mode) throw ()
static const char * formatModeBits (ModeBits mode) throw ()
static void serverInit () throw (VestaConfig::failure )
static void commonInit () throw ()

Public Attributes

ModeBits mode
VestaAttribs owner
VestaAttribs group

Static Public Attributes

static const char * realm = 0
static unsigned int realmlen = 0
static IdentityRep::Flavor defaultFlavor = AccessControl::IdentityRep::unspecified
static bool restrictDelete
static uid_t vforeignUser
static gid_t vforeignGroup
static const char * vadminUser
static const char * vadminGroup
static const char * rootUser
static const char * runtoolUser
static const char * vwizardUser

Static Private Member Functions

static void selfInit () throw ()

Static Private Attributes

static Identity self_ = 0

Friends

void AccessControl_commonInit_inner () throw ()
void AccessControl_selfInit_inner () throw ()

Classes

class  GlobalIdentityRep
class  IdentityRep
class  IdInfo
class  ParseError
class  UnixIdentityRep


Member Typedef Documentation

typedef IdentityRep* AccessControl::Identity
 

Definition at line 113 of file AccessControl.H.

typedef Bit32 AccessControl::ModeBits
 

Definition at line 296 of file AccessControl.H.


Member Enumeration Documentation

enum AccessControl::Class
 

Enumeration values:
unrestricted 
administrative 
ownership 
read 
write 
search 
del 
setuid 
setgid 
agreement 

Definition at line 267 of file AccessControl.H.


Member Function Documentation

bool AccessControl::admit Identity  who  )  throw () [static]
 

Definition at line 1935 of file AccessControl.C.

References ReadersWritersLock::acquireRead(), ReadersWritersLock::acquireWrite(), Export::allow, Export::deny, export_lock, exportEpoch, Table< K, V >::Default::Get(), AccessControl::IdentityRep::global, AccessControl::IdentityRep::gssapi, Export::level, Export::match(), Export::next, Table< K, V >::Default::Put(), Export::readOnly, ReadersWritersLock::releaseRead(), and ReadersWritersLock::releaseWrite().

Referenced by nfs_dispatch(), and srpc_recv_identity().

bool AccessControl::check Identity  who,
Class  cls,
const char *  value = NULL
throw ()
 

Definition at line 1665 of file AccessControl.C.

References administrative, agreement, del, ownership, read, search, setgid, setuid, unrestricted, and write.

Referenced by AcquireMastership(), apply_sattr(), do_remove(), do_rename(), AccessCheckStep::execute(), and fh_fd().

void AccessControl::commonInit  )  throw () [static]
 

Definition at line 166 of file AccessControlClient.C.

References AccessControl_commonInit_inner.

Referenced by AccessControl::GlobalIdentityRep::GlobalIdentityRep(), selfInit(), serverInit(), AccessControl::UnixIdentityRep::UnixIdentityRep(), VDirSurrogate_init(), and VestaSourceSRPC_init_inner().

const char * AccessControl::formatModeBits ModeBits  mode  )  throw () [static]
 

Definition at line 2016 of file AccessControl.C.

References NEW_PTRFREE_ARRAY.

Referenced by apply_sattr().

gid_t AccessControl::globalToUnixGroup const char *  group  )  throw () [static]
 

Definition at line 1332 of file AccessControl.C.

References ReadersWritersLock::acquireRead(), Table< K, V >::Default::Get(), group, realm, ReadersWritersLock::releaseRead(), RWLOCK_LOCKED_REASON, userGroup_lock, and vforeignGroup.

Referenced by AccessControl::GlobalIdentityRep::toUnixGroup(), and toUnixGroupCallback().

uid_t AccessControl::globalToUnixUser const char *  user  )  throw () [static]
 

Definition at line 1307 of file AccessControl.C.

References ReadersWritersLock::acquireRead(), Table< K, V >::Default::Get(), realm, ReadersWritersLock::releaseRead(), RWLOCK_LOCKED_REASON, userGroup_lock, and vforeignUser.

Referenced by AccessControl::GlobalIdentityRep::toUnixUser(), and toUnixUserCallback().

AccessControl::ModeBits AccessControl::parseModeBits const char *  char_mode  )  throw () [static]
 

Definition at line 2008 of file AccessControl.C.

Referenced by VDCLookupResult().

void AccessControl::refreshAccessTables  )  throw (ParseError) [static]
 

Definition at line 2122 of file AccessControl.C.

AccessControl::Identity AccessControl::self  )  throw () [static]
 

Definition at line 403 of file AccessControlClient.C.

References self_, and selfInit().

Referenced by main(), and VestaSourceSRPC::send_identity().

void AccessControl::selfInit  )  throw () [static, private]
 

Definition at line 196 of file AccessControlClient.C.

References AccessControl_selfInit_inner, and commonInit().

Referenced by self().

void AccessControl::serverInit  )  throw (VestaConfig::failure ) [static]
 

Definition at line 2066 of file AccessControl.C.

References Text::cchars(), commonInit(), defaultFlavor, VestaConfig::get_bool(), VestaConfig::get_int(), VestaConfig::get_Text(), AccessControl::IdentityRep::global, AccessControl::IdentityRep::gssapi, VestaConfig::is_set(), realm, realmlen, RegisterRecoveryCallback(), AccessControl::IdentityRep::unix_flavor, AccessControl::IdentityRep::unspecified, vestaAliasFile, vestaExportFile, and vestaGroupFile.

Referenced by main().

gid_t AccessControl::toUnixGroup  )  throw ()
 

Definition at line 1611 of file AccessControl.C.

References VestaAttribs::getAttrib(), owner, toUnixGroupCallback(), and vforeignGroup.

uid_t AccessControl::toUnixUser  )  throw ()
 

Definition at line 1590 of file AccessControl.C.

References VestaAttribs::getAttrib(), owner, toUnixUserCallback(), and vforeignUser.

const char * AccessControl::unixToGlobalGroup gid_t  gid  )  throw () [static]
 

Definition at line 1563 of file AccessControl.C.

References ReadersWritersLock::acquireRead(), ReadersWritersLock::releaseRead(), RWLOCK_LOCKED_REASON, and userGroup_lock.

Referenced by apply_sattr().

const char * AccessControl::unixToGlobalUser uid_t  uid  )  throw () [static]
 

Definition at line 1453 of file AccessControl.C.

References ReadersWritersLock::acquireRead(), ReadersWritersLock::releaseRead(), RWLOCK_LOCKED_REASON, and userGroup_lock.

Referenced by apply_sattr().


Friends And Related Function Documentation

void AccessControl_commonInit_inner  )  throw () [friend]
 

! gssapi initialization may be needed here

Definition at line 59 of file AccessControlClient.C.

Referenced by commonInit().

void AccessControl_selfInit_inner  )  throw () [friend]
 

Definition at line 174 of file AccessControlClient.C.

Referenced by selfInit().


Member Data Documentation

AccessControl::IdentityRep::Flavor AccessControl::defaultFlavor = AccessControl::IdentityRep::unspecified [static]
 

Definition at line 34 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), AccessControl_selfInit_inner(), and serverInit().

VestaAttribs AccessControl::group
 

Definition at line 302 of file AccessControl.H.

Referenced by any_fattr(), apply_sattr(), file_fattr(), globalToUnixGroup(), VestaSource::init(), and VDCLookupResult().

ModeBits AccessControl::mode
 

Definition at line 300 of file AccessControl.H.

Referenced by any_fattr(), apply_sattr(), file_fattr(), VestaSource::init(), and VDCLookupResult().

VestaAttribs AccessControl::owner
 

Definition at line 301 of file AccessControl.H.

Referenced by any_fattr(), apply_sattr(), file_fattr(), VestaSource::init(), VDirChangeable::insertAppendableDirectory(), VDirChangeable::insertFile(), VDirChangeable::insertGhost(), VDirChangeable::insertImmutableDirectory(), VDirChangeable::insertMutableDirectory(), VDirChangeable::insertMutableFile(), VDirChangeable::insertStub(), VDirChangeable::renameTo(), toUnixGroup(), toUnixUser(), and VDCLookupResult().

const char * AccessControl::realm = 0 [static]
 

Definition at line 31 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), AccessControl::GlobalIdentityRep::GlobalIdentityRep(), globalToUnixGroup(), globalToUnixUser(), main(), serverInit(), toUnixGroupCallback(), and toUnixUserCallback().

unsigned int AccessControl::realmlen = 0 [static]
 

Definition at line 32 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), AccessControl::GlobalIdentityRep::GlobalIdentityRep(), and serverInit().

bool AccessControl::restrictDelete [static]
 

Definition at line 35 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner().

const char * AccessControl::rootUser [static]
 

Definition at line 40 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner().

const char * AccessControl::runtoolUser [static]
 

Definition at line 41 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), and VestaSource::recoveryDone().

AccessControl::Identity AccessControl::self_ = 0 [static, private]
 

Definition at line 43 of file AccessControlClient.C.

Referenced by self().

const char * AccessControl::vadminGroup [static]
 

Definition at line 39 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), and VestaSource::recoveryDone().

const char * AccessControl::vadminUser [static]
 

Definition at line 38 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner().

gid_t AccessControl::vforeignGroup [static]
 

Definition at line 37 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), any_fattr(), file_fattr(), globalToUnixGroup(), and toUnixGroup().

uid_t AccessControl::vforeignUser [static]
 

Definition at line 36 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner(), any_fattr(), file_fattr(), globalToUnixUser(), and toUnixUser().

const char * AccessControl::vwizardUser [static]
 

Definition at line 42 of file AccessControlClient.C.

Referenced by AccessControl_commonInit_inner().


The documentation for this class was generated from the following files:
Generated on Mon May 8 00:49:07 2006 for Vesta by  doxygen 1.4.2