diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-06-05 20:53:18 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:33 -0500 |
commit | 439a78014625cf93c0e787747aec08d0f45b9781 (patch) | |
tree | 5d2dd4194ad301f9fe6f3f04870720f7b0bb9e38 /source4/lib | |
parent | 7aa5a5de59d18a13ff2fe902c9b9a6c3754215a8 (diff) | |
download | samba-439a78014625cf93c0e787747aec08d0f45b9781.tar.gz samba-439a78014625cf93c0e787747aec08d0f45b9781.tar.bz2 samba-439a78014625cf93c0e787747aec08d0f45b9781.zip |
r1038: Check whether a module actually exists before attempting to load it...
(This used to be commit c8e3fd75e594c8fc841337234e99be288180822f)
Diffstat (limited to 'source4/lib')
-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 */ |