1 diff -urN pure-ftpd-1.0.20.org/src/ls.c pure-ftpd-1.0.20/src/ls.c
2 --- pure-ftpd-1.0.20.org/src/ls.c 2004-02-29 22:49:27.000000000 +0100
3 +++ pure-ftpd-1.0.20/src/ls.c 2005-02-18 00:42:08.000000000 +0100
5 st.st_mode &= ~S_IFLNK;
7 } /* Hack to please some Windows client that dislike ../ -> ../ */
8 + if (S_ISLNK(st.st_mode)) {
9 + char ms[MAXPATHLEN + 1U];
13 + if ((sx = readlink(name, ms, sizeof ms - 1U)) > 0)
14 + if (stat(name, &sts) == 0) {
15 + if (!S_ISLNK(sts.st_mode))
16 + st.st_mode = sts.st_mode;
17 + /* don't show if owner mismatch */
18 + if (geteuid() != sts.st_uid)
21 + } /* Hack to show symlinks as files/directories */
23 #ifdef DISPLAY_FILES_IN_UTC_TIME
24 t = gmtime((time_t *) &st.st_mtime);