* Copyright (c) 1989 The Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)krcmd.c 1.5 (Berkeley) 6/1/90";
* $Source: /mit/kerberos/ucb/mit/kcmd/RCS/krcmd.c,v $
* $Header: /mit/kerberos/ucb/mit/kcmd/RCS/krcmd.c,v 5.1
* 89/07/25 15:38:44 kfall Exp Locker: kfall $
* static char *rcsid_kcmd_c =
* "$Header: /mit/kerberos/ucb/mit/kcmd/RCS/krcmd.c,v 5.1 89/07/25 15:38:44
* kfall Exp Locker: kfall $";
#include <kerberosIV/des.h>
#include <kerberosIV/krb.h>
#define SERVICE_NAME "rcmd"
* krcmd: simplified version of Athena's "kcmd"
* returns a socket attached to the destination, -1 or krb error on error
* if fd2p is non-NULL, another socket is filled in for it
krcmd(ahost
, rport
, remuser
, cmd
, fd2p
, realm
)
NULL
, /* locuser not used */
(CREDENTIALS
*) NULL
, /* credentials not used */
(bit_64
*) NULL
, /* key schedule not used */
(MSG_DAT
*) NULL
, /* MSG_DAT not used */
(struct sockaddr_in
*) NULL
, /* local addr not used */
(struct sockaddr_in
*) NULL
, /* foreign addr not used */
if (err
> KSUCCESS
&& err
< MAX_KRB_ERRORS
) {
fprintf(stderr
, "krcmd: %s\n", krb_err_txt
[err
]);
krcmd_mutual(ahost
, rport
, remuser
, cmd
, fd2p
, realm
, cred
, sched
)
struct sockaddr_in laddr
, faddr
;
long authopts
= KOPT_DO_MUTUAL
;
NULL
, /* locuser not used */
&msg_dat
, /* filled in */
if (err
> KSUCCESS
&& err
< MAX_KRB_ERRORS
) {
fprintf(stderr
, "krcmd_mutual: %s\n", krb_err_txt
[err
]);