#include <FXACL.h>
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.
Public Member Functions | |
| FXACLEntity (const FXACLEntity &o) | |
| FXACLEntity & | operator= (const FXACLEntity &o) |
| 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 FXACLEntity & | currentUser () |
| static const FXACLEntity & | everything () |
| static const FXACLEntity & | root () |
| static const FXACLEntity & | owner () |
| static FXACLEntity | lookupUser (const FXString &username, const FXString &machine=FXString::nullStr()) |
Friends | |
| class | FXACL |
| struct | FXACLPrivate |
| bool FX::FXACLEntity::isGroup | ( | ) | const |
Returns true if this entity is a group.
| FXACLEntity FX::FXACLEntity::group | ( | ) | const |
Returns the primary group this entity belongs to.
| FXString FX::FXACLEntity::asString | ( | bool | withId = true, |
|
| bool | withMachine = true | |||
| ) | const |
Returns the entity as a string, localised to the system locale. If withId is true, appends the system-dependent underlying user id in curly brackets. If withMachine is true, on supported platforms this prepends the machine where the account lives - this is separated from the username with a / rather than a \
| bool FX::FXACLEntity::isLoginPassword | ( | const FXchar * | password | ) | const |
Returns true if the specified password is the password to the entity's account. You should allocate the password in the secure heap. Due to implementation constraints on Windows, SSPI is used which requires the local machine to permit network logons. On POSIX, PAM is asked to perform the authentication - this requires root privileges to succeed (an exception is thrown if the calling process does not have them)
| FXString FX::FXACLEntity::homeDirectory | ( | bool | filesdir = false |
) | const |
Returns the home directory of the entity if it has one, if not a blank string is returned rather than an error. If filesdir is true, returns the path where the entity stores its files (this is the same as the home directory on POSIX, but on Windows it is "My Documents" in the system locale). Note that the entity must be authenticated before you can retrieve its home directory
| static const FXACLEntity& FX::FXACLEntity::currentUser | ( | ) | [static] |
Returns an entity representing the current user (ie; the user who created this process) This entity is already authenticated, so you don't need to call isLoginPassword()
| static const FXACLEntity& FX::FXACLEntity::everything | ( | ) | [static] |
Returns the special entity representing everything (ie; the public).
| static const FXACLEntity& FX::FXACLEntity::root | ( | ) | [static] |
Returns the special entity representing the highest privileged user (eg; KATE\Administrator).
| static const FXACLEntity& FX::FXACLEntity::owner | ( | ) | [static] |
Returns the special entity representing the owner of something.
| static FXACLEntity FX::FXACLEntity::lookupUser | ( | const FXString & | username, | |
| const FXString & | machine = FXString::nullStr() | |||
| ) | [static] |
Returns an entity representing the specified user on the specified machine. Note that on Windows, this may be a user on another machine
v1.5.6