summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/smbconf/smbconf_txt_simple.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/lib/smbconf/smbconf_txt_simple.c b/source3/lib/smbconf/smbconf_txt_simple.c
index 2183ac3bec..9164d1690a 100644
--- a/source3/lib/smbconf/smbconf_txt_simple.c
+++ b/source3/lib/smbconf/smbconf_txt_simple.c
@@ -175,8 +175,13 @@ static WERROR smbconf_txt_init_cache(struct smbconf_ctx *ctx)
static WERROR smbconf_txt_load_file(struct smbconf_ctx *ctx)
{
WERROR werr;
- uint64_t new_csn = (uint64_t)file_modtime(ctx->path);
+ uint64_t new_csn;
+ if (!file_exist(ctx->path, NULL)) {
+ return WERR_BADFILE;
+ }
+
+ new_csn = (uint64_t)file_modtime(ctx->path);
if (new_csn == pd(ctx)->csn) {
return WERR_OK;
}