s3: properly find our standard nss_info backends
authorVolker Lendecke <vl@samba.org>
Sun, 27 Feb 2011 18:09:28 +0000 (19:09 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 27 Feb 2011 18:11:31 +0000 (19:11 +0100)
Right now, the nss_info backends are tied to the idmap backends (which is wrong
IMHO). In the domain child we don't load the idmap backend anymore, so we don't
have the nss info modules. This needs fixing properly.

source3/winbindd/nss_info.c

index 67ffbf21cc48329b547d1816a2c6dc7467a342f8..a243a03948d41aaffa440ffdc4dd5edf55c79503 100644 (file)
@@ -203,6 +203,19 @@ static NTSTATUS nss_init(const char **nss_list)
 
                /* validate the backend */
 
+               nss_backend = nss_get_backend(backend);
+               if (nss_backend == NULL) {
+                       /*
+                        * This is a freaking hack. We don't have proper
+                        * modules for nss_info backends. Right now we have
+                        * our standard nss_info backends in the ad backend.
+                        */
+                       status = smb_probe_module("idmap", "ad");
+                       if ( !NT_STATUS_IS_OK(status) ) {
+                               continue;
+                       }
+               }
+
                nss_backend = nss_get_backend(backend);
                if (nss_backend == NULL) {
                        /* attempt to register the backend */