Grid Community Toolkit  6.2.1550507116
Macros | Typedefs | Functions
GRAM Client Attribute Functions

GRAM Client Attribute Functions. More...

Macros

#define GLOBUS_GRAM_CLIENT_NO_ATTR
 Default GRAM client operation attribute. More...
 

Typedefs

typedef void * globus_gram_client_attr_t
 GRAM client operation attribute. More...
 

Functions

int globus_gram_client_attr_init (globus_gram_client_attr_t *attr)
 Initialize a GRAM client attribute. More...
 
int globus_gram_client_attr_destroy (globus_gram_client_attr_t *attr)
 Destroy a GRAM client attribute. More...
 
int globus_gram_client_attr_set_credential (globus_gram_client_attr_t attr, gss_cred_id_t credential)
 Set a GRAM client attribute's security credential. More...
 
int globus_gram_client_attr_get_credential (globus_gram_client_attr_t attr, gss_cred_id_t *credential)
 Get a GRAM client attribute's security credential. More...
 
int globus_gram_client_attr_set_delegation_mode (globus_gram_client_attr_t attr, globus_io_secure_delegation_mode_t mode)
 Set a GRAM client attribute's delegation mode. More...
 
int globus_gram_client_attr_get_delegation_mode (globus_gram_client_attr_t attr, globus_io_secure_delegation_mode_t *mode)
 Get a GRAM client attribute's security credential. More...
 

Detailed Description

GRAM Client Attribute Functions.

Macro Definition Documentation

◆ GLOBUS_GRAM_CLIENT_NO_ATTR

#define GLOBUS_GRAM_CLIENT_NO_ATTR

Default GRAM client operation attribute.

The GLOBUS_GRAM_CLIENT_NO_ATTR macro defines a constant for use when a user of the GRAM client API does not want to specify any non-default GRAM attributes.

Typedef Documentation

◆ globus_gram_client_attr_t

GRAM client operation attribute.

The globus_gram_client_attr_t type is an opaque type describing GRAM attributes. It can be accessed or modified by functions in the GRAM Client Attribute Functions documentation.

Function Documentation

◆ globus_gram_client_attr_destroy()

int globus_gram_client_attr_destroy ( globus_gram_client_attr_t attr)

Destroy a GRAM client attribute.

The globus_gram_client_attr_destroy() function destroys and frees a GRAM client attribute. After this function returns, the value pointed to by attr is no longer valid and must not be used.

Parameters
attrA pointer to the attribute to destroy. All data associated with the attribute will be freed and it will be an invalid attribute.
Returns
Upon success, globus_gram_client_attr_destroy() destroys the attribute pointed to by the attr parameter and sets it to an invalid state. If an error occurs, globus_gram_client_attr_destroy() returns an integer error code and value of attr is unchanged.
Return values
GLOBUS_SUCCESSSuccess
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_ATTRInvalid attribute
See also
globus_gram_client_attr_init()

◆ globus_gram_client_attr_get_credential()

int globus_gram_client_attr_get_credential ( globus_gram_client_attr_t  attr,
gss_cred_id_t *  credential 
)

Get a GRAM client attribute's security credential.

The globus_gram_client_attr_get_credential() function gets the value of the credential in an attribute and modifies the credential parameter to point to it. This is a shallow copy.

Parameters
attrThe attribute set to query for its credential.
credentialAn output parameter that will be initialized to point to the GSSAPI credential which the attr is currently using.
Returns
Upon success, globus_gram_client_attr_get_credential() modifies the the value pointed to by the credential parameter to be the same credential as that being used by the attribute named by the attr parameter and returns GLOBUS_SUCCESS. If an error occurs, globus_gram_client_attr_get_credential() returns an integer error code and the value pointed to by the credential parameter is undefined.
Return values
GLOBUS_SUCCESSSuccess
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_ATTRInvalid attribute
GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETERNull parameter
See also
globus_gram_client_attr_set_credential()

◆ globus_gram_client_attr_get_delegation_mode()

int globus_gram_client_attr_get_delegation_mode ( globus_gram_client_attr_t  attr,
globus_io_secure_delegation_mode_t *  mode 
)

Get a GRAM client attribute's security credential.

The globus_gram_client_attr_get_delegation_mode() function gets the value of the delegation_mode in an attribute and modifies the mode parameter to point to its value.

Parameters
attrThe attribute set to query for its delegation_mode.
modeAn output parameter that will be set to point to the delegation mode which the attr is currently using.
Returns
Upon success, globus_gram_client_attr_get_delegation_mode() modifies the the value pointed to by the mode parameter as described above and returns GLOBUS_SUCCESS. If an error occurs, globus_gram_client_attr_get_delegation_mode() returns an integer error code and the value pointed to by the mode parameter is undefined.
Return values
GLOBUS_SUCCESSSuccess
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_ATTRInvalid attribute
GLOBUS_GRAM_PROTOCOL_ERROR_NULL_PARAMETERNull parameter
See also
globus_gram_client_attr_get_delegation_mode()

◆ globus_gram_client_attr_init()

int globus_gram_client_attr_init ( globus_gram_client_attr_t attr)

Initialize a GRAM client attribute.

The globus_gram_client_attr_init() function creates a new opaque structure that can be used to specify custom attributes for performing GRAM client operations.

Parameters
attrAn output parameter which will be set to the newly initialized attribute.
Returns
Upon success, globus_gram_client_attr_init() modifies the attr parameter to point to a new GRAM client attribute and returns GLOBUS_SUCCESS. If an error occurs, globus_gram_client_attr_init() returns an integer error code and value of attr is undefined.
Return values
GLOBUS_SUCCESSSuccess
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_ATTRInvalid attribute
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILEDOut of memory
See also
globus_gram_client_attr_destroy()

◆ globus_gram_client_attr_set_credential()

int globus_gram_client_attr_set_credential ( globus_gram_client_attr_t  attr,
gss_cred_id_t  credential 
)

Set a GRAM client attribute's security credential.

The globus_gram_client_attr_set_credential() function sets the value of the credential in an attribute to the GSSAPI credential named by the credential parameter. This is done as a shallow copy, so the value of credential must not be freed until the attribute will no longer be used.

Parameters
attrThe attribute set to modify to use the credential named by the credential parameter.
credentialThe GSSAPI credential to use with the attribute named by the attr parameter. This may be GSS_C_NO_CREDENTIAL to set the attribute to use the default security credential.
Returns
Upon success, globus_gram_client_attr_set_credential() modifies the the attribute pointed to by the attr parameter to use the credential specified by the credential parameter and returns GLOBUS_SUCCESS. If an error occurs, globus_gram_client_attr_set_credential() returns an integer error code and the attribute named by attr is unchanged.
Return values
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_ATTRAn invalid attribute set was passed to this function.
See also
globus_gram_client_attr_get_credential()

◆ globus_gram_client_attr_set_delegation_mode()

int globus_gram_client_attr_set_delegation_mode ( globus_gram_client_attr_t  attr,
globus_io_secure_delegation_mode_t  mode 
)

Set a GRAM client attribute's delegation mode.

The globus_gram_client_attr_set_delegation_mode() function sets the value of the delegation_mode in an attribute to the delegation mode in the mode parameter.

The GRAM client supports the following delegation modes:

  • GLOBUS_IO_SECURE_DELEGATION_MODE_LIMITED_PROXY
  • GLOBUS_IO_SECURE_DELEGATION_MODE_FULL_PROXY
Parameters
attrThe attribute set to modify to use the delegation mode in the mode parameter.
modeThe new value of the delegation mode.
Returns
Upon success, globus_gram_client_attr_set_delegation_mode() modifies the the attribute named by the attr parameter to use the delegation mode in the mode parameter and returns GLOBUS_SUCCESS. If an error occurs, globus_gram_client_attr_set_delegation_mode() returns an integer error code and the delegation_mode attribute value is unchanged.
Return values
GLOBUS_SUCCESSSuccess
GLOBUS_GRAM_PROTOCOL_ERROR_INVALID_ATTRInvalid attribute
See also
globus_gram_client_attr_get_delegation_mode()