1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

libsmbconf: fix crashbug - correctly check for existence of file.

Michael
This commit is contained in:
Michael Adam 2008-04-09 15:16:45 +02:00
parent 5a880c6a2f
commit dd543cd30c

View File

@ -175,8 +175,13 @@ static WERROR smbconf_txt_init_cache(struct smbconf_ctx *ctx)
static WERROR smbconf_txt_load_file(struct smbconf_ctx *ctx) static WERROR smbconf_txt_load_file(struct smbconf_ctx *ctx)
{ {
WERROR werr; 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) { if (new_csn == pd(ctx)->csn) {
return WERR_OK; return WERR_OK;
} }