1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-12 21:58:10 +03:00

r1038: Check whether a module actually exists before attempting to load it...

This commit is contained in:
Jelmer Vernooij 2004-06-05 20:53:18 +00:00 committed by Gerald (Jerry) Carter
parent 0209dce1eb
commit c8e3fd75e5

View File

@ -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 */