Re: /var/log/messages internal-sftp time stamp problem



Syy Bak wrote:
I've compiled and successfully installed openssh 5.2p1, having it
configured to chroot users and log to syslog. It was compiled on two
different systems/platforms (RHEL 5.1/i386 and Fedora10/86_64).

All works perfectly fine except one thing where I am not sure whether
it is my mistake somewhere or some sort of bug: time stams from
internal-sftp subsystem are one hour behind systems clock as if
internal-sftp subsystem would only observe UTC (GMT) time zone without
offset and taking into consideration currently set timezone (for
example mine is now GMT+1).

What's probably happening is that the chroot lacks a data file that the C library uses to convert the TZ string into a offset from UTC, probably /etc/localtime. Try copying that into the chroot, and if that's not it try strace'ing the chrooted process to see what it's looking for (eg "strace -o trace=open $pid").

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.



Relevant Pages

  • Re: per-chroot clock module ?
    ... Timezones can be set using environment variables. ... outside of a chroot. ... real-time clock offset for the root inode of the current process or 0 if not found or the ... all processes running with a root inode of that chroot directory ...
    (Linux-Kernel)
  • Re: I got problems with sshd - openssh_4.0
    ... > I this a common problem? ... Basically, chroot + ... and the Fedora bug is: ... Good judgement comes with experience. ...
    (comp.security.ssh)
  • Re: /var/log/messages internal-sftp time stamp problem
    ... internal-sftp subsystem would only observe UTC time zone without ... The absence of this inside the chroot would cause the chrooted processes ...
    (SSH)
  • Re: OpenSSH & ChRoot
    ... > I'm sure someone will try and explain to me why I don't need to ChRoot ... > in SSH, but I want to do it, and with SSH I can. ... Stock OpenSSH doesn't have a native chroot capability (not sure about's ... Good judgement comes with experience. ...
    (SSH)