]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Remove "conn" from pipes_struct
authorVolker Lendecke <vl@samba.org>
Mon, 23 Jun 2008 06:38:27 +0000 (08:38 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 24 Jun 2008 08:31:36 +0000 (10:31 +0200)
For spoolss, we need the client's IP address

source/include/ntdomain.h
source/rpc_server/srv_pipe_hnd.c
source/rpc_server/srv_spoolss_nt.c

index 46842c8b97df41a4f78b18622f89f61c069e7f96..caf7e3431c14a60f1ca51ccc9edb168bcc131ef2 100644 (file)
@@ -211,7 +211,8 @@ struct pipe_auth_data {
 typedef struct pipes_struct {
        struct pipes_struct *next, *prev;
 
-       connection_struct *conn;
+       char client_address[INET6_ADDRSTRLEN];
+
        uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
 
        fstring name;
index 22903aacba3526e441827545a7bddb0c7b281fb0..1feed1550c154908787d9d9527a65e202bb0f2b3 100644 (file)
@@ -316,7 +316,8 @@ static void *make_internal_rpc_pipe_p(const char *pipe_name,
 
        DLIST_ADD(InternalPipes, p);
 
-       p->conn = conn;
+       memcpy(p->client_address, conn->client_address,
+              sizeof(p->client_address));
 
        p->vuid  = vuid;
 
index 06b3d4a07ad9b121d1fcd5ec9645982065f8c491..eaf563eaa9301e6dd52d8f3df35392fa45cddd8f 100644 (file)
@@ -2721,9 +2721,8 @@ WERROR _spoolss_rffpcnex(pipes_struct *p, SPOOL_Q_RFFPCNEX *q_u, SPOOL_R_RFFPCNE
                        !get_printer_snum(p, handle, &snum, NULL) )
                return WERR_BADFID;
 
-       if (!interpret_string_addr(&client_ss,
-                               p->conn->client_address,
-                               AI_NUMERICHOST)) {
+       if (!interpret_string_addr(&client_ss, p->client_address,
+                                  AI_NUMERICHOST)) {
                return WERR_SERVER_UNAVAILABLE;
        }