PreviousNext

dced_keytab_get_next_key(3dce)

Returns a key from a cached list, and advances the cursor in the list

Synopsis

#include <dce/dced.h>

void dced_keytab_get_next_key(

dced_keytab_cursor_t cursor,

dced_key_t **key,

error_status_t *status);

Parameters

Input/Output

cursor
Specifies the cursor that points to a key, and returns the cursor advanced to the next key in the list.

Output

key
Returns the current key to which the cursor points.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The dced_keytab_get_next_key( ) routine obtains the current key to which the key-list cursor points. This routine is commonly used in a loop to traverse a key table's keys. The keys are returned in an undetermined order. Prior to using this routine in the loop, the application must call dced_keytab_initialize_cursor( ) to obtain the key list and established the beginning of the cursor. When the application is finished traversing the key list, it should call dced_keytab_release_cursor( ) to release the resources allocated.

Management applications use dced_keytab_get_next_key( ) to remotely access a server's individual keys. Servers use sec_key_mgmt_get_next_key(3sec) to access their own local keys individually.

You can also use the dced_object_read( ) routine to read an entire key table. You might use dced_object_read( ) if your application needs to bind to and read data for other host services (srvrconf, srvrexec, or hostdata) in addition to data for the keytab service.

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.

error_status_ok

dced_s_no_more_entries

Related Information
Routines: dced_keytab_initialize_cursor(3dce)

dced_keytab_release_cursor(3dce)

sec_key_mgmt_get_next_key(3sec)

dced_object_read(3dce)

Book: OSF DCE Application Development Guide - Core Components