From: Volker Lendecke Date: Mon, 23 Jun 2008 06:38:27 +0000 (+0200) Subject: Remove "conn" from pipes_struct X-Git-Tag: samba-3.3.0pre1~793 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64a4dfaa826cf9319ef3f5c65023352bf8af539e;p=thirdparty%2Fsamba.git Remove "conn" from pipes_struct For spoolss, we need the client's IP address --- diff --git a/source/include/ntdomain.h b/source/include/ntdomain.h index 46842c8b97d..caf7e3431c1 100644 --- a/source/include/ntdomain.h +++ b/source/include/ntdomain.h @@ -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; diff --git a/source/rpc_server/srv_pipe_hnd.c b/source/rpc_server/srv_pipe_hnd.c index 22903aacba3..1feed1550c1 100644 --- a/source/rpc_server/srv_pipe_hnd.c +++ b/source/rpc_server/srv_pipe_hnd.c @@ -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; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index 06b3d4a07ad..eaf563eaa93 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -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; }