Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Authorization

Communicates with the ATS. More...

Enumerations

enum  macs_action { MACS_READ, MACS_WRITE, MACS_ADMIN, MACS_OWN }

Functions

int macs_authorize (const void *ctxp, const char *uid, macs_action act, const char *rid)
 Ask an ATS if this operation is allowed.

char ** macs_ats_login (const void *ctxp, const char *uid)
 Log a user into the ATS.

int macs_ats_logout (const void *ctxp, char *uid)
 Log a user out of the ATS.


Detailed Description

Communicates with the ATS.


Enumeration Type Documentation

enum macs_action
 

Possible actions to protect

Enumeration values:
MACS_READ  Denotes read permission from a resource.
MACS_WRITE  Denotes write permission to a resource.
MACS_ADMIN  Denotes administrative rights on a resource.
MACS_OWN  Denotes resource ownership.


Function Documentation

int macs_authorize const void *    ctxp,
const char *    uid,
macs_action    act,
const char *    rid
 

Ask an ATS if this operation is allowed.

Parameters:
ctxp  An opaque _macs_ctx pointer from macs_init.
uid  The uid of the user
act  The action to protect
rid  The id of the resource we are authorizing.
Returns:
1 on success, 0 on failure
Queries an ATS as to the authority of a user to perform an action on a resource.

char** macs_ats_login const void *    ctxp,
const char *    uid
 

Log a user into the ATS.

Parameters:
ctxp  An opaque _macs_ctx pointer from macs_init.
uid  The uid of the user to log in.
Returns:
NULL-terminated array of groups the user is in, or NULL on failure. The array and each string should be free()d
This will initialize the ATS for a certain user. Before authorizing a user's action on any resource, the user must be "logged in" to the ATS. Usually, this is done when the user's session is created in the AUS, so use this function with care. Initializing a user's permissions can be very time-consuming.

int macs_ats_logout const void *    ctxp,
char *    uid
 

Log a user out of the ATS.

Parameters:
ctxp  An opaque _macs_ctx pointer from macs_init.
uid  The uid of the user to log out.
Returns:
1 on success, 0 on failure
This will remove a user's initialized permissions from the ATS. Usually, this is done when the user's session is deleted in the AUS, so use this function with care. Initializing a user's permissions can be very time-consuming.


Generated on Tue Oct 8 22:15:53 2002 for MACS Client C API by doxygen1.2.16