PreviousNext

sec_login_export_context(3sec)

Creates an exportable login context

Synopsis

#include <dce/sec_login.h>

void sec_login_export_context(
sec_login_handle_t login_context,
unsigned32
buf_len,
idl_byte
buf[ ],
unsigned32 *
len_used,
unsigned32 *
len_needed,
error_status_t *
status);

Parameters

Input

login_context
An opaque handle to login context data. The login context contains, among other data, the account principal name and UUID, account restrictions, records of group membership, and the process home directory. (See sec_intro(3sec) for more details about the login context.)

buf_len
An unsigned 32-bit integer containing the allocated length (in bytes) of the buffer that is to contain the login context.

Output

buf[ ]
An idl_byte array that contains the exportable login context upon return.

len_used
A pointer to an unsigned 32-bit integer indicating the number of bytes needed for the entire login context, up to buf_len.

len_needed
If the allocated length of the buffer is too short, an error is issued (sec_login_s_no_memory), and on return this pointer indicates the number of bytes necessary to contain the login context.

status
A pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.

Description
The sec_login_export_context( ) routine obtains an exportable version of the login context information. This information may be passed to another process running on the same machine.

Files

/usr/include/dce/sec_login.idl
The idl file from which dce/sec_login.h was derived.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

sec_login_s_no_memory
Not enough space was allocated for the buf[ ] array. The len_needed parameter will point to the needed length.

sec_login_s_handle_invalid
The login context handle is invalid.

sec_login_s_context_invalid
The login context specified by the input handle is invalid.

Related Information
Functions:

sec_intro(3sec)

sec_login_import_context(3sec)