SFTP Logging Redux.

Jason A . Dour jason at dour.org
Fri Jun 22 05:00:38 EST 2001


On Thu, Jun 21, 2001 at 02:41:00PM -0400, Robert Mooney wrote:
> I kind of forgot that adding arguments to sftp-server would complicate
> matters more than necessary, so in this case, I agree that it should
> just be left on.

Yeah.  There's some stuff I'd like to see for SFTP that might
necessitate this, however.  chroot() being one (unless there's a
plan to offer chroot() for sshd as a whole).  If I have to add
getopt handling for other reasons, adding one for logging levels
would be simple.

> I think there was only one instance that was still logging the old
> way.  I haven't tested it, but it looks much better than the last
> version.

There is one line that needs fixing in that last patch.  Line 1147
of the patched code should look like:
		cuname = xstrdup(upw->pw_name);
instead of:
		cuname = upw->pw_name;
because the pw entry apparently gets borked temporarily by functions
such as chmod(), chown(), et cetera, leading to invalid usernames in
log entries.  Duping the string keeps it constant as it should be.

It seems to test clean.  I've not experienced any trouble with it so
far.


Cheers,
Jason
# "Jason A. Dour" <jason at dour.org>                  http://dour.org/
# Founder / Executive Producer - PJ Harvey Online - http://pjh.org/



More information about the openssh-unix-dev mailing list