diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-04-10 18:36:08 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2013-04-12 11:03:48 -0400 |
commit | 3e0faa329b0599c775547603dea21a6e18b4029d (patch) | |
tree | 7abca79c3358f4e86f5b902e6f204e1fae7d024f /src/lib/krb5/os/changepw.c | |
parent | e4de1f768e818911e6c035ddcbaf0127e0eccb40 (diff) | |
download | krb5-3e0faa329b0599c775547603dea21a6e18b4029d.tar.gz krb5-3e0faa329b0599c775547603dea21a6e18b4029d.tar.xz krb5-3e0faa329b0599c775547603dea21a6e18b4029d.zip |
Get rid of cm.c and cm.h
Since net-server.c now uses libverto, only sendto_kdc.c consumes cm.c.
Move stuff out of cm.c and cm.h into sendto_kdc.c and get rid of them.
Change the sendto_kdc callback (used by chpw.c) to receive the socket
descriptor instead of the entire conn_state structure, and move the
declarations into os-proto.h. struct remote_address also needs to be
in os-proto.h so that trace.c and t_trace.c can use it. k5_curtime
isn't needed since k5-platform.h now guarantees the presence of
gettimeofday().
Diffstat (limited to 'src/lib/krb5/os/changepw.c')
-rw-r--r-- | src/lib/krb5/os/changepw.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index 25b89db49f..462910f6ba 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -34,7 +34,6 @@ #include "fake-addrinfo.h" #include "k5-int.h" #include "os-proto.h" -#include "cm.h" #include "../krb/auth_con.h" #include "../krb/int-proto.h" @@ -100,23 +99,21 @@ locate_kpasswd(krb5_context context, const krb5_data *realm, static void -kpasswd_sendto_msg_cleanup (void* callback_context, krb5_data* message) +kpasswd_sendto_msg_cleanup(void *data, krb5_data *message) { - struct sendto_callback_context *ctx = callback_context; + struct sendto_callback_context *ctx = data; krb5_free_data_contents(ctx->context, message); } static int -kpasswd_sendto_msg_callback(struct conn_state *conn, - void *callback_context, - krb5_data *message) +kpasswd_sendto_msg_callback(SOCKET fd, void *data, krb5_data *message) { krb5_error_code code = 0; struct sockaddr_storage local_addr; krb5_address local_kaddr; - struct sendto_callback_context *ctx = callback_context; + struct sendto_callback_context *ctx = data; GETSOCKNAME_ARG3_TYPE addrlen; krb5_data output; @@ -127,7 +124,7 @@ kpasswd_sendto_msg_callback(struct conn_state *conn, */ addrlen = sizeof(local_addr); - if (getsockname(conn->fd, ss2sa(&local_addr), &addrlen) < 0) { + if (getsockname(fd, ss2sa(&local_addr), &addrlen) < 0) { code = SOCKET_ERRNO; goto cleanup; } @@ -259,7 +256,7 @@ change_set_password(krb5_context context, addrlen = sizeof(remote_addr); - callback_info.context = (void*) &callback_ctx; + callback_info.data = &callback_ctx; callback_info.pfn_callback = kpasswd_sendto_msg_callback; callback_info.pfn_cleanup = kpasswd_sendto_msg_cleanup; krb5_free_data_contents(callback_ctx.context, &chpw_rep); |