version 1.1, 1995/10/18 08:46:14 |
version 1.2, 1996/03/27 19:33:03 |
|
|
|
/* $OpenBSD$ */ |
|
/* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */ |
|
|
/* |
/* |
* Copyright (c) 1988, 1990 Regents of the University of California. |
* Copyright (c) 1988, 1990, 1993 |
* All rights reserved. |
* The Regents of the University of California. All rights reserved. |
* |
* |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* modification, are permitted provided that the following conditions |
|
|
*/ |
*/ |
|
|
#ifndef lint |
#ifndef lint |
char copyright[] = |
static char copyright[] = |
"@(#) Copyright (c) 1988, 1990 Regents of the University of California.\n\ |
"@(#) Copyright (c) 1988, 1990, 1993\n\ |
All rights reserved.\n"; |
The Regents of the University of California. All rights reserved.\n"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#ifndef lint |
#ifndef lint |
/* from: static char sccsid[] = "@(#)main.c 5.5 (Berkeley) 12/18/92"; */ |
#if 0 |
static char *rcsid = "$Id$"; |
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95"; |
|
static char rcsid[] = "$NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $"; |
|
#else |
|
static char rcsid[] = "$OpenBSD$"; |
|
#endif |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
|
|
/* These values need to be the same as defined in libtelnet/kerberos5.c */ |
/* These values need to be the same as defined in libtelnet/kerberos5.c */ |
/* Either define them in both places, or put in some common header file. */ |
/* Either define them in both places, or put in some common header file. */ |
#define OPTS_FORWARD_CREDS 0x00000002 |
#define OPTS_FORWARD_CREDS 0x00000002 |
#define OPTS_FORWARDABLE_CREDS 0x00000001 |
#define OPTS_FORWARDABLE_CREDS 0x00000001 |
|
|
#if 0 |
#if 0 |
#define FORWARD |
#define FORWARD |
|
|
init_terminal(); |
init_terminal(); |
|
|
init_network(); |
init_network(); |
|
|
init_telnet(); |
init_telnet(); |
|
|
init_sys(); |
init_sys(); |
|
|
fprintf(stderr, "Usage: %s %s%s%s%s\n", |
fprintf(stderr, "Usage: %s %s%s%s%s\n", |
prompt, |
prompt, |
#ifdef AUTHENTICATION |
#ifdef AUTHENTICATION |
" [-8] [-E] [-K] [-L] [-X atype] [-a] [-d] [-e char] [-k realm]", |
"[-8] [-E] [-K] [-L] [-S tos] [-X atype] [-a] [-c] [-d] [-e char]", |
"\n\t[-l user] [-f/-F] [-n tracefile] ", |
"\n\t[-k realm] [-l user] [-f/-F] [-n tracefile] ", |
#else |
#else |
" [-8] [-E] [-L] [-a] [-d] [-e char] [-l user] [-n tracefile]", |
"[-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]", |
"\n\t", |
"\n\t[-n tracefile]", |
#endif |
#endif |
#if defined(TN3270) && defined(unix) |
#if defined(TN3270) && defined(unix) |
# ifdef AUTHENTICATION |
# ifdef AUTHENTICATION |
"[-noasynch] [-noasynctty] [-noasyncnet]\n\t[-r] [-t transcom] ", |
"[-noasynch] [-noasynctty]\n\t[-noasyncnet] [-r] [-t transcom] ", |
# else |
# else |
"[-noasynch] [-noasynctty] [-noasyncnet] [-r] [-t transcom]\n\t", |
"[-noasynch] [-noasynctty] [-noasyncnet] [-r]\n\t[-t transcom]", |
# endif |
# endif |
#else |
#else |
"[-r] ", |
"[-r] ", |
|
|
case 'f': |
case 'f': |
#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD) |
#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD) |
if (forward_flags & OPTS_FORWARD_CREDS) { |
if (forward_flags & OPTS_FORWARD_CREDS) { |
fprintf(stderr, |
fprintf(stderr, |
"%s: Only one of -f and -F allowed.\n", |
"%s: Only one of -f and -F allowed.\n", |
prompt); |
prompt); |
usage(); |
usage(); |
|
|
forward_flags |= OPTS_FORWARD_CREDS; |
forward_flags |= OPTS_FORWARD_CREDS; |
#else |
#else |
fprintf(stderr, |
fprintf(stderr, |
"%s: Warning: -f ignored, no Kerberos V5 support.\n", |
"%s: Warning: -f ignored, no Kerberos V5 support.\n", |
prompt); |
prompt); |
#endif |
#endif |
break; |
break; |
case 'F': |
case 'F': |
#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD) |
#if defined(AUTHENTICATION) && defined(KRB5) && defined(FORWARD) |
if (forward_flags & OPTS_FORWARD_CREDS) { |
if (forward_flags & OPTS_FORWARD_CREDS) { |
fprintf(stderr, |
fprintf(stderr, |
"%s: Only one of -f and -F allowed.\n", |
"%s: Only one of -f and -F allowed.\n", |
prompt); |
prompt); |
usage(); |
usage(); |
|
|
forward_flags |= OPTS_FORWARDABLE_CREDS; |
forward_flags |= OPTS_FORWARDABLE_CREDS; |
#else |
#else |
fprintf(stderr, |
fprintf(stderr, |
"%s: Warning: -F ignored, no Kerberos V5 support.\n", |
"%s: Warning: -F ignored, no Kerberos V5 support.\n", |
prompt); |
prompt); |
#endif |
#endif |
break; |
break; |