s4-gensec: Replace gensec_set_peer_addr with new tsocket based fn.
authorAndreas Schneider <asn@redhat.com>
Wed, 16 Dec 2009 15:12:13 +0000 (16:12 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 16 Dec 2009 19:28:38 +0000 (20:28 +0100)
source4/auth/gensec/gensec.c
source4/auth/gensec/gensec.h
source4/kdc/kpasswdd.c

index d6acb262dc83f5f4f4dd208f8d8e1fe75f9da6a2..603a956442d3d8f1be581f2f0e8fb3f78dc52200 100644 (file)
@@ -1280,15 +1280,6 @@ _PUBLIC_ const struct tsocket_address *gensec_get_remote_address(struct gensec_s
        return gensec_security->remote_addr;
 }
 
-_PUBLIC_ NTSTATUS gensec_set_peer_addr(struct gensec_security *gensec_security, struct socket_address *peer_addr) 
-{
-       gensec_security->peer_addr = peer_addr;
-       if (peer_addr && !talloc_reference(gensec_security, peer_addr)) {
-               return NT_STATUS_NO_MEMORY;
-       }
-       return NT_STATUS_OK;
-}
-
 _PUBLIC_ struct socket_address *gensec_get_peer_addr(struct gensec_security *gensec_security) 
 {
        if (gensec_security->peer_addr) {
index 2baf1eabd3f507b1975a3e592515c4859ea3a0b0..fe628bbbe9faf918cf656f7e62268a3a1de07922 100644 (file)
@@ -298,8 +298,6 @@ NTSTATUS gensec_set_remote_address(struct gensec_security *gensec_security,
 const struct tsocket_address *gensec_get_local_address(struct gensec_security *gensec_security);
 const struct tsocket_address *gensec_get_remote_address(struct gensec_security *gensec_security);
 
-NTSTATUS gensec_set_peer_addr(struct gensec_security *gensec_security, struct socket_address *peer_addr);
-
 NTSTATUS gensec_start_mech_by_name(struct gensec_security *gensec_security, 
                                        const char *name);
 
index 586dd1304b9ec3f0ca49016e0996c5ffead34d61..9b3336a7a126bc4aad479d966877151ba76672ff 100644 (file)
@@ -524,7 +524,7 @@ bool kpasswdd_process(struct kdc_server *kdc,
         * older MIT clients need this, we might have to insert more
         * complex code */
 
-       nt_status = gensec_set_peer_addr(gensec_security, peer_addr);
+       nt_status = gensec_set_local_address(gensec_security, peer_addr);
        if (!NT_STATUS_IS_OK(nt_status)) {
                talloc_free(tmp_ctx);
                return false;