OSF DCE Application Development Guide--Introduction and Style Guide

Introduction to DCE Application Programming
1.6.1.2 Determing the Entry Name
To determine how the client knows the entry name to import from, the simplest method is
to have the user type it in on the command line.
1.6.1.3 Binding Compatibility
The protocol sequence used must be supported by both the RPC runtime and the
operating system on the client’s machine. However, the RPC runtime implicitly takes
care of binding compatibility when it returns bindings to importing clients; only
compatible bindings are returned.
The rpc_network_inq_protseqs( ) and rpc_network_is_protseq_valid() routines can
be used to return all supported protocol sequences and to determine whether a specified
protocol is supported, respectively.
To find out what protocol sequence is used in a binding handle, make the following series
of calls:
rpc_binding_to_string_binding(binding, &string_binding, &status);
rpc_string_binding_parse(string_binding, NULL, &protseq, NULL, NULL, \
NULL, &status);
1.6.2 Annotating the Binding Handle for Security
Now that the client has a binding, it is almost ready to begin RPC operations. One last
preliminary task remains; namely, to specify various security-related parameters to the
RPC runtime, which will govern the (security) conduct of the ensuing client/server
relationship. If the client does not require authentication, it can skip this step
completely. The result will be that no authentication will take place between the client
and server. It will then be up to the server to decide how far to go with an
unauthenticated client.
1.6.2.1 Preparation
What the client essentially wants to do now is call the routine
rpc_binding_set_auth_info() in order to specify all the necessary security parameters.
However, when it does this, it should be able to specify its server’s principal name, so
that the server it binds to can be authenticated to the client. (The server’s principal name
is the name by which the server is known to the DCE Security Service.) The client must
124246 Tandem Computers Incorporated 1 27