diff --git a/README.WARNINGS b/README.WARNINGS index 2faf0ab628..acf50f22b7 100644 --- a/README.WARNINGS +++ b/README.WARNINGS @@ -58,9 +58,6 @@ libadmin/samples/rxstat_query_peer.c : all : util_RPCStatsStateGet types libadmin/samples/rxstat_query_process.c : all : util_RPCStatsStateGet types libadmin/test/client.c : all : util_RPCStatsStateGet types rx/rx.c : all (pthread) : rxkad_global_stats_init not proto'd -ubik/beacon.c : all : Ubik uses signed/unsigned - interchangably for IP addresses, a - fix will require API changes. ubik/ubikclient.c : strict-protos : ubik_Call uss/uss_kauth.c : all : ubik_Call viced/fsprobe.c : all : ubik_Call diff --git a/src/bucoord/ubik_db_if.c b/src/bucoord/ubik_db_if.c index c0de8ef351..3eea178069 100644 --- a/src/bucoord/ubik_db_if.c +++ b/src/bucoord/ubik_db_if.c @@ -1146,7 +1146,7 @@ ubik_Call_SingleServer(int (*aproc) (), struct ubik_client *aclient, int udbLocalInit(void) { - afs_int32 serverList[MAXSERVERS]; + afs_uint32 serverList[MAXSERVERS]; char hostname[256]; char *args[3]; int i; diff --git a/src/budb/globals.h b/src/budb/globals.h index 262509840c..2f85eebfb8 100644 --- a/src/budb/globals.h +++ b/src/budb/globals.h @@ -33,8 +33,8 @@ struct buServerConfS { FILE *log; /* log file for status/errors */ /* ubik and comm. related */ - afs_int32 myHost; - afs_int32 serverList[MAXSERVERS]; /* list of ubik servers */ + afs_uint32 myHost; + afs_uint32 serverList[MAXSERVERS]; /* list of ubik servers */ char *cellConfigdir; /* afs cell config. directory */ struct ubik_dbase *database; /* handle for the database */ diff --git a/src/budb/server.c b/src/budb/server.c index a165403033..b30986ab49 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -57,7 +57,7 @@ int truncateDatabase(void); int parseServerList(struct cmd_item *); char lcell[MAXKTCREALMLEN]; -afs_int32 myHost = 0; +afs_uint32 myHost = 0; int helpOption; /* server's global configuration information. This is exported to other @@ -95,8 +95,8 @@ BU_rxstat_userok(struct rx_call *call) } int -convert_cell_to_ubik(struct afsconf_cell *cellinfo, afs_int32 *myHost, - afs_int32 *serverList) +convert_cell_to_ubik(struct afsconf_cell *cellinfo, afs_uint32 *myHost, + afs_uint32 *serverList) { int i; char hostname[64]; @@ -109,7 +109,7 @@ convert_cell_to_ubik(struct afsconf_cell *cellinfo, afs_int32 *myHost, printf("prserver: couldn't get address of this host.\n"); BUDB_EXIT(1); } - memcpy(myHost, th->h_addr, sizeof(afs_int32)); + memcpy(myHost, th->h_addr, sizeof(afs_uint32)); for (i = 0; i < cellinfo->numServers; i++) /* omit my host from serverList */ diff --git a/src/kauth/admin_tools.c b/src/kauth/admin_tools.c index f0ebfb5dad..31718d492b 100644 --- a/src/kauth/admin_tools.c +++ b/src/kauth/admin_tools.c @@ -1277,7 +1277,7 @@ int init = 0, noauth; char name[MAXKTCNAMELEN]; char instance[MAXKTCNAMELEN]; char newCell[MAXKTCREALMLEN]; -afs_int32 serverList[MAXSERVERS]; +afs_uint32 serverList[MAXSERVERS]; int NoAuth(struct cmd_syndesc *as, void *arock) diff --git a/src/kauth/authclient.c b/src/kauth/authclient.c index 3d262433a7..5a6155f7f3 100644 --- a/src/kauth/authclient.c +++ b/src/kauth/authclient.c @@ -62,7 +62,7 @@ static int debug = 0; "explicit". The cell can then be used to debug experimental servers. */ void -ka_ExplicitCell(char *cell, afs_int32 serverList[]) +ka_ExplicitCell(char *cell, afs_uint32 serverList[]) { int i; diff --git a/src/kauth/ka_util.c b/src/kauth/ka_util.c index 5e529dce81..14b58599a9 100644 --- a/src/kauth/ka_util.c +++ b/src/kauth/ka_util.c @@ -63,7 +63,7 @@ struct ubik_dbase *KA_dbase; int MinHours = 0; int npwSums = KA_NPWSUMS; afs_int32 verbose_track = 1; -afs_int32 myHost = 0; +afs_uint32 myHost = 0; main(argc, argv) int argc; diff --git a/src/kauth/kaserver.c b/src/kauth/kaserver.c index 9c67015908..18006eff45 100644 --- a/src/kauth/kaserver.c +++ b/src/kauth/kaserver.c @@ -53,7 +53,7 @@ struct kadstats dynamic_statistics; struct ubik_dbase *KA_dbase; -afs_int32 myHost = 0; +afs_uint32 myHost = 0; afs_int32 verbose_track = 1; afs_int32 krb4_cross = 0; afs_int32 rxBind = 0; @@ -103,8 +103,8 @@ initialize_dstats(void) } static int -convert_cell_to_ubik(struct afsconf_cell *cellinfo, afs_int32 *myHost, - afs_int32 *serverList) +convert_cell_to_ubik(struct afsconf_cell *cellinfo, afs_uint32 *myHost, + afs_uint32 *serverList) { int i; char hostname[64]; @@ -117,7 +117,7 @@ convert_cell_to_ubik(struct afsconf_cell *cellinfo, afs_int32 *myHost, ViceLog(0, ("kaserver: couldn't get address of this host.\n")); exit(1); } - memcpy(myHost, th->h_addr, sizeof(afs_int32)); + memcpy(myHost, th->h_addr, sizeof(afs_uint32)); for (i = 0; i < cellinfo->numServers; i++) if (cellinfo->hostAddr[i].sin_addr.s_addr != *myHost) { @@ -150,7 +150,7 @@ main(int argc, char *argv[]) { afs_int32 code; char *whoami = argv[0]; - afs_int32 serverList[MAXSERVERS]; + afs_uint32 serverList[MAXSERVERS]; struct afsconf_cell cellinfo; char *cell; const char *cellservdb, *dbpath, *lclpath; diff --git a/src/kauth/kaserver.h b/src/kauth/kaserver.h index ce77443231..00ec90a33f 100644 --- a/src/kauth/kaserver.h +++ b/src/kauth/kaserver.h @@ -148,7 +148,7 @@ struct kaOldKeys { extern struct kaheader cheader; extern struct kadstats dynamic_statistics; -extern afs_int32 myHost; +extern afs_uint32 myHost; extern int kaux_opendb(char *path); diff --git a/src/kauth/kautils.p.h b/src/kauth/kautils.p.h index 3504aa727e..2738a8b655 100644 --- a/src/kauth/kautils.p.h +++ b/src/kauth/kautils.p.h @@ -62,7 +62,7 @@ extern afs_int32 ka_GetAdminToken(char *name, char *instance, char *cell, extern afs_int32 ka_VerifyUserToken(char *name, char *instance, char *cell, struct ktc_encryptionKey *key); -extern void ka_ExplicitCell(char *cell, afs_int32 serverList[] +extern void ka_ExplicitCell(char *cell, afs_uint32 serverList[] ); extern afs_int32 ka_GetServers(char *cell, struct afsconf_cell *cellinfo); diff --git a/src/kauth/klog.c b/src/kauth/klog.c index f227decb11..ff5eb34761 100644 --- a/src/kauth/klog.c +++ b/src/kauth/klog.c @@ -155,7 +155,7 @@ CommandProc(struct cmd_syndesc *as, void *arock) char instance[MAXKTCNAMELEN]; char cell[MAXKTCREALMLEN]; char realm[MAXKTCREALMLEN]; - afs_int32 serverList[MAXSERVERS]; + afs_uint32 serverList[MAXSERVERS]; char *lcell; /* local cellname */ char lrealm[MAXKTCREALMLEN]; /* uppercase copy of local cellname */ int code; diff --git a/src/kauth/kpasswd.c b/src/kauth/kpasswd.c index e543743964..f937ccf729 100644 --- a/src/kauth/kpasswd.c +++ b/src/kauth/kpasswd.c @@ -202,7 +202,7 @@ CommandProc(struct cmd_syndesc *as, void *arock) char instance[MAXKTCNAMELEN] = ""; char cell[MAXKTCREALMLEN] = ""; char realm[MAXKTCREALMLEN] = ""; - afs_int32 serverList[MAXSERVERS]; + afs_uint32 serverList[MAXSERVERS]; char *lcell; /* local cellname */ int code; int i; diff --git a/src/kauth/manyklog.c b/src/kauth/manyklog.c index 5f217e1901..0e19395d1e 100644 --- a/src/kauth/manyklog.c +++ b/src/kauth/manyklog.c @@ -156,7 +156,7 @@ CommandProc(struct cmd_syndesc *as, void *arock) char instance[MAXKTCNAMELEN]; char cell[MAXKTCREALMLEN]; char realm[MAXKTCREALMLEN]; - afs_int32 serverList[MAXSERVERS]; + afs_uint32 serverList[MAXSERVERS]; char *lcell; /* local cellname */ char lrealm[MAXKTCREALMLEN]; /* uppercase copy of local cellname */ int code; diff --git a/src/ptserver/ptserver.c b/src/ptserver/ptserver.c index b9963fd87d..d6860ffc61 100644 --- a/src/ptserver/ptserver.c +++ b/src/ptserver/ptserver.c @@ -205,7 +205,7 @@ int main(int argc, char **argv) { register afs_int32 code; - afs_int32 myHost; + afs_uint32 myHost; register struct hostent *th; char hostname[64]; struct rx_service *tservice; @@ -444,7 +444,7 @@ main(int argc, char **argv) fprintf(stderr, "ptserver: couldn't get address of this host.\n"); PT_EXIT(1); } - memcpy(&myHost, th->h_addr, sizeof(afs_int32)); + memcpy(&myHost, th->h_addr, sizeof(afs_uint32)); /* get list of servers */ code = diff --git a/src/ptserver/ubik.c b/src/ptserver/ubik.c index 2124e6c179..befe081304 100644 --- a/src/ptserver/ubik.c +++ b/src/ptserver/ubik.c @@ -26,7 +26,7 @@ extern int dbase_fd; struct ubik_dbase *dbase; int -ubik_ServerInit(afs_int32 myHost, short myPort, afs_int32 serverList[], +ubik_ServerInit(afs_uint32 myHost, short myPort, afs_uint32 serverList[], const char *pathName, struct ubik_dbase **dbase) { return (0); diff --git a/src/ubik/Makefile.in b/src/ubik/Makefile.in index 7b9136e924..92ae7897c4 100644 --- a/src/ubik/Makefile.in +++ b/src/ubik/Makefile.in @@ -120,12 +120,7 @@ libubik.a: ${LIBOBJS} AFS_component_version_number.o disk.o: disk.c ${INCLS} uinit.o: uinit.c ${INCLS} remote.o: remote.c ${INCLS} - -# beacon.c uses signed and unsigned interchangably for IP addresses. Fixing -# will require changing the Ubik API beacon.o: beacon.c ${INCLS} - $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $< - lock.o: lock.c ${INCLS} recovery.o: recovery.c ${INCLS} ubik.o: ubik.c ${INCLS} diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index ee68a9e5f9..da06441ffc 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -54,10 +54,10 @@ int (*ubik_CRXSecurityProc) (void *rock, struct rx_securityClass **, void *ubik_CRXSecurityRock; afs_int32 ubikSecIndex; struct rx_securityClass *ubikSecClass; -static int ubeacon_InitServerListCommon(afs_int32 ame, +static int ubeacon_InitServerListCommon(afs_uint32 ame, struct afsconf_cell *info, char clones[], - afs_int32 aservers[]); + afs_uint32 aservers[]); static int verifyInterfaceAddress(afs_uint32 *ame, struct afsconf_cell *info, afs_uint32 aservers[]); static int updateUbikNetworkAddress(afs_uint32 ubik_host[UBIK_MAX_INTERFACE_ADDR]); @@ -145,7 +145,7 @@ ubeacon_AmSyncSite(void) * \see ubeacon_InitServerListCommon() */ int -ubeacon_InitServerListByInfo(afs_int32 ame, struct afsconf_cell *info, +ubeacon_InitServerListByInfo(afs_uint32 ame, struct afsconf_cell *info, char clones[]) { afs_int32 code; @@ -161,7 +161,7 @@ ubeacon_InitServerListByInfo(afs_int32 ame, struct afsconf_cell *info, * \see ubeacon_InitServerListCommon() */ int -ubeacon_InitServerList(afs_int32 ame, register afs_int32 aservers[]) +ubeacon_InitServerList(afs_uint32 ame, register afs_uint32 aservers[]) { afs_int32 code; @@ -197,8 +197,8 @@ ubeacon_InitServerList(afs_int32 ame, register afs_int32 aservers[]) * \see ubeacon_InitServerList(), ubeacon_InitServerListByInfo() */ int -ubeacon_InitServerListCommon(afs_int32 ame, struct afsconf_cell *info, - char clones[], register afs_int32 aservers[]) +ubeacon_InitServerListCommon(afs_uint32 ame, struct afsconf_cell *info, + char clones[], register afs_uint32 aservers[]) { register struct ubik_server *ts; afs_int32 me = -1; diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index 78e1402fe8..b35429049d 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -384,9 +384,9 @@ ContactQuorum_DISK_SetVersion(register struct ubik_trans *atrans, int aflags, * \see ubik_ServerInit(), ubik_ServerInitByInfo() */ int -ubik_ServerInitCommon(afs_int32 myHost, short myPort, +ubik_ServerInitCommon(afs_uint32 myHost, short myPort, struct afsconf_cell *info, char clones[], - afs_int32 serverList[], const char *pathName, + afs_uint32 serverList[], const char *pathName, struct ubik_dbase **dbase) { register struct ubik_dbase *tdb; @@ -569,7 +569,7 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort, * \see ubik_ServerInitCommon() */ int -ubik_ServerInitByInfo(afs_int32 myHost, short myPort, +ubik_ServerInitByInfo(afs_uint32 myHost, short myPort, struct afsconf_cell *info, char clones[], const char *pathName, struct ubik_dbase **dbase) { @@ -585,7 +585,7 @@ ubik_ServerInitByInfo(afs_int32 myHost, short myPort, * \see ubik_ServerInitCommon() */ int -ubik_ServerInit(afs_int32 myHost, short myPort, afs_int32 serverList[], +ubik_ServerInit(afs_uint32 myHost, short myPort, afs_uint32 serverList[], const char *pathName, struct ubik_dbase **dbase) { afs_int32 code; diff --git a/src/ubik/ubik.p.h b/src/ubik/ubik.p.h index a061b53cb6..bbf832ec44 100644 --- a/src/ubik/ubik.p.h +++ b/src/ubik/ubik.p.h @@ -443,10 +443,10 @@ extern afs_uint32 ubikGetPrimaryInterfaceAddr(afs_uint32 addr); struct afsconf_cell; extern void ubeacon_Debug(struct ubik_debug *aparm); extern int ubeacon_AmSyncSite(void); -extern int ubeacon_InitServerListByInfo(afs_int32 ame, - struct afsconf_cell *info, +extern int ubeacon_InitServerListByInfo(afs_uint32 ame, + struct afsconf_cell *info, char clones[]); -extern int ubeacon_InitServerList(afs_int32 ame, afs_int32 aservers[]); +extern int ubeacon_InitServerList(afs_uint32 ame, afs_uint32 aservers[]); extern void *ubeacon_Interact(void *); /*\}*/ @@ -499,12 +499,12 @@ extern afs_int32 ubik_nBuffers; /*! \name ubik.c */ struct afsconf_cell; -extern int ubik_ServerInitByInfo(afs_int32 myHost, short myPort, +extern int ubik_ServerInitByInfo(afs_uint32 myHost, short myPort, struct afsconf_cell *info, char clones[], const char *pathName, struct ubik_dbase **dbase); -extern int ubik_ServerInit(afs_int32 myHost, short myPort, - afs_int32 serverList[], +extern int ubik_ServerInit(afs_uint32 myHost, short myPort, + afs_uint32 serverList[], const char *pathName, struct ubik_dbase **dbase); extern int ubik_BeginTrans(register struct ubik_dbase *dbase, afs_int32 transMode, struct ubik_trans **transPtr); @@ -541,7 +541,7 @@ extern int ubik_CheckCache(struct ubik_trans *atrans, /*! \name ubikclient.c */ -extern int ubik_ParseClientList(int argc, char **argv, afs_int32 * aothers); +extern int ubik_ParseClientList(int argc, char **argv, afs_uint32 * aothers); extern unsigned int afs_random(void); extern int ubik_ClientInit(register struct rx_connection **serverconns, struct ubik_client **aclient); @@ -562,8 +562,8 @@ extern afs_int32 ubik_Call_New(int (*aproc) (), register struct ubik_client /*\}*/ /* \name ubikcmd.c */ -extern int ubik_ParseServerList(int argc, char **argv, afs_int32 *ahost, - afs_int32 *aothers); +extern int ubik_ParseServerList(int argc, char **argv, afs_uint32 *ahost, + afs_uint32 *aothers); /*\}*/ /* \name uinit.c */ diff --git a/src/ubik/ubikclient.c b/src/ubik/ubikclient.c index d1af899bbe..59633c29d3 100644 --- a/src/ubik/ubikclient.c +++ b/src/ubik/ubikclient.c @@ -47,12 +47,13 @@ short ubik_initializationState; /*!< initial state is zero */ * \brief Parse list for clients. */ int -ubik_ParseClientList(int argc, char **argv, afs_int32 * aothers) +ubik_ParseClientList(int argc, char **argv, afs_uint32 * aothers) { register afs_int32 i; register char *tp; register struct hostent *th; - afs_int32 temp, counter; + afs_uint32 temp; + afs_int32 counter; int inServer; inServer = 0; /* haven't seen -servers yet */ diff --git a/src/ubik/ubikcmd.c b/src/ubik/ubikcmd.c index a51ac4bc8e..a354d99bd7 100644 --- a/src/ubik/ubikcmd.c +++ b/src/ubik/ubikcmd.c @@ -36,21 +36,22 @@ * applications. */ int -ubik_ParseServerList(int argc, char **argv, afs_int32 *ahost, - afs_int32 *aothers) +ubik_ParseServerList(int argc, char **argv, afs_uint32 *ahost, + afs_uint32 *aothers) { register afs_int32 i; register char *tp; register struct hostent *th; char hostname[64]; - afs_int32 myHost, temp, counter; + afs_uint32 myHost, temp; + afs_int32 counter; int inServer, sawServer; gethostname(hostname, sizeof(hostname)); th = gethostbyname(hostname); if (!th) return UBADHOST; - memcpy(&myHost, th->h_addr, sizeof(afs_int32)); + memcpy(&myHost, th->h_addr, sizeof(afs_uint32)); *ahost = myHost; inServer = 0; /* haven't seen -servers yet */ @@ -68,7 +69,7 @@ ubik_ParseServerList(int argc, char **argv, afs_int32 *ahost, th = gethostbyname(tp); if (!th) return UBADHOST; - memcpy(&temp, th->h_addr, sizeof(afs_int32)); + memcpy(&temp, th->h_addr, sizeof(afs_uint32)); if (temp != myHost) { if (counter++ >= MAXSERVERS) return UNHOSTS; diff --git a/src/ubik/utst_client.c b/src/ubik/utst_client.c index c8c1f0bb78..44f85fa6c2 100644 --- a/src/ubik/utst_client.c +++ b/src/ubik/utst_client.c @@ -39,7 +39,7 @@ main(int argc, char **argv) { register afs_int32 code; struct ubik_client *cstruct = 0; - afs_int32 serverList[MAXSERVERS]; + afs_uint32 serverList[MAXSERVERS]; struct rx_connection *serverconns[MAXSERVERS]; struct rx_securityClass *sc; register afs_int32 i; diff --git a/src/ubik/utst_server.c b/src/ubik/utst_server.c index ca995ae5cc..2ca01501f0 100644 --- a/src/ubik/utst_server.c +++ b/src/ubik/utst_server.c @@ -278,8 +278,8 @@ int main(int argc, char **argv) { register afs_int32 code, i; - afs_int32 serverList[MAXSERVERS]; - afs_int32 myHost; + afs_uint32 serverList[MAXSERVERS]; + afs_uint32 myHost; struct rx_service *tservice; struct rx_securityClass *sc[2]; char dbfileName[128]; diff --git a/src/vlserver/vlserver.c b/src/vlserver/vlserver.c index e96fcbb07c..448d0f510f 100644 --- a/src/vlserver/vlserver.c +++ b/src/vlserver/vlserver.c @@ -132,7 +132,7 @@ int main(int argc, char **argv) { register afs_int32 code; - afs_int32 myHost; + afs_uint32 myHost; struct rx_service *tservice; struct rx_securityClass **securityClasses; afs_int32 numClasses; @@ -300,7 +300,7 @@ main(int argc, char **argv) hostname); exit(1); } - memcpy(&myHost, th->h_addr, sizeof(afs_int32)); + memcpy(&myHost, th->h_addr, sizeof(afs_uint32)); #if !defined(AFS_HPUX_ENV) && !defined(AFS_NT40_ENV) signal(SIGXCPU, CheckSignal_Signal);