[Bug 2106] When TZ isn't explicitly set ls can give different time stamps

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Jul 12 10:56:09 EST 2013


https://bugzilla.mindrot.org/show_bug.cgi?id=2106

Damien Miller <djm at mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |djm at mindrot.org

--- Comment #2 from Damien Miller <djm at mindrot.org> ---
Created attachment 2312
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2312&action=edit
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.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list