r3137: Do not simply ignore failing idmap-module init for remotemaps.
authorGünther Deschner <gd@samba.org>
Fri, 22 Oct 2004 16:19:31 +0000 (16:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:01 +0000 (10:53 -0500)
(in preparation of adding idmap_rid)

Guenther

source/sam/idmap.c

index 4de37f0e4999650b78b7778be2c3fa665796b039..3abfb0ae9f1573ed3a0316ce34ad7c482df75d12 100644 (file)
@@ -134,7 +134,10 @@ BOOL idmap_init(const char **remote_backend)
                if((remote_map = get_methods(rem_backend, False)) ||
                    (NT_STATUS_IS_OK(smb_probe_module("idmap", rem_backend)) && 
                    (remote_map = get_methods(rem_backend, False)))) {
-                       remote_map->init(params);
+                       if (!NT_STATUS_IS_OK(remote_map->init(params))) {
+                               DEBUG(0, ("idmap_init: failed to initialize remote backend!\n"));
+                               return False;
+                       }
                } else {
                        DEBUG(0, ("idmap_init: could not load remote backend '%s'\n", rem_backend));
                        SAFE_FREE(rem_backend);