summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/gensec/gensec.c34
-rw-r--r--source4/auth/gensec/gensec.h1
2 files changed, 0 insertions, 35 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 9190364906..8de7b4b7e6 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -526,8 +526,6 @@ static NTSTATUS gensec_start(TALLOC_CTX *mem_ctx,
(*gensec_security)->private_data = NULL;
ZERO_STRUCT((*gensec_security)->target);
- ZERO_STRUCT((*gensec_security)->peer_addr);
- ZERO_STRUCT((*gensec_security)->my_addr);
(*gensec_security)->subcontext = false;
(*gensec_security)->want_features = 0;
@@ -1185,22 +1183,6 @@ _PUBLIC_ const char *gensec_get_target_hostname(struct gensec_security *gensec_s
_PUBLIC_ NTSTATUS gensec_set_local_address(struct gensec_security *gensec_security,
const struct tsocket_address *local)
{
- ssize_t socklen;
- struct sockaddr_storage ss;
-
- /* set my_addr */
- socklen = tsocket_address_bsd_sockaddr(local, (struct sockaddr *) &ss,
- sizeof(struct sockaddr_storage));
- if (socklen < 0) {
- return NT_STATUS_NO_MEMORY;
- }
- gensec_security->my_addr = socket_address_from_sockaddr(gensec_security,
- (struct sockaddr *) &ss, socklen);
- if (gensec_security->my_addr == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- /* set local */
TALLOC_FREE(gensec_security->local_addr);
gensec_security->local_addr = tsocket_address_copy(local, gensec_security);
if (gensec_security->local_addr == NULL) {
@@ -1223,22 +1205,6 @@ _PUBLIC_ NTSTATUS gensec_set_local_address(struct gensec_security *gensec_securi
_PUBLIC_ NTSTATUS gensec_set_remote_address(struct gensec_security *gensec_security,
const struct tsocket_address *remote)
{
- ssize_t socklen;
- struct sockaddr_storage ss;
-
- /* set my_addr */
- socklen = tsocket_address_bsd_sockaddr(remote, (struct sockaddr *) &ss,
- sizeof(struct sockaddr_storage));
- if (socklen < 0) {
- return NT_STATUS_NO_MEMORY;
- }
- gensec_security->peer_addr = socket_address_from_sockaddr(gensec_security,
- (struct sockaddr *) &ss, socklen);
- if (gensec_security->peer_addr == NULL) {
- return NT_STATUS_NO_MEMORY;
- }
-
- /* set remote */
TALLOC_FREE(gensec_security->remote_addr);
gensec_security->remote_addr = tsocket_address_copy(remote, gensec_security);
if (gensec_security->remote_addr == NULL) {
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index 293dd16b85..2ea2402064 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -169,7 +169,6 @@ struct gensec_security {
bool subcontext;
uint32_t want_features;
struct tevent_context *event_ctx;
- struct socket_address *my_addr, *peer_addr;
struct tsocket_address *local_addr, *remote_addr;
struct gensec_settings *settings;