summaryrefslogtreecommitdiffstats
path: root/sbin/restore/main.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1997-04-29 17:46:27 +0000
committerwollman <wollman@FreeBSD.org>1997-04-29 17:46:27 +0000
commitd226ef144b03696dab14ff5d54530d5632e71d16 (patch)
treeebc627df80aa6100a7cf763ecac36982be183b46 /sbin/restore/main.c
parent939a1f6d87a9bbf63fbf92964aa5a4d35038aaac (diff)
downloadFreeBSD-src-d226ef144b03696dab14ff5d54530d5632e71d16.zip
FreeBSD-src-d226ef144b03696dab14ff5d54530d5632e71d16.tar.gz
Implement Kerberized rcmd for rdump/rrestore. This is lacking the
options one would normally expect to set the realm, enable encryption, and whatnot, but this actually is able to contact the remote server, so at least it's a start. (As a bonus, the stripped static binary is unquestionably exportable.)
Diffstat (limited to 'sbin/restore/main.c')
-rw-r--r--sbin/restore/main.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/sbin/restore/main.c b/sbin/restore/main.c
index dbb895b..6cb87d8 100644
--- a/sbin/restore/main.c
+++ b/sbin/restore/main.c
@@ -62,6 +62,7 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/4/95";
int bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
int hflag = 1, mflag = 1, Nflag = 0;
+int dokerberos = 0;
char command = '\0';
long dumpnum = 1;
long volno = 0;
@@ -96,7 +97,12 @@ main(argc, argv)
if ((inputdev = getenv("TAPE")) == NULL)
inputdev = _PATH_DEFTAPE;
obsolete(&argc, &argv);
- while ((ch = getopt(argc, argv, "b:cdf:himNRrs:tvxy")) != -1)
+#ifdef KERBEROS
+#define optlist "b:cdf:hikmNRrs:tvxy"
+#else
+#define optlist "b:cdf:himNRrs:tvxy"
+#endif
+ while ((ch = getopt(argc, argv, optlist)) != -1)
switch(ch) {
case 'b':
/* Change default tape blocksize. */
@@ -119,6 +125,11 @@ main(argc, argv)
case 'h':
hflag = 0;
break;
+#ifdef KERBEROS
+ case 'k':
+ dokerberos = 1;
+ break;
+#endif
case 'i':
case 'R':
case 'r':
@@ -278,11 +289,11 @@ static void
usage()
{
(void)fprintf(stderr, "usage:\t%s\n\t%s\n\t%s\n\t%s\n\t%s\n",
- "restore -i [-chmvy] [-b blocksize] [-f file] [-s fileno]",
- "restore -r [-cvy] [-b blocksize] [-f file] [-s fileno]",
- "restore -R [-cvy] [-b blocksize] [-f file] [-s fileno]",
- "restore -x [-chmvy] [-b blocksize] [-f file] [-s fileno] [file ...]",
- "restore -t [-chvy] [-b blocksize] [-f file] [-s fileno] [file ...]");
+ "restore -i [-chkmvy] [-b blocksize] [-f file] [-s fileno]",
+ "restore -r [-ckvy] [-b blocksize] [-f file] [-s fileno]",
+ "restore -R [-ckvy] [-b blocksize] [-f file] [-s fileno]",
+ "restore -x [-chkmvy] [-b blocksize] [-f file] [-s fileno] [file ...]",
+ "restore -t [-chkvy] [-b blocksize] [-f file] [-s fileno] [file ...]");
done(1);
}
OpenPOWER on IntegriCloud