Bug 697 - ending slash is not used
Summary: ending slash is not used
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sftp-server (show other bugs)
Version: 3.7.1p1
Hardware: PPC AIX
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-22 17:52 AEST by Ramses Smeyers
Modified: 2021-10-14 01:40 AEDT (History)
2 users (show)

See Also:


Attachments
Sync muckup fix (611 bytes, patch)
2003-10-01 09:42 AEST, Ben Lindstrom
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ramses Smeyers 2003-09-22 17:52:33 AEST
C:\temp>psftp  <server>
login as: <user>
Using username "<user>".
<user>@<server>'s password:
Remote working directory is /var/spool/rmon-server/guy.leroy
psftp> get 2003*
/var/spool/rmon-server/guy.leroy2003*: no such file or directory
psftp> cd /var/spool/rmon-server/guy.leroy
Remote directory is now /var/spool/rmon-server/guy.leroy
psftp> get 2003*
/var/spool/rmon-server/guy.leroy2003*: no such file or directory
psftp> pwd
Remote directory is /var/spool/rmon-server/guy.leroy
psftp>

so he doesn't do /var/spool/rmon-server/guy.leroy/2003*
Comment 1 Ben Lindstrom 2003-09-23 15:45:40 AEST
This sounds like a psftp.exe issue.   It has no bearing on OpenSSH.  Please 
contact them.

Nor can I reproduce this on any platform I run sftp-server with the latest 
release of psftp.exe
Comment 2 Ramses Smeyers 2003-09-23 17:59:28 AEST
we use the latest psftp.exe, from the site, and it worked perfectly in the past 
with an openssh 3.6.1p2, now, with upgrading to 3.7.1p1, we introduced this 
problem....
Comment 3 Jacob Nevins 2003-09-24 19:19:43 AEST
Note that wildcards wouldn't have worked the way you expect in PSFTP anyway 
(because we haven't implemented them yet).

I'm looking at PSFTP to see if the bug could be there.
Comment 4 Ramses Smeyers 2003-09-24 19:24:43 AEST
more test samples (already with 3.7.1p2)

-rw-r--r--    1 rmon     rmon       329557 Sep 23 16:20 20030921-lux01-WTS7
-rw-r--r--    1 rmon     rmon       358828 Sep 23 16:32 20030921-lux01-WTS8
drwxrwx---    2 root     system        512 Jun 19 16:33 lost+found
psftp> ls 20030921-lux01-WTS8
Listing directory /var/spool/rmon-server/guy.leroy20030921-lux01-WTS8
Unable to open 20030921-lux01-WTS8: no such file or directory
psftp> get 20030921-lux01-WTS8
/var/spool/rmon-server/guy.leroy20030921-lux01-WTS8: no such file or directory
psftp> get /var/spool/rmon-server/guy.leroy/20030921-lux01-WTS8
/var/spool/rmon-server/guy.leroy20030921-lux01-WTS8: no such file or directory
psftp> get /var/spool/rmon-server/guy.leroy//20030921-lux01-WTS8
/var/spool/rmon-server/guy.leroy20030921-lux01-WTS8: no such file or directory
psftp> get /var/spool/rmon-server/guy.leroy\//20030921-lux01-WTS8
/var/spool/rmon-server/guy.leroy\/: no such file or directory
psftp>
Comment 5 Jacob Nevins 2003-10-01 07:08:03 AEST
We've had one other report of these symptoms, with clients PSFTP 0.53b and
2003-09-22 and server also OpenSSH 3.7.1p1 on AIX 4.3.3.11.

Is it possible that sftp-server's response to SSH_FXP_REALPATH changed between
whichever OpenSSH release worked (don't know what that is) and 3.7.1p1?
(Possibly only on AIX.)
I can't see how else to get these symptoms.
Comment 6 Markus Friedl 2003-10-01 07:28:37 AEST
i don't see changes in cvs annotate.

1.28         (itojun   23-Jun-01): static void
1.1          (markus   31-Aug-00): process_realpath(void)
1.1          (markus   31-Aug-00): {
1.1          (markus   31-Aug-00):      char resolvedname[MAXPATHLEN];
1.1          (markus   31-Aug-00):      u_int32_t id;
1.1          (markus   31-Aug-00):      char *path;
1.1          (markus   31-Aug-00): 
1.1          (markus   31-Aug-00):      id = get_int();
1.1          (markus   31-Aug-00):      path = get_string(NULL);
1.7          (markus   09-Dec-00):      if (path[0] == '\0') {
1.7          (markus   09-Dec-00):              xfree(path);
1.7          (markus   09-Dec-00):              path = xstrdup(".");
1.7          (markus   09-Dec-00):      }
1.36         (deraadt  23-Jun-02):      TRACE("realpath id %u path %s", id, 
path);
1.1          (markus   31-Aug-00):      if (realpath(path, resolvedname) == 
NULL) {
1.1          (markus   31-Aug-00):              send_status(id, 
errno_to_portable(errno));
1.1          (markus   31-Aug-00):      } else {
1.1          (markus   31-Aug-00):              Stat s;
1.1          (markus   31-Aug-00):              attrib_clear(&s.attrib);
1.1          (markus   31-Aug-00):              s.name = s.long_name = 
resolvedname;
1.1          (markus   31-Aug-00):              send_names(id, 1, &s);
1.1          (markus   31-Aug-00):      }
1.1          (markus   31-Aug-00):      xfree(path);
1.1          (markus   31-Aug-00): }
1.1          (markus   31-Aug-00): 
Comment 7 Jacob Nevins 2003-10-01 09:12:30 AEST
There do however appear to have been noticeable changes in
openbsd-compat/realpath.c between 3.6*p* and 3.7*p* in portable OpenSSH, of a
kind that could plausibly cause this.

configure.ac appears to define BROKEN_REALPATH on *-*-aix*, which I'm assuming
pulls in that realpath implementation.
Comment 8 Ben Lindstrom 2003-10-01 09:42:53 AEST
Created attachment 475 [details]
Sync muckup fix

Apply this and recompile.  Looks like I didn't complete the sync with OpenBSD.
Comment 9 Ramses Smeyers 2003-10-01 20:24:01 AEST
using AIX 5.1.0ML04 with AC_DEFINE(BROKEN_REALPATH)
patch works
Comment 10 Ben Lindstrom 2003-10-01 23:15:02 AEST
This patch was applied last night to the --current tree.

- Ben
Comment 11 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED
Comment 12 Ahmed Sayeed 2021-10-14 01:40:13 AEDT
[spam removed]