From 05b37385fcfc67f4203b2a4822f94813d11511ca Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Nov 2010 16:07:35 +1100 Subject: s4-ldb: it is not an error for the modules directory to not exist --- source4/lib/ldb/common/ldb_modules.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 8ff04e118e..6c0cbfcb00 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -888,6 +888,11 @@ static int ldb_modules_load_dir(const char *modules_dir, const char *version) dir = opendir(modules_dir); if (dir == NULL) { + if (errno == ENOENT) { + talloc_free(tmp_ctx); + /* we don't have any modules */ + return LDB_SUCCESS; + } talloc_free(tmp_ctx); fprintf(stderr, "ldb: unable to open modules directory '%s' - %s\n", modules_dir, strerror(errno)); -- cgit