scandir(3)-based directory auto index didn't work on NFS because the
authorreyk <reyk@openbsd.org>
Sat, 2 Aug 2014 09:46:51 +0000 (09:46 +0000)
committerreyk <reyk@openbsd.org>
Sat, 2 Aug 2014 09:46:51 +0000 (09:46 +0000)
commit657ff3049600bf9ab53c42092ff7d90f1f521ea9
treeef0ed85573c062155f0105c49762063175b098eb
parent3935a46b47d49ae0ba4448dd4d2eff216c81570a
scandir(3)-based directory auto index didn't work on NFS because the
file system is not filling in d_type properly.  Using st_mode from the
stat call fixes the problem, eg. S_ISDIR(st.st_mode) instead of
dp->d_type == DT_DIR.  Pointed out by pelikan@
usr.sbin/httpd/server_file.c