[krbdev.mit.edu #5940] when the 'case' option is enabled, mget can miscompute the destination filename
The RT System itself via RT
rt-comment at krbdev.mit.edu
Thu Apr 17 22:12:02 EDT 2008
>From krb5-bugs-incoming-bounces at PCH.MIT.EDU Thu Apr 17 22:11:57 2008
Received: from pch.mit.edu (PCH.MIT.EDU [18.7.21.90]) by krbdev.mit.edu (8.12.9) with ESMTP
id m3I2BuHW029393; Thu, 17 Apr 2008 22:11:57 -0400 (EDT)
Received: from pch.mit.edu (pch.mit.edu [127.0.0.1])
by pch.mit.edu (8.13.6/8.12.8) with ESMTP id m3I2Bpxg024194;
Thu, 17 Apr 2008 22:11:51 -0400
Received: from pacific-carrier-annex.mit.edu (PACIFIC-CARRIER-ANNEX.MIT.EDU
[18.7.21.83])
by pch.mit.edu (8.13.6/8.12.8) with ESMTP id m3GIhMkA008723
for <krb5-bugs-incoming at PCH.mit.edu>; Wed, 16 Apr 2008 14:43:22 -0400
Received: from mit.edu (W92-130-BARRACUDA-1.MIT.EDU [18.7.21.220])
by pacific-carrier-annex.mit.edu (8.13.6/8.9.2) with ESMTP id
m3GIhBS6000868
for <krb5-bugs at mit.edu>; Wed, 16 Apr 2008 14:43:12 -0400 (EDT)
Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31])
by mit.edu (Spam Firewall) with ESMTP id EC13986F0FB
for <krb5-bugs at mit.edu>; Wed, 16 Apr 2008 14:42:50 -0400 (EDT)
Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com
[172.16.52.254])
by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m3GIgonn011902
for <krb5-bugs at mit.edu>; Wed, 16 Apr 2008 14:42:50 -0400
Received: from blade.boston.redhat.com (blade.boston.redhat.com [172.16.80.50])
by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m3GIgn5x026591
for <krb5-bugs at mit.edu>; Wed, 16 Apr 2008 14:42:49 -0400
Received: from blade.boston.redhat.com (localhost.localdomain [127.0.0.1])
by blade.boston.redhat.com (8.14.2/8.14.2) with ESMTP id m3GIgn8G031314
for <krb5-bugs at mit.edu>; Wed, 16 Apr 2008 14:42:49 -0400
Received: (from nalin at localhost)
by blade.boston.redhat.com (8.14.2/8.14.2/Submit) id m3GIgn2s031312;
Wed, 16 Apr 2008 14:42:49 -0400
Date: Wed, 16 Apr 2008 14:42:49 -0400
Message-Id: <200804161842.m3GIgn2s031312 at blade.boston.redhat.com>
To: krb5-bugs at mit.edu
Subject: ftp client doesn't always get filenames right during mget with 'case'
enabled
From: nalin at redhat.com
X-send-pr-version: 3.99
X-Scanned-By: MIMEDefang 2.42
X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254
X-Spam-Score: 0.67
X-Spam-Flag: NO
X-Mailman-Approved-At: Thu, 17 Apr 2008 22:11:50 -0400
X-BeenThere: krb5-bugs-incoming at mailman.mit.edu
X-Mailman-Version: 2.1.6
Precedence: list
Reply-To: nalin at redhat.com
Sender: krb5-bugs-incoming-bounces at PCH.MIT.EDU
Errors-To: krb5-bugs-incoming-bounces at PCH.MIT.EDU
>Submitter-Id: net
>Originator: Nalin Dahyabhai
>Organization: Red Hat
>Confidential: no
>Synopsis: when the 'case' option is enabled, mget can miscompute the destination filename
>Severity: non-critical
>Priority: medium
>Category: krb5-appl
>Class: sw-bug
>Release: 1.6.3
>Environment:
System: Linux blade.boston.redhat.com 2.6.23-6.fc8 #1 SMP Thu Oct 11 13:36:39 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64
>Description:
While processing an "mget" command with case mapping enabled,
the client can attempt to store a file's data in the wrong
local file.
In cases where the client determines that the local file's name
doesn't need to be changed from the remote name, the client has
been setting the target filename pointer to the buffer in which
it would store the lower-cased version of the name, even if it
ended up not generating a lower-cased version of the name,
causing the incoming data to be stored in whichever file whose
name was last generated. (This is in our bug tracking system at
http://bugzilla.redhat.com/442713.)
>How-To-Repeat:
Create files in a directory with these names:
Test1.out1
TEST2.OUT2
tesT3.Out3
TEST4.OUT4
Connect with a client, turning prompting off, case mapping on,
and use an mget command with a glob to retrieve all of the
files ("mget *"). Absent any specific locale information, the
order of files sent to the client will be this:
TEST2.OUT2
TEST4.OUT4
Test1.out1
tesT3.Out3
The client will store the contents of the first file in a local
file named "test2.out2", and the contents of the last three
files in a local file named "test4.out4".
>Fix:
This patch differs a bit from the one attached to the bug report
mentioned above, but it has a similar effect.
diff -up src/appl/gssftp/ftp/cmds.c src/appl/gssftp/ftp/cmds.c
--- src/appl/gssftp/ftp/cmds.c 2008-04-16 10:36:13.000000000 -0400
+++ src/appl/gssftp/ftp/cmds.c 2008-04-16 10:36:16.000000000 -0400
@@ -1013,8 +1013,10 @@ void mget(argc, argv)
tp++;
tp2++;
}
+ tp = tmpbuf;
+ } else {
+ tp = cp;
}
- tp = tmpbuf;
}
if (ntflag) {
tp = dotrans(tp);
More information about the krb5-bugs
mailing list