summaryrefslogtreecommitdiffstats
path: root/bin/rcp
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1998-10-09 06:31:45 +0000
committermarkm <markm@FreeBSD.org>1998-10-09 06:31:45 +0000
commit79f5d6d3ccabbef03bb521b83cf0c5633862e5e6 (patch)
tree1b4541058ff4216be6ae3726d3f002a5205758cd /bin/rcp
parent927ef14a2ff9d6f8955bac66c59718ecd5cce17b (diff)
downloadFreeBSD-src-79f5d6d3ccabbef03bb521b83cf0c5633862e5e6.zip
FreeBSD-src-79f5d6d3ccabbef03bb521b83cf0c5633862e5e6.tar.gz
Add JKH's auth.conf-file parser to turn Kerberos on/off in userland.
Diffstat (limited to 'bin/rcp')
-rw-r--r--bin/rcp/Makefile6
-rw-r--r--bin/rcp/rcp.17
-rw-r--r--bin/rcp/rcp.c9
3 files changed, 17 insertions, 5 deletions
diff --git a/bin/rcp/Makefile b/bin/rcp/Makefile
index f604da7..e8db7dc 100644
--- a/bin/rcp/Makefile
+++ b/bin/rcp/Makefile
@@ -1,5 +1,5 @@
# @(#)Makefile 8.1 (Berkeley) 7/19/93
-# $Id$
+# $Id: Makefile,v 1.11 1998/08/06 21:35:04 markm Exp $
PROG= rcp
SRCS= rcp.c util.c
@@ -7,13 +7,13 @@ CFLAGS+=-Wall
.if exists(${DESTDIR}${LIBDIR}/libkrb.a) && defined(MAKE_KERBEROS4)
SRCS+= krcmd.c kcmd.c rcmd_util.c encrypt.c
-DPADD= ${LIBKRB} ${LIBDES}
+DPADD= ${LIBUTIL} ${LIBKRB} ${LIBDES}
CFLAGS+=-DKERBEROS -DCRYPT -DHAVE_CONFIG_H \
-I${.CURDIR}/../../kerberosIV/include \
-I${.CURDIR}/../../crypto/kerberosIV/include \
-I${.CURDIR}/../../crypto/kerberosIV/lib/roken \
-I${.CURDIR}/../../crypto/kerberosIV/appl/bsd
-LDADD= -lkrb -ldes
+LDADD= -lutil -lkrb -ldes
DISTRIBUTION= krb
.PATH: ${.CURDIR}/../../crypto/kerberosIV/appl/bsd
.endif
diff --git a/bin/rcp/rcp.1 b/bin/rcp/rcp.1
index 81a7a04..b290c76 100644
--- a/bin/rcp/rcp.1
+++ b/bin/rcp/rcp.1
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)rcp.1 8.1 (Berkeley) 5/31/93
-.\" $Id: rcp.1,v 1.5 1997/02/22 14:05:21 peter Exp $
+.\" $Id: rcp.1,v 1.6 1998/05/18 06:36:02 charnier Exp $
.\"
.Dd May 31, 1993
.Dt RCP 1
@@ -120,6 +120,11 @@ and requires the same authorization.
.Nm Rcp
handles third party copies, where neither source nor target files
are on the current machine.
+.Sh FILES
+.Bl -tag -width /etc/auth.conf -compact
+.It Pa /etc/auth.conf
+configure authentication services
+.El
.Sh SEE ALSO
.Xr cp 1 ,
.Xr ftp 1 ,
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index 9af02d8..007741b 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -42,7 +42,7 @@ static char const copyright[] =
static char sccsid[] = "@(#)rcp.c 8.2 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: rcp.c,v 1.19 1998/05/18 06:36:03 charnier Exp $";
+ "$Id: rcp.c,v 1.20 1998/08/02 14:25:24 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -66,6 +66,7 @@ static const char rcsid[] =
#include <string.h>
#include <string.h>
#include <unistd.h>
+#include <libutil.h>
#include "pathnames.h"
#include "extern.h"
@@ -123,6 +124,9 @@ main(argc, argv)
int ch, fflag, tflag;
char *targ, *shell;
int i;
+#ifdef KERBEROS
+ char *k;
+#endif
/*
* Prepare for execing ourselves.
@@ -188,6 +192,9 @@ main(argc, argv)
argv += optind;
#ifdef KERBEROS
+ k = auth_getval("auth_list");
+ if (k && !strstr(k, "kerberos"))
+ use_kerberos = 0;
if (use_kerberos) {
#ifdef CRYPT
shell = doencrypt ? "ekshell" : "kshell";
OpenPOWER on IntegriCloud