Subject: CVS commit: [netbsd-1-6] src/libexec/ftpd
To: None <source-changes@netbsd.org>
From: James Chacon <jmc@netbsd.org>
List: source-changes
Date: 01/12/2003 01:13:20
Module Name:	src
Committed By:	jmc
Date:		Sat Jan 11 23:13:19 UTC 2003

Modified Files:
	src/libexec/ftpd [netbsd-1-6]: cmds.c

Log Message:
Pull up revisions 1.19-1.20 (requested by manu in ticket #1064)
 ftpd was unable to service the pwd request once you entered a directory
 without search permission. This confused some ftp clients.

 We fix this problem by maitaining a cached path when getcwd() does not
 work. The symbolic links and ../ are resolved in the cached path, and it
 is finnally checked for accuracy by comparing ./ and the cached path
 with stat (device and inode comparison). If the comparison fails, pwd
 fails as it did before, and if the comparison succeeds, the cached path
 is displayed.

 If paths are too long, we should just compare ./ with a truncated path
 and fail, thus making pwd displaying an error as it did before.


To generate a diff of this commit:
cvs rdiff -r1.16.2.1 -r1.16.2.2 src/libexec/ftpd/cmds.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.