diff options
-rw-r--r-- | source4/lib/module.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/module.c b/source4/lib/module.c index f03e19d924..1fcb57fac1 100644 --- a/source4/lib/module.c +++ b/source4/lib/module.c @@ -35,7 +35,10 @@ NTSTATUS smb_load_module(const char *module_name) DIR *dir; struct dirent *dirent; - stat(module_name, &st); + if(stat(module_name, &st) < 0) { + DEBUG(0, ("Can't stat module '%s'\n", module_name)); + return NT_STATUS_UNSUCCESSFUL; + } /* If the argument is a directory, recursively load all files / * directories in it */ |