From 94b4cf9c13debd4ccac00ccfecbb35ae49acd492 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 22 Jun 2001 11:29:34 +0000 Subject: [PATCH] * ovsec_kadmd.c: Change prototype for process_chpw_request prototype argument from sin to sockin. Get rid of global params variable. * schpw.c: Change function declaration as well. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13489 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/server/ChangeLog | 8 ++++++++ src/kadmin/server/ovsec_kadmd.c | 13 +++++++------ src/kadmin/server/schpw.c | 9 +++++---- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog index f15f1e4a1..92cf811d0 100644 --- a/src/kadmin/server/ChangeLog +++ b/src/kadmin/server/ChangeLog @@ -1,3 +1,11 @@ +2001-06-21 Ezra Peisach + + * ovsec_kadmd.c: Change prototype for process_chpw_request + prototype argument from sin to sockin. Get rid of global params + variable. + + * schpw.c: Change function declaration as well. + 2001-06-21 Ezra Peisach * ovsec_kadmd.c: Add prototype for daemon if needed. diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c index 61b1c78be..a0752badc 100644 --- a/src/kadmin/server/ovsec_kadmd.c +++ b/src/kadmin/server/ovsec_kadmd.c @@ -71,7 +71,7 @@ void request_exit(int); void request_hup(int); void reset_db(void); void sig_pipe(int); -void kadm_svc_run(void); +void kadm_svc_run(kadm5_config_params *params); #ifdef POSIX_SIGNALS static struct sigaction s_action; @@ -112,10 +112,9 @@ void log_badauth_display_status_1(char *m, OM_uint32 code, int type, int schpw; void do_schpw(int s, kadm5_config_params *params); -kadm5_config_params params; krb5_error_code process_chpw_request(krb5_context context, void *server_handle, char *realm, int s, krb5_keytab keytab, - struct sockaddr_in *sin, + struct sockaddr_in *sockin, krb5_data *req, krb5_data *rep); /* @@ -206,6 +205,7 @@ int main(int argc, char *argv[]) auth_gssapi_name names[4]; gss_buffer_desc gssbuf; gss_OID nt_krb5_name_oid; + kadm5_config_params params; /* This is OID value the Krb5_Name NameType */ gssbuf.value = "{1 2 840 113554 1 2 2 1}"; @@ -542,7 +542,7 @@ int main(int argc, char *argv[]) setup_signal_handlers(); krb5_klog_syslog(LOG_INFO, "starting"); - kadm_svc_run(); + kadm_svc_run(¶ms); krb5_klog_syslog(LOG_INFO, "finished, exiting"); /* Clean up memory, etc */ @@ -616,7 +616,8 @@ void setup_signal_handlers(void) { * Modifies: */ -void kadm_svc_run(void) +void kadm_svc_run(params) +kadm5_config_params *params; { fd_set rfd; int sz = _gssrpc_rpc_dtablesize(); @@ -657,7 +658,7 @@ void kadm_svc_run(void) break; default: if (FD_ISSET(schpw, &rfd)) - do_schpw(schpw, ¶ms); + do_schpw(schpw, params); else svc_getreqset(&rfd); } diff --git a/src/kadmin/server/schpw.c b/src/kadmin/server/schpw.c index c65555bf5..d86522d79 100644 --- a/src/kadmin/server/schpw.c +++ b/src/kadmin/server/schpw.c @@ -6,13 +6,14 @@ #include krb5_error_code -process_chpw_request(context, server_handle, realm, s, keytab, sin, req, rep) +process_chpw_request(context, server_handle, realm, s, keytab, sockin, + req, rep) krb5_context context; void *server_handle; char *realm; int s; krb5_keytab keytab; - struct sockaddr_in *sin; + struct sockaddr_in *sockin; krb5_data *req; krb5_data *rep; { @@ -174,8 +175,8 @@ process_chpw_request(context, server_handle, realm, s, keytab, sin, req, rep) (krb5_octet *) &(((struct sockaddr_in *) &remote_addr)->sin_addr); remote_kaddr.addrtype = ADDRTYPE_INET; - remote_kaddr.length = sizeof(sin->sin_addr); - remote_kaddr.contents = (krb5_octet *) &sin->sin_addr; + remote_kaddr.length = sizeof(sockin->sin_addr); + remote_kaddr.contents = (krb5_octet *) &sockin->sin_addr; /* mk_priv requires that the local address be set. getsockname is used for this. rd_priv requires that the -- 2.26.2