yum install autoconf automake libtool m4 pkg-config pcre2 pcre2-devel lua lua-devel nettle nettle-devel libuuid libuuid-devel libxml2 libxmle2-devel libxml2-static sqlite sqlite-devel
static void webdav_propfind_dir (webdav_propfind_bufs * const restrict pb) { /* arbitrary recursion limit to prevent infinite loops, * e.g. due to symlink loops, or excessive resource usage */ if (++pb->recursed > 100) return; physical_st * const dst = pb->dst; #ifndef _ATFILE_SOURCE /*(not using fdopendir unless _ATFILE_SOURCE)*/ const int dfd = -1; DIR * const dir = opendir(dst->path.ptr); #else /* EGO: il secondo argomento in fdevent_open_dirname indica se seguire o meno il symlink nel caso che sia una directory. Stranamente e' messo a 0 senza fare controlli sulla configurazione di webdav.opts += ("unsafe-propfind-follow-symlink" => "enable") Dato che nel nostro caso usiamo webdav solo in readonly lo forziamo a 1 Riga originale: const int dfd = fdevent_open_dirname(dst->path.ptr, 0); */ const int dfd = fdevent_open_dirname(dst->path.ptr, 1); DIR * const dir = (dfd >= 0) ? fdopendir(dfd) : NULL; #endif if (NULL == dir) { int errnum = errno; if (dfd >= 0) close(dfd); if (errnum != ENOENT) webdav_propfind_resource_403(pb); /* Forbidden */ return; }
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
conf | lighttpd.conf | manage | 13 K | 27 Jun 2023 - 13:45 | Main.Dibiase |