geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit 32c1854864ce91a873e607659294eda9012411e6
parent e35d04d03d5c4c8ddc88e73c5c3f092e3d309a40
Author: Christoph Lohmann <20h@r-36.net>
Date:   Mon, 21 Aug 2023 11:37:44 +0200

Fix double printing notfounderr and fix notfound on not allowed dir trav.

Diffstat:
Mmain.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c @@ -329,6 +329,7 @@ dothegopher: dprintf(sock, notfounderr, recvc); if (loglvl & ERRORS) logentry(clienth, clientp, recvc, "not found"); + return; } if (stat(rpath, &dir) != -1) { /* @@ -426,6 +427,7 @@ dothegopher: } } else { if (pathfallthrough && S_ISDIR(dir.st_mode)) { + dprintf(sock, notfounderr, recvc); if (loglvl & ERRORS) { logentry(clienth, clientp, recvc, "directory listing in traversal not allowed");