Skip Menu |
 

Download (untitled) / with headers
text/plain 5.4KiB
From hartmans@MIT.EDU Mon Sep 30 01:14:27 1996
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id BAA23752 for <bugs@RT-11.MIT.EDU>; Mon, 30 Sep 1996 01:14:26 -0400
Received: from STARKILLER.MIT.EDU by MIT.EDU with SMTP
id AA01067; Mon, 30 Sep 96 01:14:26 EDT
Received: by starkiller.MIT.EDU (5.x/4.7) id AA17257; Mon, 30 Sep 1996 01:14:26 -0400
Message-Id: <9609300514.AA17257@starkiller.MIT.EDU>
Date: Mon, 30 Sep 1996 01:14:26 -0400
From: hartmans@MIT.EDU
Reply-To: hartmans@MIT.EDU, "Jonathan I. Kamens" <jik@jik.tiac.net>
To: krb5-bugs@MIT.EDU
Subject: add forward command
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 45
>Category: telnet
>Synopsis: add forward command
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Mon Sep e 01:15:00 EDT 1996
>Last-Modified: Fri Nov e 20:50:40 EST 1996
>Originator: "Jonathan I. Kamens" <jik@jik.tiac.net>
>Organization:
mit
Show quoted text
>Release: beta-7
>Environment:

System: SunOS starkiller 5.4 Generic_101945-37 sun4m sparc


Show quoted text
>Description:
Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po10.MIT.EDU (5.61/4.7) id AA12215; Tue, 17 Sep 96 16:57:36 EDT
Received: from jik.tiac.net by MIT.EDU with SMTP
id AA16860; Tue, 17 Sep 96 16:54:54 EDT
Received: (from jik@localhost) by jik.tiac.net (8.8.Beta.1/8.8.Beta.1) id QAA24780; Tue, 17 Sep 1996 16:55:10 -0400
Message-Id: <199609172055.QAA24780@jik.tiac.net>
Lines: 146
Xref: tertius.mit.edu mail.kerberos:2017

The patch below adds a "forward" command to telnet, so that ticket
forwarding parameters can be modified after starting telnet and/or in
the .telnetrc file.

This patch was implemented by Marc Horowitz; I'm not claiming
authorship for it, just submitting it from OV's source tree so that it
can be integrated back into the MIT release :-).

Show quoted text
>How-To-Repeat:

Show quoted text
>Fix:

--- telnet/commands.c 1996/09/17 19:54:21 1.1
+++ telnet/commands.c 1996/09/17 19:54:38 1.2
@@ -2113,6 +2113,115 @@
}
#endif /* ENCRYPTION */

+#if defined(FORWARD)
+/*
+ * The FORWARD command.
+ */
+
+
+extern int forward_flags;
+
+struct forwlist {
+ char *name;
+ char *help;
+ int (*handler)();
+ int f_flags;
+};
+
+static int
+ forw_status P((void)),
+ forw_set P((int)),
+ forw_help P((void));
+
+struct forwlist ForwList[] = {
+ { "status", "Display current status of credential forwarding",
+ forw_status, 0 },
+ { "disable", "Disable credential forwarding",
+ forw_set, 0 },
+ { "enable", "Enable credential forwarding",
+ forw_set,
+ OPTS_FORWARD_CREDS },
+ { "forwardable", "Enable credential forwarding of forwardable credentials",
+ forw_set,
+ OPTS_FORWARD_CREDS |
+ OPTS_FORWARDABLE_CREDS },
+ { "help", 0, forw_help, 0 },
+ { "?", "Print help information", forw_help, 0 },
+ { 0 },
+};
+
+ static int
+forw_status()
+{
+ if (forward_flags & OPTS_FORWARD_CREDS) {
+ if (forward_flags & OPTS_FORWARDABLE_CREDS) {
+ printf("Credential forwarding of forwardable credentials enabled\n");
+ } else {
+ printf("Credential forwarding enabled\n");
+ }
+ } else {
+ printf("Credential forwarding disabled\n");
+ }
+ return(0);
+}
+
+forw_set(f_flags)
+ int f_flags;
+{
+ forward_flags = f_flags;
+ return(0);
+}
+
+ static int
+forw_help()
+{
+ struct forwlist *c;
+
+ for (c = ForwList; c->name; c++) {
+ if (c->help) {
+ if (*c->help)
+ printf("%-15s %s\n", c->name, c->help);
+ else
+ printf("\n");
+ }
+ }
+ return 0;
+}
+
+forw_cmd(argc, argv)
+ int argc;
+ char *argv[];
+{
+ struct forwlist *c;
+
+ if (argc < 2) {
+ fprintf(stderr,
+ "Need an argument to 'forward' command. 'forward ?' for help.\n");
+ return 0;
+ }
+
+ c = (struct forwlist *)
+ genget(argv[1], (char **) ForwList, sizeof(struct forwlist));
+ if (c == 0) {
+ fprintf(stderr, "'%s': unknown argument ('forw ?' for help).\n",
+ argv[1]);
+ return 0;
+ }
+ if (Ambiguous(c)) {
+ fprintf(stderr, "'%s': ambiguous argument ('forw ?' for help).\n",
+ argv[1]);
+ return 0;
+ }
+ if (argc != 2) {
+ fprintf(stderr,
+ "No arguments needed to 'forward %s' command. 'forward ?' for help.\n",
+ c->name);
+ return 0;
+ }
+ return((*c->handler)(c->f_flags));
+}
+#endif
+
#if defined(unix) && defined(TN3270)
static void
filestuff(fd)
@@ -2485,6 +2594,9 @@
#ifdef ENCRYPTION
encrypthelp[] = "turn on (off) encryption ('encrypt ?' for more)",
#endif /* ENCRYPTION */
+#ifdef FORWARD
+ forwardhelp[] = "turn on (off) credential forwarding ('forward ?' for more)",
+#endif
#if defined(unix)
zhelp[] = "suspend telnet",
#endif /* defined(unix) */
@@ -2516,6 +2628,9 @@
#ifdef ENCRYPTION
{ "encrypt", encrypthelp, encrypt_cmd, 0 },
#endif /* ENCRYPTION */
+#ifdef FORWARD
+ { "forward", forwardhelp, forw_cmd, 0 },
+#endif
#if defined(unix)
{ "z", zhelp, suspend, 0 },
#endif /* defined(unix) */


Show quoted text
>Audit-Trail:

State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Fri Nov 1 20:49:09 1996
State-Changed-Why:

Implemented. In addition to applying the patch, I moved some #defines
from kerberos5.c to auth.h in libtelnet so things would work. This
was reasonable because the #defines were already duplicated between
main.c and kerberos5.c, and more duplicate code sucks.
Show quoted text
>Unformatted:
Download (untitled) / with headers
text/plain 4.7KiB
From tlyu@MIT.EDU Thu Oct 10 12:55:52 1996
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id MAA28944 for <bugs@RT-11.MIT.EDU>; Thu, 10 Oct 1996 12:55:52 -0400
Received: from TESLA-COIL.MIT.EDU by MIT.EDU with SMTP
id AA24912; Thu, 10 Oct 96 12:55:51 EDT
Received: by tesla-coil.MIT.EDU (5.x/4.7) id AA12286; Thu, 10 Oct 1996 12:55:49 -0400
Message-Id: <199609172055.QAA24780@jik.tiac.net>
Date: Tue, 17 Sep 1996 16:55:10 -0400
From: "Jonathan I. Kamens" <jik@jik.tiac.net>
To: krb5-bugs@MIT.EDU, kerberos@MIT.EDU
Subject: krb5b7: Add a "forward" command to telnet

Show quoted text
>Number: 93
>Category: telnet
>Synopsis: krb5b7: Add a "forward" command to telnet
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Thu Oct e 12:56:01 EDT 1996
>Last-Modified: Fri Oct e 20:05:22 EDT 1996
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->hartmans
Responsible-Changed-By: tlyu
Responsible-Changed-When: Thu Oct 10 12:58:55 1996
Responsible-Changed-Why:
refiled

State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Fri Oct 11 20:03:31 1996
State-Changed-Why:
Dup of telnet/45.

Show quoted text
>Unformatted:
The patch below adds a "forward" command to telnet, so that ticket
forwarding parameters can be modified after starting telnet and/or in
the .telnetrc file.

This patch was implemented by Marc Horowitz; I'm not claiming
authorship for it, just submitting it from OV's source tree so that it
can be integrated back into the MIT release :-).

--- telnet/commands.c 1996/09/17 19:54:21 1.1
+++ telnet/commands.c 1996/09/17 19:54:38 1.2
@@ -2113,6 +2113,115 @@
}
#endif /* ENCRYPTION */

+#if defined(FORWARD)
+/*
+ * The FORWARD command.
+ */
+
+
+extern int forward_flags;
+
+struct forwlist {
+ char *name;
+ char *help;
+ int (*handler)();
+ int f_flags;
+};
+
+static int
+ forw_status P((void)),
+ forw_set P((int)),
+ forw_help P((void));
+
+struct forwlist ForwList[] = {
+ { "status", "Display current status of credential forwarding",
+ forw_status, 0 },
+ { "disable", "Disable credential forwarding",
+ forw_set, 0 },
+ { "enable", "Enable credential forwarding",
+ forw_set,
+ OPTS_FORWARD_CREDS },
+ { "forwardable", "Enable credential forwarding of forwardable credentials",
+ forw_set,
+ OPTS_FORWARD_CREDS |
+ OPTS_FORWARDABLE_CREDS },
+ { "help", 0, forw_help, 0 },
+ { "?", "Print help information", forw_help, 0 },
+ { 0 },
+};
+
+ static int
+forw_status()
+{
+ if (forward_flags & OPTS_FORWARD_CREDS) {
+ if (forward_flags & OPTS_FORWARDABLE_CREDS) {
+ printf("Credential forwarding of forwardable credentials enabled\n");
+ } else {
+ printf("Credential forwarding enabled\n");
+ }
+ } else {
+ printf("Credential forwarding disabled\n");
+ }
+ return(0);
+}
+
+forw_set(f_flags)
+ int f_flags;
+{
+ forward_flags = f_flags;
+ return(0);
+}
+
+ static int
+forw_help()
+{
+ struct forwlist *c;
+
+ for (c = ForwList; c->name; c++) {
+ if (c->help) {
+ if (*c->help)
+ printf("%-15s %s\n", c->name, c->help);
+ else
+ printf("\n");
+ }
+ }
+ return 0;
+}
+
+forw_cmd(argc, argv)
+ int argc;
+ char *argv[];
+{
+ struct forwlist *c;
+
+ if (argc < 2) {
+ fprintf(stderr,
+ "Need an argument to 'forward' command. 'forward ?' for help.\n");
+ return 0;
+ }
+
+ c = (struct forwlist *)
+ genget(argv[1], (char **) ForwList, sizeof(struct forwlist));
+ if (c == 0) {
+ fprintf(stderr, "'%s': unknown argument ('forw ?' for help).\n",
+ argv[1]);
+ return 0;
+ }
+ if (Ambiguous(c)) {
+ fprintf(stderr, "'%s': ambiguous argument ('forw ?' for help).\n",
+ argv[1]);
+ return 0;
+ }
+ if (argc != 2) {
+ fprintf(stderr,
+ "No arguments needed to 'forward %s' command. 'forward ?' for help.\n",
+ c->name);
+ return 0;
+ }
+ return((*c->handler)(c->f_flags));
+}
+#endif
+
#if defined(unix) && defined(TN3270)
static void
filestuff(fd)
@@ -2485,6 +2594,9 @@
#ifdef ENCRYPTION
encrypthelp[] = "turn on (off) encryption ('encrypt ?' for more)",
#endif /* ENCRYPTION */
+#ifdef FORWARD
+ forwardhelp[] = "turn on (off) credential forwarding ('forward ?' for more)",
+#endif
#if defined(unix)
zhelp[] = "suspend telnet",
#endif /* defined(unix) */
@@ -2516,6 +2628,9 @@
#ifdef ENCRYPTION
{ "encrypt", encrypthelp, encrypt_cmd, 0 },
#endif /* ENCRYPTION */
+#ifdef FORWARD
+ { "forward", forwardhelp, forw_cmd, 0 },
+#endif
#if defined(unix)
{ "z", zhelp, suspend, 0 },
#endif /* defined(unix) */
Download (untitled) / with headers
text/plain 2.5KiB
From tlyu@MIT.EDU Thu Oct 10 12:56:05 1996
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id MAA28959 for <bugs@RT-11.MIT.EDU>; Thu, 10 Oct 1996 12:56:05 -0400
Received: from TESLA-COIL.MIT.EDU by MIT.EDU with SMTP
id AA24960; Thu, 10 Oct 96 12:56:04 EDT
Received: by tesla-coil.MIT.EDU (5.x/4.7) id AA12289; Thu, 10 Oct 1996 12:56:01 -0400
Message-Id: <199609172104.RAA25221@jik.tiac.net>
Date: Tue, 17 Sep 1996 17:04:37 -0400
From: "Jonathan I. Kamens" <jik@jik.tiac.net>
To: krb5-bugs@MIT.EDU, kerberos@MIT.EDU
Subject: krb5b7: Add a "forward" command to telnet (more changes)

Show quoted text
>Number: 94
>Category: telnet
>Synopsis: krb5b7: Add a "forward" command to telnet (more changes)
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: change-request
>Submitter-Id: unknown
>Arrival-Date: Thu Oct e 12:57:00 EDT 1996
>Last-Modified: Fri Oct e 20:11:18 EDT 1996
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->hartmans
Responsible-Changed-By: tlyu
Responsible-Changed-When: Thu Oct 10 13:03:38 1996
Responsible-Changed-Why:
refiled

State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Fri Oct 11 20:10:54 1996
State-Changed-Why:
Dup of telnet/45


Show quoted text
>Unformatted:
I forgot a couple of the patches in my last message. Here they are:

--- telnet/externs.h 1996/09/17 19:59:32 1.1
+++ telnet/externs.h 1996/09/17 20:59:35 1.2.1.1
@@ -248,6 +248,15 @@
extern void
SetNetTrace P((char *)); /* Function to change where debugging goes */

+#ifdef FORWARD
+/* 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. */
+#define OPTS_FORWARD_CREDS 0x00000002
+#define OPTS_FORWARDABLE_CREDS 0x00000001
+
+
+#endif
+
extern jmp_buf
peerdied,
toplevel; /* For error conditions. */
--- telnet/main.c 1996/09/17 20:01:49 1.1
+++ telnet/main.c 1996/09/17 21:02:40 1.2.1.1
@@ -45,15 +45,6 @@
#include "externs.h"
#include "defines.h"

-/* 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. */
-#define OPTS_FORWARD_CREDS 0x00000002
-#define OPTS_FORWARDABLE_CREDS 0x00000001
-
-#if 0
-#define FORWARD
-#endif
-
/*
* Initialize variables.
*/