FX::FXACLEntity Class Reference
[Writing secure code]

#include <FXACL.h>

List of all members.


Detailed Description

Something which can be permitted or denied to do something within this operating system.

As under most operating systems this is no more than a container for a very long integer, most of these operations are fast. The exceptions is lookupUser() as well as the asString() method which may need to query a remote machine.

Someday the functionality to obtain a list of all entities on a local or remote machine may be added.

Warning:
I've made this mistake myself, so I'll warn of it here - when browsing FXACL's, you must check each to see if it is owner() and if it is then you must indirect to the item's owner. Failing to do this causes different (usually breaking) behaviour on Windows and POSIX, but also is subtly broken on Windows where owner() appears if it's in the ACL instead of the owner id itself (this is rare post-NT4 as inheritability causes the dereferencing long before you usually see it).
Note:
User accounts on NT can belong to many groups and there is no primary one. However, NTFS does maintain a primary group as well as user and so where possible, FXACLEntity's static methods try to find a suitable primary group. Where this isn't possible, CREATOR_GROUP is used.
See also:
FX::FXACL

Definition at line 65 of file FXACL.h.

Public Member Functions

 FXACLEntity ()
 FXACLEntity (const FXACLEntity &o)
FXACLEntityoperator= (const FXACLEntity &o)
 ~FXACLEntity ()
bool operator== (const FXACLEntity &o) const
bool operator!= (const FXACLEntity &o) const
bool isGroup () const
FXACLEntity group () const
FXString asString (bool withId=true, bool withMachine=true) const
bool isLoginPassword (const FXchar *password) const
FXString homeDirectory (bool filesdir=false) const

Static Public Member Functions

static const FXACLEntitycurrentUser ()
static const FXACLEntityeverything ()
static const FXACLEntityroot ()
static const FXACLEntityowner ()
static FXACLEntity lookupUser (const FXString &username, const FXString &machine=FXString::nullStr())

Friends

class FXACL
struct FXACLPrivate


The documentation for this class was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:32:37 2009 for TnFOX by doxygen v1.4.7