From 85472780d136effef7eee1c18d3c9013943927ec Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 10 Jan 2003 00:14:16 +0000 Subject: [PATCH] Use socklen_t when passing address to socket functions. Fixes compilation warnings on AIX 4.3.3. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15105 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 5 +++++ src/appl/bsd/krlogind.c | 7 ++++--- src/appl/gssftp/ftp/ChangeLog | 5 +++++ src/appl/gssftp/ftp/ftp.c | 9 ++++++--- src/appl/telnet/telnetd/ChangeLog | 5 +++++ src/appl/telnet/telnetd/telnetd.c | 6 ++++-- src/appl/user_user/ChangeLog | 5 +++++ src/appl/user_user/server.c | 5 +++-- src/kadmin/server/ChangeLog | 5 +++++ src/kadmin/server/ovsec_kadmd.c | 2 +- src/kadmin/v4server/ChangeLog | 5 +++++ src/kadmin/v4server/admin_server.c | 2 +- src/kadmin/v5passwdd/ChangeLog | 5 +++++ src/kadmin/v5passwdd/adm_conn.c | 2 +- 14 files changed, 55 insertions(+), 13 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 46e005c57..055fbcfea 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * krlogind.c (main, recvauth): Use socklen_t when passing + addresses to socket functions. + 2003-01-05 Sam Hartman * login.c: Remove declaration of errno diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 33a187652..7c8365972 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -354,7 +354,8 @@ int main(argc, argv) { extern int opterr, optind; extern char * optarg; - int on = 1, fromlen, ch; + int on = 1, ch; + socklen_t fromlen; struct sockaddr_storage from; int debug_port = 0; int fd; @@ -1354,7 +1355,7 @@ recvauth(valid_checksum) krb5_auth_context auth_context = NULL; krb5_error_code status; struct sockaddr_storage peersin, laddr; - int len; + socklen_t len; krb5_data inbuf; char v4_instance[INST_SZ]; /* V4 Instance */ krb5_data version; @@ -1461,7 +1462,7 @@ recvauth(valid_checksum) if (authenticator->checksum) { struct sockaddr_in adr; - int adr_length = sizeof(adr); + socklen_t adr_length = sizeof(adr); char * chksumbuf = (char *) malloc(strlen(term)+strlen(lusername)+32); if (getsockname(netf, (struct sockaddr *) &adr, &adr_length) != 0) goto error_cleanup; diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 385036d2b..ba67eb573 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * ftp.c (hookup, initconn, dataconn): Use socklen_t when passing + address to socket functions. + 2002-11-08 Ken Raeburn * main.c (makeargv): Report an error if parsed arguments won't fit diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c index d7f484080..ffbb42cd5 100644 --- a/src/appl/gssftp/ftp/ftp.c +++ b/src/appl/gssftp/ftp/ftp.c @@ -196,7 +196,8 @@ char * hookup(char* host, int port) { register struct hostent *hp = 0; - int s, len; + int s; + socklen_t len; #ifdef IP_TOS #ifdef IPTOS_LOWDELAY int tos; @@ -1440,7 +1441,8 @@ die: static int initconn() { register char *p, *a; - int result, len, tmpno = 0; + int result, tmpno = 0; + socklen_t len; int on = 1; #ifndef NO_PASSIVE_MODE int a1,a2,a3,a4,p1,p2; @@ -1560,7 +1562,8 @@ bad: FILE * dataconn(char *lmode) { - int s, fromlen = sizeof (hisdataaddr); + int s; + socklen_t fromlen = sizeof (hisdataaddr); #ifdef IP_TOS #ifdef IPTOS_LOWDELAY int tos; diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index 71503b1b6..c380d11f8 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * telnetd.c (main): Use socklen_t when passing address to socket + functions. + 2003-01-07 Ken Raeburn * Makefile.orig: Deleted. diff --git a/src/appl/telnet/telnetd/telnetd.c b/src/appl/telnet/telnetd/telnetd.c index bed4a3294..5633d5625 100644 --- a/src/appl/telnet/telnetd/telnetd.c +++ b/src/appl/telnet/telnetd/telnetd.c @@ -221,7 +221,8 @@ main(argc, argv) char *argv[]; { struct sockaddr_storage from; - int on = 1, fromlen; + int on = 1; + socklen_t fromlen; register int ch; extern char *optarg; extern int optind; @@ -488,7 +489,8 @@ main(argc, argv) /* XXX Convert this to support getaddrinfo, ipv6, etc. */ if (debug) { - int s, ns, foo; + int s, ns; + socklen_t foo; struct servent *sp; static struct sockaddr_in sin4 = { AF_INET }; diff --git a/src/appl/user_user/ChangeLog b/src/appl/user_user/ChangeLog index 433e589a3..f62cd3c3b 100644 --- a/src/appl/user_user/ChangeLog +++ b/src/appl/user_user/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * server.c (main): Use socklen_t when passing address to socket + functions. + 2002-08-29 Ken Raeburn * Makefile.in: Revert $(S)=>/ change, for Windows support. diff --git a/src/appl/user_user/server.c b/src/appl/user_user/server.c index b81d16200..022767df3 100644 --- a/src/appl/user_user/server.c +++ b/src/appl/user_user/server.c @@ -47,7 +47,8 @@ int argc; char *argv[]; { krb5_data pname_data, tkt_data; - int l, sock = 0; + int sock = 0; + socklen_t l; int retval; struct sockaddr_in l_inaddr, f_inaddr; /* local, foreign address */ krb5_creds creds, *new_creds; @@ -71,7 +72,7 @@ char *argv[]; int one = 1; int acc; struct servent *sp; - int namelen = sizeof(f_inaddr); + socklen_t namelen = sizeof(f_inaddr); if ((sock = socket(PF_INET, SOCK_STREAM, 0)) < 0) { com_err("uu-server", errno, "creating socket"); diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog index beeab1714..b1a8f7878 100644 --- a/src/kadmin/server/ChangeLog +++ b/src/kadmin/server/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * ovsec_kadmd.c (do_schpw): Use socklen_t when passing address to + socket functions. + 2003-01-07 Ken Raeburn * Makefile.ov: Deleted. diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c index 72d339a35..776eace1e 100644 --- a/src/kadmin/server/ovsec_kadmd.c +++ b/src/kadmin/server/ovsec_kadmd.c @@ -1027,7 +1027,7 @@ void do_schpw(int s1, kadm5_config_params *params) char req[1500]; int len; struct sockaddr_in from; - int fromlen; + socklen_t fromlen; krb5_keytab kt; krb5_data reqdata, repdata; int s2; diff --git a/src/kadmin/v4server/ChangeLog b/src/kadmin/v4server/ChangeLog index ab4920835..978aabfd7 100644 --- a/src/kadmin/v4server/ChangeLog +++ b/src/kadmin/v4server/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * admin_server.c (kadm_listen): Use socklen_t when passing address + to socket functions. + 2003-01-07 Ken Raeburn * Makefile.ov: Deleted. diff --git a/src/kadmin/v4server/admin_server.c b/src/kadmin/v4server/admin_server.c index 527f19341..1dfb77faa 100644 --- a/src/kadmin/v4server/admin_server.c +++ b/src/kadmin/v4server/admin_server.c @@ -289,7 +289,7 @@ kadm_listen() int peer_fd; fd_set mask, readfds; struct sockaddr_in peer; - int addrlen; + socklen_t addrlen; int pid; #ifdef POSIX_SIGNALS struct sigaction new_act; diff --git a/src/kadmin/v5passwdd/ChangeLog b/src/kadmin/v5passwdd/ChangeLog index ced306736..b301eab76 100644 --- a/src/kadmin/v5passwdd/ChangeLog +++ b/src/kadmin/v5passwdd/ChangeLog @@ -1,3 +1,8 @@ +2003-01-09 Ken Raeburn + + * adm_conn.c (kadm_contact_server): Use socklen_t when passing + address to socket functions. + 2002-11-05 Tom Yu * kpasswd.c (kpwd_change_prompt_1, kpwd_change_prompt_2) diff --git a/src/kadmin/v5passwdd/adm_conn.c b/src/kadmin/v5passwdd/adm_conn.c index d9e6d8268..17028c738 100644 --- a/src/kadmin/v5passwdd/adm_conn.c +++ b/src/kadmin/v5passwdd/adm_conn.c @@ -326,7 +326,7 @@ kadm_contact_server(kcontext, realmp, sockp, local, remote) struct sockaddr_in in_local; struct sockaddr_in in_remote; - int addr_len; + socklen_t addr_len; const char *realm_admin_names[4]; char *realm_name; -- 2.26.2