[106] in Athena_Backup_System
authenticated ONC RPC ...
daemon@ATHENA.MIT.EDU (Diane Delgado)
Tue May 23 11:51:54 1995
To: athena-backup@MIT.EDU
Date: Tue, 23 May 1995 11:51:32 EDT
From: Diane Delgado <delgado@MIT.EDU>
The tools and rpc libraries in the athena-backup locker in
the "tirpc" directory now contain the kerberos authentication
and data integrity checking version of ONC RPC. This
version currently runs only on Solaris (other platforms to follow
later. Please try to use them if you can. I've tested them and they appear to
be working. I have left debug enabled in the rpc library
just in case, so you may notice some strange output.
library:/mit/athena-backup/tools/tirpc/usr/lib/librpc.a
tools:/mit/athena-backup/tools/usr/bin/rpcgen
Here is how to use the authentication/integrity from
the client side (from src/ui/abs_client.c):
cl = clnt_create(master,ABSMASTER, ABSVERSION, "tcp");
if (cl == NULL){
clnt_pcreateerror(master);
return(TCL_ERROR);
}
/* Bump up the call timeout value to 2 minutes
* the default value is not large enough
*/
cv.tv_sec = 120;
cv.tv_usec = 0;
clnt_control(cl, CLSET_TIMEOUT, (char *) &cv);
/* now setup authenticated connection */
if (authkerb_create("rcmd", master, (char *) NULL,
AUTH_KERB_INTEGRITY, &code, &auth)){
fprintf(stderr,"authkerb_create fails code = %d\n", code);
return(TCL_ERROR);
}
cl->cl_auth = auth;
return(SUCCESS);
On the server side (from src/master_main.c):
if (!svc_create(abs_slaveint_1, ABS_SLAVEINT, ABS_SLVVERS, "netpath")) {_msgout("unable to create (ABS_SLAVEINT, ABS_SLVVERS) for netpath.");
exit(1);
}
if (svc_kerb_reg(NULL, "rcmd","green-acres",
(char *) NULL)){
fprintf(stderr,"svc_kerb_reg failed !\n");
exit(1);
}
svc_run();
From there on, the rpc will take care of everything for you.
Note that you will need to run with authentication/integrity
turned on if you are going to really communicate with the
Master.