s4: fix various warnings (not "const" related ones)
[sfrench/samba-autobuild/.git] / source4 / winbind / wb_irpc.c
index 0535045adb200ebf7c9e6d8b57b9d189bf9a37d7..efbc310b68180d6f50665c15ecec42d1f3e2baa4 100644 (file)
@@ -22,7 +22,7 @@
 #include "winbind/wb_server.h"
 #include "lib/messaging/irpc.h"
 #include "libcli/composite/composite.h"
-#include "libcli/security/proto.h"
+#include "libcli/security/security.h"
 #include "librpc/gen_ndr/ndr_winbind.h"
 #include "smbd/service_task.h"
 
@@ -36,7 +36,7 @@ static void wb_irpc_SamLogon_callback(struct composite_context *ctx);
 static NTSTATUS wb_irpc_SamLogon(struct irpc_message *msg, 
                                 struct winbind_SamLogon *req)
 {
-       struct wbsrv_service *service = talloc_get_type(msg->private,
+       struct wbsrv_service *service = talloc_get_type(msg->private_data,
                                        struct wbsrv_service);
        struct wb_irpc_SamLogon_state *s;
        struct composite_context *ctx;
@@ -83,10 +83,10 @@ static void wb_irpc_get_idmap_callback(struct composite_context *ctx);
 static NTSTATUS wb_irpc_get_idmap(struct irpc_message *msg,
                                  struct winbind_get_idmap *req)
 {
-       struct wbsrv_service *service = talloc_get_type(msg->private,
+       struct wbsrv_service *service = talloc_get_type(msg->private_data,
                                        struct wbsrv_service);
        struct wb_irpc_get_idmap_state *s;
-       struct composite_context *ctx;
+       struct composite_context *ctx = NULL;
 
        DEBUG(5, ("wb_irpc_get_idmap called\n"));
 
@@ -132,6 +132,9 @@ static void wb_irpc_get_idmap_callback(struct composite_context *ctx)
                case WINBIND_IDMAP_LEVEL_XIDS_TO_SIDS:
                        status = wb_xids2sids_recv(ctx, &s->req->out.ids);
                        break;
+               default:
+                       status = NT_STATUS_INTERNAL_ERROR;
+                       break;
        }
 
        irpc_send_reply(s->msg, status);