I forwarded a program I whipped up to generate srvtabs (cuts out the need
for calling "kas" followed by the AFS ksrvutil program. The basic steps
are: (I think, it works for me :-)
struct ktc_encryptionKey key, newkey;
struct ktc_token token;
struct ubik_client **conn;
long code;
/* get cell, Admin key, etc, then call */
code = ka_GetAdminToken(name, inst, cell, &key, 300, &token, 1);
code = ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, &token, &conn);
code = ubik_Call (KAM_SetPassword, conn, 0, name, inst, 0, newkey);
code = ubik_ClientDestroy (conn);
My program actually gets a random key then trys to create the principal.
If that fails with a KAEXIST then I call KAM_SetPassword.
i.e:
code = ubik_Call (KAM_GetRandomKey, conn, 0, &newkey);
code = ubik_Call (KAM_CreateUser, conn, 0, name, inst, newkey);
if (code == KAEXIST)
code = ubik_Call (KAM_SetPassword, conn, 0, name, inst, 0, newkey);
Roland
On Jul 14, 1:02pm, Peter Lister (Cranfield Computer Centre) wrote:
> Subject: Setting up an RPC connection for KAM*()
>
> Does anyone have a working code fragment? The Rx manual looks terrifying, and
> I'd prefer not to resort to an expect driven kas script if at all possible.
>
> BTW, when one *has* opened such a connection, how does KAM_SetPassword know,
> there being no ubik_client argument with which to tell it?
>
> Peter Lister Email: [EMAIL PROTECTED]
> Computer Centre, Cranfield University Voice: +44 234 754200 ext 2828
> Cranfield, Bedfordshire MK43 0AL UK Fax: +44 234 750875
> -- Just call me Ramesses Niblick the Third Kerplunk Kerplunk Thribble --
>
>-- End of excerpt from Peter Lister (Cranfield Computer Centre)
--
Roland J. Schemers III | Networking Systems
Authentication Services Programmer | 414 Sweet Hall +1 (415) 723-6740
Distributed Computing Operations | Stanford, CA 94305-3090
Stanford University | [EMAIL PROTECTED]