From 07ec110e1ce8f63089e8107ef4536d07722ae6eb Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 25 Apr 1998 06:08:01 +0000 Subject: [PATCH] Fix -n so that it doesn't disable authentication but does disable login. [38] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10543 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftp/ChangeLog | 15 +++++++++++++++ src/appl/gssftp/ftp/cmds.c | 6 ++++-- src/appl/gssftp/ftp/ftp_var.h | 1 + src/appl/gssftp/ftp/main.c | 7 +++++++ 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index f56f5985e..08c18dc5b 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,7 @@ +Sat Apr 25 01:53:04 1998 Sam Hartman + + * cmds.c (setpeer): Fix so that autologin is respected again + 1998-04-21 Ken Raeburn * glob.c (ftpglob): Always allocate new storage, even if no magic @@ -39,6 +43,7 @@ Thu Jan 29 19:39:27 1998 Dan Winship * cmds.c (setpeer): implement -x + Thu Dec 11 23:26:58 1997 Tom Yu * ftp.c: @@ -46,6 +51,16 @@ Thu Dec 11 23:26:58 1997 Tom Yu included; this works around an Ultrix bug where those headers aren't protected against multiple inclusion. +Sat Dec 6 18:17:10 1997 Sam Hartman + + * main.c (main): Add -u for unauthenticated + + * ftp_var.h: Add autoauth + + * cmds.c (setpeer): Automatic authentication should not be + dependent on autologin; use -u instead. + + Thu Oct 16 01:20:30 1997 Tom Yu * main.c: Change KERBEROS to KRB5_KRB4_COMPAT where appropriate. diff --git a/src/appl/gssftp/ftp/cmds.c b/src/appl/gssftp/ftp/cmds.c index 0cc82755f..81e6fee1c 100644 --- a/src/appl/gssftp/ftp/cmds.c +++ b/src/appl/gssftp/ftp/cmds.c @@ -167,7 +167,7 @@ setpeer(argc, argv) mode = MODE_S; stru = STRU_F; (void) strcpy(bytename, "8"), bytesize = 8; - if (autologin) { + if (autoauth) { if (do_auth() && autoencrypt) { setpbsz(1<<20); if (command("PROT P") == COMPLETE) @@ -175,7 +175,9 @@ setpeer(argc, argv) else fprintf(stderr, "ftp: couldn't enable encryption\n"); } - (void) login(argv[1]); + + if(autologin) + (void) login(argv[1]); } #ifndef unix diff --git a/src/appl/gssftp/ftp/ftp_var.h b/src/appl/gssftp/ftp/ftp_var.h index aa25b0756..dcc19f206 100644 --- a/src/appl/gssftp/ftp/ftp_var.h +++ b/src/appl/gssftp/ftp/ftp_var.h @@ -54,6 +54,7 @@ extern int interactive; /* interactively prompt on m* cmds */ extern int debug; /* debugging level */ extern int bell; /* ring bell on cmd completion */ extern int doglob; /* glob local file names */ +extern int autoauth; /* Do authentication on connect */ extern int autologin; /* establish user account on connection */ extern int autoencrypt; /* negotiate encryption on connection */ extern int forward; /* forward credentials */ diff --git a/src/appl/gssftp/ftp/main.c b/src/appl/gssftp/ftp/main.c index 7c5be075a..1eac2ff2a 100644 --- a/src/appl/gssftp/ftp/main.c +++ b/src/appl/gssftp/ftp/main.c @@ -100,6 +100,7 @@ main(argc, argv) #endif /* KRB5_KRB4_COMPAT */ doglob = 1; interactive = 1; + autoauth = 1; autologin = 1; forward = 0; autoencrypt = 0; @@ -146,6 +147,11 @@ main(argc, argv) doglob = 0; break; + + case 'u': + autoauth = 0; + break; + case 'f': forward = 1; break; @@ -154,6 +160,7 @@ main(argc, argv) autoencrypt = 1; break; + default: fprintf(stdout, "ftp: %c: unknown option\n", *cp); -- 2.26.2