PreviousNext

sec_attr_util_alloc_copy(3sec)

Allocates the necessary subfields of the destination sec_attr_t and copies the corresponding data from the source sec_attr_t

Synopsis

#include <dce/sec_attr_util.h>

void sec_attr_util_alloc_copy (
void *(*allocate) (unsigned32 size),
sec_attr_t *from,
sec_attr_t *to,
error_status_t *status);

Parameters

Input

*(*allocate) (unsigned32 size)
A caller-specified allocate routine (such as rpc_ss_allocate( )) used to allocate resources for the output to parameter. Set to NULL to use the default malloc( ) routine.

*from
A pointer to a sec_attr_t that is the source to be copied from.

Output

*to
A pointer to the target sec_attr_t that contains subfields allocated, if necessary, by the caller-specified allocate routine and data copied from the source sec_attr_t specified by from.

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

Description
The sec_attr_util_alloc_copy( ) routine allocates memory for the subfields of the target sec_attr_t, if necessary, and copies data from the source sec_attr_t to the target sec_attr_t.

Use the sec_attr_util_free( ) routine to free the memory allocated by this routine. If a nonnull allocate routine was input to sec_attr_util_alloc_copy( ), then a corresponding free routine must be input to the sec_attr_util_free( ) routine.

Files

/usr/include/dce/sec_attr_util.idl
The idl file from which dce/sec_attr_util.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_rgy_not_implemented

error_status_ok

Related Information
Functions:

sec_attr_util_free(3sec)

sec_attr_util_inst_free_ptrs(3sec)

sec_attr_util_inst_free(3sec)