| Summary: | When TZ isn't explicitly set ls can give different time stamps | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Dave Clarke <dave.clarke> | ||||
| Component: | sftp | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED WORKSFORME | ||||||
| Severity: | normal | CC: | djm, dtucker | ||||
| Priority: | P5 | ||||||
| Version: | 5.3p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
|
Description
Dave Clarke
2013-05-17 01:04:03 AEST
reproduced with 6.2p2. also the uid->name lookups and link counts are broken in the second example. Created attachment 2312 [details]
call tzset() for sftp-server and before chroot in sshd
The difference between "ls -ltr" and "ls -ltr FILENAME" is that the first uses the longname from the server and the second synthesises the line on the client.
uid->name and link counts aren't supported by our dialect of the sftp protocol. They are only listed in the "longname" element in the sftp dirent struct, so they are expected to be wrong in the locally-generated version.
The time shouldn't be wrong though - the server generates the longname's time using localtime() and strftime(). Perhaps it needs a tzset() first? Someone has reported a similar problem a while ago on for chrooted sftp and IIRC a similar patch to this helped.
Retarget to openssh-6.4 Retarget 6.3 -> 6.4 btw, I'm not going to apply this patch until someone reports that it solves their problems. Retarget incomplete bugs / feature requests to 6.6 release Retarget incomplete bugs / feature requests to 6.6 release Retarget to 6.7 release, since 6.6 was mostly bugfixing. Remove from 6.6 tracking bug remove target until someone who can replicate this tests the fine patch. No followup for 5 years == no bug Closing all resolved bug with release of openssh-8.2 |