OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
dced_binding_set_auth_info(dced_bh,
rpc_c_protect_level_default,
rpc_c_authn_default,
NULL,
rpc_c_authz_dce,
&status);
dced_list_get(dced_bh, &entries, &status);
for(i=0; i<entries.count; i++) {
generate_new_key(&key); /* application specific */
dced_keytab_change_key(dced_bh, &entries.list[i].id, &key, &status);
}
dced_list_release(dced_bh, &entries, &status);
dced_binding_free( dced_bh, &status);
dced_binding_create()
This routine creates a dced binding to a dced service on a specified host.
The binding handle created is used in all subsequent calls to appropriate
dced API routines. The keytab portion of the first argument represents
the well-known name of the keytab service. When this string is used by
itself, it refers to the service on the local host.
dced_binding_set_auth_info()
Accessing keytab data requires authenticated remote procedure calls.
The dced_binding_set_auth_info() routine sets authentication for the
dced binding handle, dced_bh.
dced_list_get()
Applications use the dced_list_get() routine to get a service’s entire list
of names.
generate_new_key()
This application-specific routine generates the new key and fills in a
dced_key_t data structure. This routine could use the
sec_key_mgmt_gen_rand_key( ) routine to randomly generate a new
key.
dced_keytab_change_key( )
The dced_keytab_change_key( ) routine tries to change the principal’s
key in the security service’s registry first. If that is succesful, it changes
the key in the key table.
dced_list_release()
Each call to the dced_list_get( ) routine requires a corresponding call to
dced_list_release() to release the resources allocated for the entry list.
dced_binding_free()
Each call to the dced_binding_create( ) routine requires a
corresponding call to dced_binding_free( ) to release the resources
allocated for a dced binding handle.
For more detailed key table management, applications can peruse a key table’s list of
keys by using the dced_keytab_initialize_cursor( ), dced_keytab_get_next_key(), and
dced_keytab_release_cursor() routines. Reading key table data remotely presents a
2 26 Tandem Computers Incorporated 124245