Skip Menu |
 

Download (untitled) / with headers
text/plain 5.6KiB
From john@bok.physics.unlv.edu Fri Oct 11 19:51:25 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 TAA07245 for <bugs@RT-11.MIT.EDU>; Fri, 11 Oct 1996 19:51:24 -0400
Received: from hal.Physics.Unlv.Edu by MIT.EDU with SMTP
id AA26464; Fri, 11 Oct 96 19:51:22 EDT
Received: from localhost (bok.Physics.Unlv.Edu [131.216.64.77]) by hal.physics.unlv.edu (8.7.4/8.7.3) with ESMTP id QAA24623 for <krb5-bugs@athena.mit.edu>; Fri, 11 Oct 1996 16:51:14 -0700 (PDT)
Message-Id: <199610112351.QAA24623@hal.physics.unlv.edu>
Date: Fri, 11 Oct 1996 16:51:18 -0700
From: John Kilburg <john@bok.physics.unlv.edu>
To: krb5-bugs@MIT.EDU
Subject: k5b7 ftpd

Show quoted text
>Number: 108
>Category: krb5-appl
>Synopsis: k5b7 ftpd
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: epeisach
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Oct e 19:52:00 EDT 1996
>Last-Modified: Mon Oct e 08:09:55 EDT 1996
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->epeisach
Responsible-Changed-By: epeisach
Responsible-Changed-When: Mon Oct 14 07:50:07 1996
Responsible-Changed-Why:
Assigned to myself.

State-Changed-From-To: open-analyzed
State-Changed-By: epeisach
State-Changed-When: Mon Oct 14 07:51:54 1996
State-Changed-Why:
I have examined the problem and find that the relevant command is
"nlist". (which such programs as ncftp and linux ftp use). I have not
managed to obtain a core dump - but I have a dejagnu test that will
reliably fail. I believe the patch is correct, but will test it
further. I will probably add some other tests to the gssftp.exp file to
test other functionality.

State-Changed-From-To: analyzed-closed
State-Changed-By: epeisach
State-Changed-When: Mon Oct 14 08:08:53 1996
State-Changed-Why:

The patch was correct. The fix as sent is applied to the source tree. I
added the following dejagnu testing which exercised the failure.

Index: ChangeLog
===================================================================
RCS file: /mit/krb5/.cvsroot/src/tests/dejagnu/krb-standalone/ChangeLog,v
retrieving revision 1.30
diff -c -r1.30 ChangeLog
*** ChangeLog 1996/08/15 00:43:24 1.30
--- ChangeLog 1996/10/14 12:05:38
***************
*** 1,3 ****
--- 1,7 ----
+ Mon Oct 14 08:05:11 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * gssftp.exp: Test ls and nlist commands. [krb5-appl/108]
+
Wed Aug 14 20:27:36 1996 Tom Yu <tlyu@mit.edu>

* gssftp.exp: Do case insensitive match in case hostname doesn't
Index: gssftp.exp
===================================================================
RCS file: /mit/krb5/.cvsroot/src/tests/dejagnu/krb-standalone/gssftp.exp,v
retrieving revision 1.5
diff -c -r1.5 gssftp.exp
*** gssftp.exp 1996/08/15 00:42:51 1.5
--- gssftp.exp 1996/10/14 11:59:27
***************
*** 206,211 ****
--- 206,237 ----
pass $testname
}

+ set testname "ls"
+ send "ls $tmppwd/ftp-test\r"
+ expect -re "Opening ASCII mode data connection for .*ls."
+ expect -re ".* $tmppwd/ftp-test"
+ expect "ftp> " {
+ pass $testname
+ }
+
+ set testname "nlist"
+ send "nlist $tmppwd/ftp-test\r"
+ expect -re "Opening ASCII mode data connection for file list."
+ expect -re "$tmppwd/ftp-test"
+ expect -re ".* Transfer complete."
+ expect "ftp> " {
+ pass $testname
+ }
+
+ set testname "ls missing"
+ send "ls $tmppwd/ftp-testmiss\r"
+ expect -re "Opening ASCII mode data connection for .*ls."
+ expect -re "$tmppwd/ftp-testmiss not found"
+ expect "ftp> " {
+ pass $testname
+ }
+
+
set testname "get"
catch "exec rm -f tmpdir/copy"
send "get $tmppwd/ftp-test $tmppwd/copy\r"



Show quoted text
>Unformatted:
I think I found a problem in gssftp/ftpd...

I tried running ftpd on the alphas but it failed on things like 'ls'.
I tracked this down to a failure in secure_fprintf(). Well, at
least when I made it use STDARG like the other variable argument
functions ftpd started working better on the alphas. This is
running DEC UNIX 3.2C (cc). It also seems to work fine on SGI
IRIX 6.2 (cc) and SunOS 4.1.x (gcc). I'm having trouble
with ftpd on AIX 3.2.5...I guess seteuid works differently on AIX
or something.

-john


*** krb5-beta7/src/appl/gssftp/ftpd/ftpd.c Fri Oct 11 16:19:53 1996
--- krb5-beta7/src/appl/gssftp/ftpd/ftpd.c.old Fri Oct 11 16:19:28 1996
***************
*** 2078,2111 ****
* -1 on error
* -2 on security error
*/
- #ifdef STDARG
- secure_fprintf(FILE *stream, char *fmt, ...)
- #else
secure_fprintf(stream, fmt, p1, p2, p3, p4, p5)
FILE *stream;
char *fmt;
- #endif
{
! char s[FTP_BUFSIZ];
! int rval;
! #ifdef STDARG
! va_list ap;

! va_start(ap, fmt);
! if (level == PROT_C) rval = vfprintf(stream, fmt, ap);
! else {
! vsprintf(s, fmt, ap);
! rval = secure_write(fileno(stream), s, strlen(s));
! }
! va_end(ap);
!
! return(rval);
! #else
! if (level == PROT_C)
! return(fprintf(stream, fmt, p1, p2, p3, p4, p5));
! sprintf(s, fmt, p1, p2, p3, p4, p5);
! return(secure_write(fileno(stream), s, strlen(s)));
! #endif
}

send_file_list(whichfiles)
--- 2078,2093 ----
* -1 on error
* -2 on security error
*/
secure_fprintf(stream, fmt, p1, p2, p3, p4, p5)
FILE *stream;
char *fmt;
{
! char s[FTP_BUFSIZ];

! if (level == PROT_C)
! return(fprintf(stream, fmt, p1, p2, p3, p4, p5));
! sprintf(s, fmt, p1, p2, p3, p4, p5);
! return(secure_write(fileno(stream), s, strlen(s)));
}

send_file_list(whichfiles)