]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
reopen if we can't stat it
authorAlan T. DeKok <aland@freeradius.org>
Thu, 22 Mar 2018 12:25:28 +0000 (08:25 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 22 Mar 2018 12:25:28 +0000 (08:25 -0400)
src/main/exfile.c

index fea84d8e5c15f8abb2a2586ab6487de335b913a4..c726ef0ee00c0433096b8f051914ab0a26d0b882 100644 (file)
@@ -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) {