From: Alan T. DeKok Date: Thu, 22 Mar 2018 12:25:28 +0000 (-0400) Subject: reopen if we can't stat it X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=352d51d97d548b3ca86d6350a113df5102b6b571;p=thirdparty%2Ffreeradius-server.git reopen if we can't stat it --- diff --git a/src/main/exfile.c b/src/main/exfile.c index fea84d8e5c1..c726ef0ee00 100644 --- a/src/main/exfile.c +++ b/src/main/exfile.c @@ -364,8 +364,7 @@ int exfile_open(exfile_t *ef, REQUEST *request, char const *filename, mode_t per * and re-open the file. */ if (stat(ef->entries[i].filename, &st) < 0) { - fr_strerror_printf("Failed to stat file %s: %s", filename, strerror(errno)); - goto error; + goto reopen; } if ((st.st_dev != ef->entries[i].st_dev) || @@ -449,7 +448,7 @@ try_lock: */ if (fstat(ef->entries[i].fd, &st) < 0) { fr_strerror_printf("Failed to stat file %s: %s", filename, strerror(errno)); - goto error; + goto reopen; } if (st.st_nlink == 0) {