s4:winbind: wbsrv_samba3_priv_pipe_dir() needs to return the directory not the pipe...
authorStefan Metzmacher <metze@samba.org>
Thu, 15 Apr 2010 07:24:56 +0000 (09:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 15 Apr 2010 07:34:02 +0000 (09:34 +0200)
metze

source4/winbind/wb_samba3_cmd.c
source4/winbind/wb_server.c
source4/winbind/wb_server.h

index d245d7ae37df020f8c229a5d229c2b5c397dee1a..077dcbecaaf49da92f2b11301dea29d420cb37a0 100644 (file)
@@ -215,11 +215,13 @@ NTSTATUS wbsrv_samba3_netbios_name(struct wbsrv_samba3_call *s3call)
 
 NTSTATUS wbsrv_samba3_priv_pipe_dir(struct wbsrv_samba3_call *s3call)
 {
-       const char *path = s3call->wbconn->listen_socket->service->priv_socket_path;
+       struct loadparm_context *lp_ctx = s3call->wbconn->listen_socket->service->task->lp_ctx;
+       const char *priv_socket_dir = lp_winbindd_privileged_socket_directory(lp_ctx);
+
        s3call->response.result          = WINBINDD_OK;
-       s3call->response.extra_data.data = discard_const(path);
+       s3call->response.extra_data.data = discard_const(priv_socket_dir);
 
-       s3call->response.length += strlen(path) + 1;
+       s3call->response.length += strlen(priv_socket_dir) + 1;
        return NT_STATUS_OK;
 }
 
index 4b31997f6c2ac8915936b35e419c815d9edef154..36ade7de5ebc1629245b392c93d37aa5181ad4bb 100644 (file)
@@ -304,12 +304,10 @@ static void winbind_task_init(struct task_server *task)
        listen_socket = talloc(service, struct wbsrv_listen_socket);
        if (!listen_socket) goto nomem;
        listen_socket->socket_path 
-               = service->priv_socket_path 
                = talloc_asprintf(listen_socket, "%s/%s", 
                                  lp_winbindd_privileged_socket_directory(task->lp_ctx),
                                  WINBINDD_SAMBA3_SOCKET);
        if (!listen_socket->socket_path) goto nomem;
-       if (!listen_socket->socket_path) goto nomem;
        listen_socket->service          = service;
        listen_socket->privileged       = true;
        status = stream_setup_socket(task->event_ctx, task->lp_ctx, model_ops,
index d86bc20fb9b008316793ae24e1779d2b398f7ad8..3bfe58bca90f0fc3273bd5da71bcb0b9a650248e 100644 (file)
@@ -25,8 +25,6 @@
 #include "libnet/libnet.h"
 
 #define WINBINDD_SAMBA3_SOCKET "pipe"
-/* the privileged socket is in smbd_tmp_dir() */
-#define WINBINDD_SAMBA3_PRIVILEGED_SOCKET "winbind_pipe"
 
 /* this struct stores global data for the winbind task */
 struct wbsrv_service {
@@ -35,8 +33,6 @@ struct wbsrv_service {
        const struct dom_sid *primary_sid;
        struct wbsrv_domain *domains;
        struct idmap_context *idmap_ctx;
-
-       const char *priv_socket_path;
 };
 
 struct wbsrv_samconn {