r26382: Remove more uses of global_loadparm.
[kai/samba-autobuild/.git] / source4 / ntvfs / ipc / rap_server.c
index d1a4dd9edc8ba5c8e65eee3c06a3022b76aaa457..9113bef894d1c515941d8cc8991ad22daa4b8986 100644 (file)
@@ -23,6 +23,7 @@
 #include "libcli/rap/rap.h"
 #include "librpc/gen_ndr/srvsvc.h"
 #include "rpc_server/common/common.h"
+#include "param/param.h"
 
 /* At this moment these are just dummy functions, but you might get the
  * idea. */
@@ -40,7 +41,7 @@ NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
        r->out.available = 0;
        r->out.info = NULL;
 
-       nterr = share_get_context(mem_ctx, &sctx);
+       nterr = share_get_context_by_name(mem_ctx, lp_share_backend(global_loadparm), &sctx);
        if (!NT_STATUS_IS_OK(nterr)) {
                return nterr;
        }