From 65e7d10ca9fb6d70504bb182b770af49210e1dfb Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 16 Jul 2007 01:02:16 +0000 Subject: [PATCH] DEVEL15-libadmin-ubik_call-20070715 replace all calls to ubik_Call(FOO, ...) with ubik_FOO(...) correct the incorrect parameter lists for ubik_FOO() (cherry picked from commit 82cb8884c8c962c7fbc3fc75f923e3dfdfc24a76) --- src/libadmin/client/afs_clientAdmin.c | 13 +++-- src/libadmin/kas/afs_kasAdmin.c | 47 +++++++++-------- src/libadmin/pts/afs_ptsAdmin.c | 71 ++++++++++++++------------ src/libadmin/pts/afs_ptsAdmin.h | 4 +- src/libadmin/vos/afs_vosAdmin.c | 24 +++++---- src/libadmin/vos/vosutils.c | 29 +++++------ src/libadmin/vos/vsprocs.c | 72 +++++++++++++-------------- 7 files changed, 143 insertions(+), 117 deletions(-) diff --git a/src/libadmin/client/afs_clientAdmin.c b/src/libadmin/client/afs_clientAdmin.c index b84426048..f2183ceb6 100644 --- a/src/libadmin/client/afs_clientAdmin.c +++ b/src/libadmin/client/afs_clientAdmin.c @@ -193,7 +193,8 @@ afsclient_TokenGetExisting(const char *cellName, void **tokenHandle, * The token has been retrieved successfully, initialize * the rest of the token handle structure */ - strcpy(t_handle->cell, cellName); + strncpy(t_handle->cell, cellName, MAXCELLCHARS); + t_handle->cell[MAXCELLCHARS - 1] = '\0'; t_handle->afs_token_set = 1; t_handle->from_kernel = 1; t_handle->kas_token_set = 0; @@ -568,7 +569,8 @@ afsclient_TokenGetNew(const char *cellName, const char *principal, if ((GetAFSToken(cellName, principal, password, t_handle, &tst)) && (GetKASToken(cellName, principal, password, t_handle, &tst))) { - strcpy(t_handle->cell, cellName); + strncpy(t_handle->cell, cellName, MAXCELLCHARS); + t_handle->cell[MAXCELLCHARS - 1] = '\0'; t_handle->from_kernel = 0; t_handle->afs_token_set = 1; t_handle->kas_token_set = 1; @@ -868,7 +870,8 @@ afsclient_CellOpen(const char *cellName, const void *tokenHandle, * information for each server in the cell */ - strcpy(c_handle->working_cell, cellName); + strncpy(c_handle->working_cell, cellName, MAXCELLCHARS); + c_handle->working_cell[MAXCELLCHARS - 1] = '\0'; if (!(tdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) { tst = ADMCLIENTBADCLIENTCONFIG; goto fail_afsclient_CellOpen; @@ -878,7 +881,8 @@ afsclient_CellOpen(const char *cellName, const void *tokenHandle, * We must copy the cellName here because afsconf_GetCellInfo * actually writes over the cell name it is passed. */ - strncpy(copyCell, cellName, MAXCELLCHARS - 1); + strncpy(copyCell, cellName, MAXCELLCHARS); + copyCell[MAXCELLCHARS - 1] ='\0'; for (i = 0; (i < NUM_SERVER_TYPES); i++) { if (i == KAS) { tst = @@ -1963,6 +1967,7 @@ afsclient_AFSServerGetBegin(const void *cellHandle, void **iterationIdP, if (host != NULL) { strncpy(serv->server[iserv].serverName, host->h_name, AFS_MAX_SERVER_NAME_LEN); + serv->server[iserv].serverName[AFS_MAX_SERVER_NAME_LEN - 1] = '\0'; } } UNLOCK_GLOBAL_MUTEX; diff --git a/src/libadmin/kas/afs_kasAdmin.c b/src/libadmin/kas/afs_kasAdmin.c index 620f75acd..468b72583 100644 --- a/src/libadmin/kas/afs_kasAdmin.c +++ b/src/libadmin/kas/afs_kasAdmin.c @@ -35,8 +35,6 @@ RCSID #undef ENCRYPT -extern int ubik_Call(); - typedef struct { int begin_magic; int is_valid; @@ -539,7 +537,8 @@ kas_PrincipalCreate(const void *cellHandle, const void *serverHandle, afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle; kas_server_p k_handle = (kas_server_p) serverHandle; kas_server_t kaserver; - struct kas_encryptionKey key; + EncryptionKey key; + struct kas_encryptionKey kas_key; /* * Validate input arguments and make rpc. @@ -559,12 +558,14 @@ kas_PrincipalCreate(const void *cellHandle, const void *serverHandle, goto fail_kas_PrincipalCreate; } - if (!kas_StringToKey(kaserver.cell, password, &key, &tst)) { + if (!kas_StringToKey(kaserver.cell, password, &kas_key, &tst)) { goto fail_kas_PrincipalCreate; } + memcpy(&key, &kas_key, sizeof(key)); + tst = - ubik_Call(KAM_CreateUser, kaserver.servers, 0, who->principal, + ubik_KAM_CreateUser(kaserver.servers, 0, who->principal, who->instance, key); if (tst) { goto fail_kas_PrincipalCreate; @@ -624,7 +625,7 @@ kas_PrincipalDelete(const void *cellHandle, const void *serverHandle, goto fail_kas_PrincipalDelete; } tst = - ubik_Call(KAM_DeleteUser, kaserver.servers, 0, who->principal, + ubik_KAM_DeleteUser(kaserver.servers, 0, who->principal, who->instance); if (tst) { goto fail_kas_PrincipalDelete; @@ -802,7 +803,7 @@ kas_PrincipalGet(const void *cellHandle, const void *serverHandle, } tst = - ubik_Call(KAM_GetEntry, kaserver.servers, 0, who->principal, + ubik_KAM_GetEntry(kaserver.servers, 0, who->principal, who->instance, KAMAJORVERSION, &entry); if (tst) { goto fail_kas_PrincipalGet; @@ -858,8 +859,8 @@ GetPrincipalRPC(void *rpc_specific, int slot, int *last_item, principal_get_p prin = (principal_get_p) rpc_specific; tst = - ubik_Call(KAM_ListEntry, prin->kaserver.servers, 0, prin->current, - &prin->next, &prin->count, &prin->principal[slot]); + ubik_KAM_ListEntry(prin->kaserver.servers, 0, prin->current, + &prin->next, &prin->count, (kaident *)&prin->principal[slot]); if (tst == 0) { prin->current = prin->next; if (prin->next == 0) { @@ -1109,13 +1110,14 @@ kas_PrincipalGetDone(const void *iterationIdP, afs_status_p st) int ADMINAPI kas_PrincipalKeySet(const void *cellHandle, const void *serverHandle, const kas_identity_p who, int keyVersion, - const kas_encryptionKey_p key, afs_status_p st) + const kas_encryptionKey_p kas_keyp, afs_status_p st) { int rc = 0; afs_status_t tst = 0; afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle; kas_server_p k_handle = (kas_server_p) serverHandle; kas_server_t kaserver; + EncryptionKey key; /* * Validate input arguments and make rpc. @@ -1126,7 +1128,7 @@ kas_PrincipalKeySet(const void *cellHandle, const void *serverHandle, goto fail_kas_PrincipalKeySet; } - if (key == NULL) { + if (kas_keyp == NULL) { tst = ADMKASKEYNULL; goto fail_kas_PrincipalKeySet; } @@ -1135,9 +1137,12 @@ kas_PrincipalKeySet(const void *cellHandle, const void *serverHandle, goto fail_kas_PrincipalKeySet; } + memcpy(&key, kas_keyp, sizeof(key)); + tst = - ubik_Call(KAM_SetPassword, kaserver.servers, 0, who->principal, - who->instance, keyVersion, *key); + ubik_KAM_SetPassword(kaserver.servers, 0, who->principal, + who->instance, keyVersion, key); + memset(&key, 0, sizeof(key)); if (tst) { goto fail_kas_PrincipalKeySet; } @@ -1311,7 +1316,7 @@ getPrincipalFlags(const void *cellHandle, const void *serverHandle, } tst = - ubik_Call(KAM_GetEntry, kaserver.servers, 0, who->principal, + ubik_KAM_GetEntry(kaserver.servers, 0, who->principal, who->instance, KAMAJORVERSION, &tentry); if (tst == 0) { *cur_flags = tentry.flags; @@ -1518,7 +1523,7 @@ kas_PrincipalFieldsSet(const void *cellHandle, const void *serverHandle, goto fail_kas_PrincipalFieldsSet; } tst = - ubik_Call(KAM_SetFields, kaserver.servers, 0, who->principal, + ubik_KAM_SetFields(kaserver.servers, 0, who->principal, who->instance, flags, expiration, lifetime, -1, was_spare, 0); if (tst == 0) { @@ -1584,7 +1589,7 @@ kas_ServerStatsGet(const void *cellHandle, const void *serverHandle, } tst = - ubik_Call(KAM_GetStats, kaserver.servers, 0, KAMAJORVERSION, &admins, + ubik_KAM_GetStats(kaserver.servers, 0, KAMAJORVERSION, &admins, &statics, &dynamics); if (tst) { goto fail_kas_ServerStatsGet; @@ -1672,7 +1677,7 @@ kas_ServerDebugGet(const void *cellHandle, const void *serverHandle, if (!ChooseValidServer(c_handle, k_handle, &kaserver, &tst)) { goto fail_kas_ServerDebugGet; } - tst = ubik_Call(KAM_Debug, kaserver.servers, 0, KAMAJORVERSION, 0, &info); + tst = ubik_KAM_Debug(kaserver.servers, 0, KAMAJORVERSION, 0, &info); if (tst) { goto fail_kas_ServerDebugGet; } @@ -1741,19 +1746,20 @@ kas_ServerDebugGet(const void *cellHandle, const void *serverHandle, int ADMINAPI kas_ServerRandomKeyGet(const void *cellHandle, const void *serverHandle, - kas_encryptionKey_p key, afs_status_p st) + kas_encryptionKey_p kas_keyp, afs_status_p st) { int rc = 0; afs_status_t tst = 0; afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle; kas_server_p k_handle = (kas_server_p) serverHandle; kas_server_t kaserver; + EncryptionKey key; /* * Validate input arguments and make rpc. */ - if (key == NULL) { + if (kas_keyp == NULL) { tst = ADMKASKEYNULL; goto fail_kas_ServerRandomKeyGet; } @@ -1762,10 +1768,11 @@ kas_ServerRandomKeyGet(const void *cellHandle, const void *serverHandle, goto fail_kas_ServerRandomKeyGet; } - tst = ubik_Call(KAM_GetRandomKey, kaserver.servers, 0, key); + tst = ubik_KAM_GetRandomKey(kaserver.servers, 0, &key); if (tst) { goto fail_kas_ServerRandomKeyGet; } + memcpy(kas_keyp, &key, sizeof(*kas_keyp)); rc = 1; fail_kas_ServerRandomKeyGet: diff --git a/src/libadmin/pts/afs_ptsAdmin.c b/src/libadmin/pts/afs_ptsAdmin.c index 02b5a7075..f46764b70 100644 --- a/src/libadmin/pts/afs_ptsAdmin.c +++ b/src/libadmin/pts/afs_ptsAdmin.c @@ -124,7 +124,7 @@ TranslatePTSNames(const afs_cell_handle_p cellHandle, namelist * names, } } - tst = ubik_Call(PR_NameToID, cellHandle->pts, 0, names, ids); + tst = ubik_PR_NameToID(cellHandle->pts, 0, names, ids); if (tst) { goto fail_TranslatePTSNames; @@ -200,7 +200,9 @@ TranslateTwoNames(const afs_cell_handle_p c_handle, const char *id1, names.namelist_val = (prname *) & tmp_array[0]; strncpy(names.namelist_val[0], id1, PTS_MAX_NAME_LEN); + names.namelist_val[0][PTS_MAX_NAME_LEN - 1] = '\0'; strncpy(names.namelist_val[1], id2, PTS_MAX_NAME_LEN); + names.namelist_val[1][PTS_MAX_NAME_LEN - 1] = '\0'; ids->idlist_val = 0; ids->idlist_len = 0; @@ -277,7 +279,8 @@ TranslateOneName(const afs_cell_handle_p c_handle, const char *ptsName, names[0].namelist_len = 1; names[0].namelist_val = (prname *) & tmp_array[0]; - strncpy(names[0].namelist_val, ptsName, PTS_MAX_NAME_LEN); + strncpy((char *)names[0].namelist_val, ptsName, PTS_MAX_NAME_LEN); + ((char *)names[0].namelist_val)[PTS_MAX_NAME_LEN - 1] = '\0'; ids.idlist_val = 0; ids.idlist_len = 0; @@ -344,7 +347,7 @@ TranslatePTSIds(const afs_cell_handle_p cellHandle, namelist * names, int rc = 0; afs_status_t tst = 0; - tst = ubik_Call(PR_IDToName, cellHandle->pts, 0, ids, names); + tst = ubik_PR_IDToName(cellHandle->pts, 0, ids, names); if (tst) { goto fail_TranslatePTSIds; @@ -419,7 +422,7 @@ pts_GroupMemberAdd(const void *cellHandle, const char *userName, */ tst = - ubik_Call(PR_AddToGroup, c_handle->pts, 0, ids.idlist_val[0], + ubik_PR_AddToGroup(c_handle->pts, 0, ids.idlist_val[0], ids.idlist_val[1]); if (tst != 0) { @@ -499,7 +502,7 @@ pts_GroupOwnerChange(const void *cellHandle, const char *targetGroup, */ tst = - ubik_Call(PR_ChangeEntry, c_handle->pts, 0, ids.idlist_val[1], "", + ubik_PR_ChangeEntry(c_handle->pts, 0, ids.idlist_val[1], "", ids.idlist_val[0], 0); if (tst != 0) { @@ -596,11 +599,11 @@ pts_GroupCreate(const void *cellHandle, const char *newGroup, if (*newGroupId != 0) { tst = - ubik_Call(PR_INewEntry, c_handle->pts, 0, newGroup, *newGroupId, + ubik_PR_INewEntry(c_handle->pts, 0, newGroup, *newGroupId, newOwnerId); } else { tst = - ubik_Call(PR_NewEntry, c_handle->pts, 0, newGroup, PRGRP, + ubik_PR_NewEntry(c_handle->pts, 0, newGroup, PRGRP, newOwnerId, newGroupId); } @@ -722,7 +725,7 @@ pts_GroupGet(const void *cellHandle, const char *groupName, * Retrieve information about the group */ - tst = ubik_Call(PR_ListEntry, c_handle->pts, 0, groupId, &groupEntry); + tst = ubik_PR_ListEntry(c_handle->pts, 0, groupId, &groupEntry); if (tst != 0) { goto fail_pts_GroupGet; @@ -732,7 +735,8 @@ pts_GroupGet(const void *cellHandle, const char *groupName, groupP->nameUid = groupEntry.id; groupP->ownerUid = groupEntry.owner; groupP->creatorUid = groupEntry.creator; - strcpy(groupP->name, groupEntry.name); + strncpy(groupP->name, groupEntry.name, PTS_MAX_NAME_LEN); + groupP->name[PTS_MAX_NAME_LEN - 1] = '\0'; /* * Set the access rights based upon the value of the flags member * of the groupEntry struct. @@ -821,8 +825,10 @@ pts_GroupGet(const void *cellHandle, const char *groupName, goto fail_pts_GroupGet; } - strcpy(groupP->owner, names.namelist_val[0]); - strcpy(groupP->creator, names.namelist_val[1]); + strncpy(groupP->owner, names.namelist_val[0], PTS_MAX_NAME_LEN); + groupP->owner[PTS_MAX_NAME_LEN - 1] = '\0'; + strncpy(groupP->creator, names.namelist_val[1], PTS_MAX_NAME_LEN); + groupP->creator[PTS_MAX_NAME_LEN - 1] = '\0'; free(names.namelist_val); rc = 1; @@ -894,7 +900,7 @@ EntryDelete(const void *cellHandle, const char *entryName, * Make the rpc */ - tst = ubik_Call(PR_Delete, c_handle->pts, 0, entryId); + tst = ubik_PR_Delete(c_handle->pts, 0, entryId); if (tst != 0) { goto fail_EntryDelete; @@ -981,7 +987,7 @@ pts_GroupMaxGet(const void *cellHandle, int *maxGroupId, afs_status_p st) goto fail_pts_GroupMaxGet; } - tst = ubik_Call(PR_ListMax, c_handle->pts, 0, &maxUserId, maxGroupId); + tst = ubik_PR_ListMax(c_handle->pts, 0, &maxUserId, maxGroupId); if (tst != 0) { goto fail_pts_GroupMaxGet; @@ -1031,7 +1037,7 @@ pts_GroupMaxSet(const void *cellHandle, int maxGroupId, afs_status_p st) goto fail_pts_GroupMaxSet; } - tst = ubik_Call(PR_SetMax, c_handle->pts, 0, maxGroupId, PRGRP); + tst = ubik_PR_SetMax(c_handle->pts, 0, maxGroupId, PRGRP); if (tst != 0) { goto fail_pts_GroupMaxSet; @@ -1202,7 +1208,7 @@ MemberListBegin(const void *cellHandle, const char *name, afs_status_t error1, iter->ids.prlist_val = 0; tst = - ubik_Call(PR_ListElements, c_handle->pts, 0, groupId, &iter->ids, + ubik_PR_ListElements(c_handle->pts, 0, groupId, &iter->ids, &exceeded); if (tst != 0) { @@ -1510,7 +1516,7 @@ pts_GroupMemberRemove(const void *cellHandle, const char *userName, */ tst = - ubik_Call(PR_RemoveFromGroup, c_handle->pts, 0, ids.idlist_val[0], + ubik_PR_RemoveFromGroup(c_handle->pts, 0, ids.idlist_val[0], ids.idlist_val[1]); if (tst != 0) { @@ -1592,7 +1598,7 @@ pts_GroupRename(const void *cellHandle, const char *oldName, * Make the rpc */ - tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, groupId, newName, 0, 0); + tst = ubik_PR_ChangeEntry(c_handle->pts, 0, groupId, newName, 0, 0); if (tst != 0) { goto fail_pts_GroupRename; @@ -1751,7 +1757,7 @@ pts_GroupModify(const void *cellHandle, const char *groupName, */ tst = - ubik_Call(PR_SetFieldsEntry, c_handle->pts, 0, groupId, PR_SF_ALLBITS, + ubik_PR_SetFieldsEntry(c_handle->pts, 0, groupId, PR_SF_ALLBITS, flags, 0, 0, 0, 0); if (tst != 0) { @@ -1823,11 +1829,11 @@ pts_UserCreate(const void *cellHandle, const char *userName, int *newUserId, if (*newUserId != 0) { tst = - ubik_Call(PR_INewEntry, c_handle->pts, 0, userName, *newUserId, + ubik_PR_INewEntry(c_handle->pts, 0, userName, *newUserId, 0); } else { tst = - ubik_Call(PR_NewEntry, c_handle->pts, 0, userName, 0, 0, + ubik_PR_NewEntry(c_handle->pts, 0, userName, 0, 0, newUserId); } @@ -1945,7 +1951,7 @@ IsAdministrator(const afs_cell_handle_p c_handle, afs_int32 userId, goto fail_IsAdministrator; } tst = - ubik_Call(PR_IsAMemberOf, c_handle->pts, 0, userId, adminId, + ubik_PR_IsAMemberOf(c_handle->pts, 0, userId, adminId, &isAdmin); if (tst != 0) { goto fail_IsAdministrator; @@ -2035,7 +2041,7 @@ pts_UserGet(const void *cellHandle, const char *userName, * Retrieve information about the group */ - tst = ubik_Call(PR_ListEntry, c_handle->pts, 0, userId, &userEntry); + tst = ubik_PR_ListEntry(c_handle->pts, 0, userId, &userEntry); if (tst != 0) { goto fail_pts_UserGet; @@ -2060,7 +2066,8 @@ pts_UserGet(const void *cellHandle, const char *userName, userP->nameUid = userEntry.id; userP->ownerUid = userEntry.owner; userP->creatorUid = userEntry.creator; - strcpy(userP->name, userEntry.name); + strncpy(userP->name, userEntry.name, PTS_MAX_NAME_LEN); + userP->name[PTS_MAX_NAME_LEN - 1] = '\0'; /* * The permission bits are described in the GroupGet function above. @@ -2104,8 +2111,10 @@ pts_UserGet(const void *cellHandle, const char *userName, goto fail_pts_UserGet; } - strcpy(userP->owner, names.namelist_val[0]); - strcpy(userP->creator, names.namelist_val[1]); + strncpy(userP->owner, names.namelist_val[0], PTS_MAX_NAME_LEN); + userP->owner[PTS_MAX_NAME_LEN - 1] ='\0'; + strncpy(userP->creator, names.namelist_val[1], PTS_MAX_NAME_LEN); + userP->creator[PTS_MAX_NAME_LEN - 1] = '\0'; free(names.namelist_val); rc = 1; @@ -2179,7 +2188,7 @@ pts_UserRename(const void *cellHandle, const char *oldName, * Make the rpc */ - tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, userId, newName, 0, 0); + tst = ubik_PR_ChangeEntry(c_handle->pts, 0, userId, newName, 0, 0); if (tst != 0) { goto fail_pts_UserRename; @@ -2323,7 +2332,7 @@ pts_UserModify(const void *cellHandle, const char *userName, */ tst = - ubik_Call(PR_SetFieldsEntry, c_handle->pts, 0, userId, mask, flags, + ubik_PR_SetFieldsEntry(c_handle->pts, 0, userId, mask, flags, newQuota, 0, 0, 0); if (tst != 0) { @@ -2380,7 +2389,7 @@ pts_UserMaxGet(const void *cellHandle, int *maxUserId, afs_status_p st) goto fail_pts_UserMaxGet; } - tst = ubik_Call(PR_ListMax, c_handle->pts, 0, maxUserId, &maxGroupId); + tst = ubik_PR_ListMax(c_handle->pts, 0, maxUserId, &maxGroupId); if (tst != 0) { goto fail_pts_UserMaxGet; @@ -2430,7 +2439,7 @@ pts_UserMaxSet(const void *cellHandle, int maxUserId, afs_status_p st) goto fail_pts_UserMaxSet; } - tst = ubik_Call(PR_SetMax, c_handle->pts, 0, maxUserId, 0); + tst = ubik_PR_SetMax(c_handle->pts, 0, maxUserId, 0); if (tst != 0) { goto fail_pts_UserMaxSet; @@ -2595,7 +2604,7 @@ GetOwnedGroupRPC(void *rpc_specific, int slot, int *last_item, if ((!list->finished_retrieving) && (list->owned_names.namelist_len == 0)) { tst = - ubik_Call(PR_ListOwned, list->c_handle->pts, 0, list->owner, + ubik_PR_ListOwned(list->c_handle->pts, 0, list->owner, &list->owned_ids, &list->more); if (tst != 0) { goto fail_GetOwnedGroupRPC; @@ -2940,7 +2949,7 @@ GetPTSRPC(void *rpc_specific, int slot, int *last_item, bulkentries.prentries_len = 0; tst = - ubik_Call(PR_ListEntries, list->c_handle->pts, 0, list->flag, + ubik_PR_ListEntries(list->c_handle->pts, 0, list->flag, start, &bulkentries, &(list->nextstartindex)); if (tst != 0) { diff --git a/src/libadmin/pts/afs_ptsAdmin.h b/src/libadmin/pts/afs_ptsAdmin.h index b8ae24884..d55e55419 100644 --- a/src/libadmin/pts/afs_ptsAdmin.h +++ b/src/libadmin/pts/afs_ptsAdmin.h @@ -13,8 +13,8 @@ #include #include -#define PTS_MAX_NAME_LEN 64 -#define PTS_MAX_GROUPS 5000 +#define PTS_MAX_NAME_LEN 64 /* must equal PR_MAXNAMELEN */ +#define PTS_MAX_GROUPS 5000 /* must equal PR_MAXGROUPS */ typedef enum { PTS_USER_OWNER_ACCESS, diff --git a/src/libadmin/vos/afs_vosAdmin.c b/src/libadmin/vos/afs_vosAdmin.c index b28c3d8a6..9c14c13c7 100644 --- a/src/libadmin/vos/afs_vosAdmin.c +++ b/src/libadmin/vos/afs_vosAdmin.c @@ -567,8 +567,10 @@ vos_PartitionGet(const void *cellHandle, const void *serverHandle, if (tst) { goto fail_vos_PartitionGet; } - strcpy(partitionP->name, part_info.name); - strcpy(partitionP->deviceName, part_info.devName); + strncpy(partitionP->name, part_info.name, VOS_MAX_PARTITION_NAME_LEN); + partitionP->name[VOS_MAX_PARTITION_NAME_LEN-1] = '\0'; + strncpy(partitionP->deviceName, part_info.devName, VOS_MAX_PARTITION_NAME_LEN); + partitionP->deviceName[VOS_MAX_PARTITION_NAME_LEN-1] = '\0'; partitionP->lockFileDescriptor = part_info.lock_fd; partitionP->totalSpace = part_info.minFree; partitionP->totalFreeSpace = part_info.free; @@ -1215,7 +1217,7 @@ GetServerRPC(void *rpc_specific, int slot, int *last_item, addr_multi.bulkaddrs_val = 0; addr_multi.bulkaddrs_len = 0; tst = - ubik_Call(VL_GetAddrsU, serv->vldb, 0, &m_attrs, &m_uuid, + ubik_VL_GetAddrsU(serv->vldb, 0, &m_attrs, &m_uuid, &m_unique, &total_multi, &addr_multi); if (tst) { goto fail_GetServerRPC; @@ -1880,7 +1882,8 @@ copyVLDBEntry(struct nvldbentry *source, vos_vldbEntry_p dest, dest->status |= VOS_VLDB_ENTRY_BACKEXISTS; } - strcpy(dest->name, source->name); + strncpy(dest->name, source->name, VOS_MAX_VOLUME_NAME_LEN); + dest->name[VOS_MAX_VOLUME_NAME_LEN - 1] = '\0'; for (i = 0; i < VOS_MAX_REPLICA_SITES; i++) { dest->volumeSites[i].serverAddress = source->serverNumber[i]; dest->volumeSites[i].serverPartition = source->serverPartition[i]; @@ -2354,7 +2357,7 @@ vos_VLDBEntryRemove(const void *cellHandle, const void *serverHandle, */ if (volumeId != NULL) { - tst = ubik_Call(VL_DeleteEntry, c_handle->vos, 0, *volumeId, -1); + tst = ubik_VL_DeleteEntry(c_handle->vos, 0, *volumeId, -1); if (tst != 0) { goto fail_vos_VLDBEntryRemove; } @@ -2392,8 +2395,8 @@ vos_VLDBEntryRemove(const void *cellHandle, const void *serverHandle, } for (i = 0; i < nentries; i++) { - ubik_Call(VL_DeleteEntry, c_handle->vos, 0, - entries.nbulkentries_val[i].volumeId[RWVOL]); + ubik_VL_DeleteEntry(c_handle->vos, 0, + entries.nbulkentries_val[i].volumeId[RWVOL], -1); } rc = 1; @@ -2546,7 +2549,7 @@ vos_VLDBEntryLock(const void *cellHandle, vos_MessageCallBack_t callBack, goto fail_vos_VLDBEntryLock; } - tst = ubik_Call(VL_SetLock, c_handle->vos, 0, volumeId, -1, VLOP_DELETE); + tst = ubik_VL_SetLock(c_handle->vos, 0, volumeId, -1, VLOP_DELETE); if (tst != 0) { goto fail_vos_VLDBEntryLock; } @@ -2600,7 +2603,7 @@ vos_VLDBEntryUnlock(const void *cellHandle, vos_MessageCallBack_t callBack, tst = - ubik_Call(VL_ReleaseLock, c_handle->vos, 0, volumeId, -1, + ubik_VL_ReleaseLock(c_handle->vos, 0, volumeId, -1, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); if (tst != 0) { goto fail_vos_VLDBEntryUnlock; @@ -3545,7 +3548,8 @@ copyvolintXInfo(struct volintXInfo *source, vos_volumeEntry_p dest, */ if (dest->status == VOS_OK) { - strcpy(dest->name, source->name); + strncpy(dest->name, source->name, VOS_MAX_VOLUME_NAME_LEN); + dest->name[VOS_MAX_VOLUME_NAME_LEN - 1] = '\0'; dest->id = source->volid; if (source->type == 0) { dest->type = VOS_READ_WRITE_VOLUME; diff --git a/src/libadmin/vos/vosutils.c b/src/libadmin/vos/vosutils.c index 6c6518619..f74602c36 100644 --- a/src/libadmin/vos/vosutils.c +++ b/src/libadmin/vos/vosutils.c @@ -108,7 +108,7 @@ VLDB_CreateEntry(afs_cell_handle_p cellHandle, struct nvldbentry *entryp, do { if (cellHandle->vos_new) { - tst = ubik_Call(VL_CreateEntryN, cellHandle->vos, 0, entryp); + tst = ubik_VL_CreateEntryN(cellHandle->vos, 0, entryp); if (tst) { if (tst == RXGEN_OPCODE) { cellHandle->vos_new = 0; @@ -118,7 +118,7 @@ VLDB_CreateEntry(afs_cell_handle_p cellHandle, struct nvldbentry *entryp, } } else { if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) { - tst = ubik_Call(VL_CreateEntry, cellHandle->vos, 0, &oentry); + tst = ubik_VL_CreateEntry(cellHandle->vos, 0, &oentry); if (!tst) { rc = 1; } @@ -144,7 +144,7 @@ aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, do { if (cellHandle->vos_new) { tst = - ubik_Call(VL_GetEntryByIDN, cellHandle->vos, 0, volid, + ubik_VL_GetEntryByIDN(cellHandle->vos, 0, volid, voltype, entryp); if (tst) { if (tst == RXGEN_OPCODE) { @@ -155,7 +155,7 @@ aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid, } } else { tst = - ubik_Call(VL_GetEntryByID, cellHandle->vos, 0, volid, voltype, + ubik_VL_GetEntryByID(cellHandle->vos, 0, volid, voltype, &oentry); if (tst == 0) { rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst); @@ -181,7 +181,7 @@ aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep, do { if (cellHandle->vos_new) { tst = - ubik_Call(VL_GetEntryByNameN, cellHandle->vos, 0, namep, + ubik_VL_GetEntryByNameN(cellHandle->vos, 0, namep, entryp); if (tst) { if (tst == RXGEN_OPCODE) { @@ -192,7 +192,7 @@ aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep, } } else { tst = - ubik_Call(VL_GetEntryByNameO, cellHandle->vos, 0, namep, + ubik_VL_GetEntryByNameO(cellHandle->vos, 0, namep, &oentry); if (tst == 0) { rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst); @@ -219,7 +219,7 @@ VLDB_ReplaceEntry(afs_cell_handle_p cellHandle, afs_int32 volid, do { if (cellHandle->vos_new) { tst = - ubik_Call(VL_ReplaceEntryN, cellHandle->vos, 0, volid, + ubik_VL_ReplaceEntryN(cellHandle->vos, 0, volid, voltype, entryp, releasetype); if (tst) { if (tst == RXGEN_OPCODE) { @@ -231,7 +231,7 @@ VLDB_ReplaceEntry(afs_cell_handle_p cellHandle, afs_int32 volid, } else { if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) { tst = - ubik_Call(VL_ReplaceEntry, cellHandle->vos, 0, volid, + ubik_VL_ReplaceEntry(cellHandle->vos, 0, volid, voltype, &oentry, releasetype); if (!tst) { rc = 1; @@ -259,7 +259,7 @@ VLDB_ListAttributes(afs_cell_handle_p cellHandle, do { if (cellHandle->vos_new) { tst = - ubik_Call(VL_ListAttributesN, cellHandle->vos, 0, attrp, + ubik_VL_ListAttributesN(cellHandle->vos, 0, attrp, entriesp, blkentriesp); if (tst) { if (tst == RXGEN_OPCODE) { @@ -271,8 +271,8 @@ VLDB_ListAttributes(afs_cell_handle_p cellHandle, } else { memset((void *)&arrayEntries, 0, sizeof(arrayEntries)); tst = - ubik_Call(VL_ListAttributes, cellHandle->vos, 0, attrp, - entriesp, arrayEntries); + ubik_VL_ListAttributes(cellHandle->vos, 0, attrp, + entriesp, &arrayEntries); if (tst == 0) { blkentriesp->nbulkentries_val = (nvldbentry *) malloc(*entriesp * sizeof(*blkentriesp)); @@ -312,7 +312,7 @@ VLDB_ListAttributesN2(afs_cell_handle_p cellHandle, afs_status_t tst = 0; tst = - ubik_Call(VL_ListAttributesN2, cellHandle->vos, 0, attrp, + ubik_VL_ListAttributesN2(cellHandle->vos, 0, attrp, (name ? name : ""), thisindex, nentriesp, blkentriesp, nextindexp); if (!tst) { @@ -351,7 +351,7 @@ VLDB_IsSameAddrs(afs_cell_handle_p cellHandle, afs_int32 serv1, memset(&addrs, 0, sizeof(addrs)); memset(&uuid, 0, sizeof(uuid)); tst = - ubik_Call(VL_GetAddrsU, cellHandle->vos, 0, &attrs, &uuid, &unique, + ubik_VL_GetAddrsU(cellHandle->vos, 0, &attrs, &uuid, &unique, &nentries, &addrs); if (tst) { *equal = 0; @@ -517,7 +517,8 @@ vsu_ExtractName(char *rname, char *name) char sname[32]; size_t total; - strcpy(sname, name); + strncpy(sname, name, 32); + sname[31] ='\0'; total = strlen(sname); if ((total > 9) && (!strcmp(&sname[total - 9], ".readonly"))) { /*discard the last 8 chars */ diff --git a/src/libadmin/vos/vsprocs.c b/src/libadmin/vos/vsprocs.c index d8531f176..03fdc9089 100644 --- a/src/libadmin/vos/vsprocs.c +++ b/src/libadmin/vos/vsprocs.c @@ -150,7 +150,7 @@ UV_CreateVolume(afs_cell_handle_p cellHandle, struct rx_connection *server, tstatus.maxquota = quota; /* next the next 3 available ids from the VLDB */ - tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 3, volumeId); + tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 3, volumeId); if (tst) { goto fail_UV_CreateVolume; } @@ -229,7 +229,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server, /* Find and read the VLDB entry for this volume */ tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, volumeId, avoltype, + ubik_VL_SetLock(cellHandle->vos, 0, volumeId, avoltype, VLOP_DELETE); if (tst) { if (tst != VL_NOENT) { @@ -332,7 +332,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server, } if ((entry.nServers <= 0) || !(entry.flags & (RO_EXISTS | RW_EXISTS))) { - tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volumeId, vtype); + tst = ubik_VL_DeleteEntry(cellHandle->vos, 0, volumeId, vtype); if (tst) { goto fail_UV_DeleteVolume; } @@ -364,7 +364,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server, if (islocked) { temp = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volumeId, -1, + ubik_VL_ReleaseLock(cellHandle->vos, 0, volumeId, -1, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP)); if (temp) { if (!tst) @@ -437,7 +437,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, } tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL, VLOP_MOVE); + ubik_VL_SetLock(cellHandle->vos, 0, afromvol, RWVOL, VLOP_MOVE); if (tst) { goto fail_UV_MoveVolume; } @@ -454,7 +454,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, if (!Lp_Match(cellHandle, &entry, atoserver, atopart, &tst)) { /* the to server and partition do not exist in the vldb entry corresponding to volid */ tst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1, + ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP)); if (tst) { @@ -561,7 +561,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, /* Get a clone id */ newVol = 0; - tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &newVol); + tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &newVol); if (tst) { goto fail_UV_MoveVolume; } @@ -824,7 +824,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, if (islocked) { etst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1, + ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP)); if (etst) { if (!tst) @@ -878,7 +878,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, /* unlock VLDB entry */ if (islocked) - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1, + ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP)); if (clonetid) @@ -962,7 +962,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, } /* unlock VLDB entry */ - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1, + ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP)); done: /* routine cleanup */ @@ -1018,7 +1018,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver, /* no assigned backup volume id */ tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, avolid, RWVOL, + ubik_VL_SetLock(cellHandle->vos, 0, avolid, RWVOL, VLOP_BACKUP); if (tst) { goto fail_UV_BackupVolume; @@ -1041,7 +1041,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver, /* Get a backup volume id from the VLDB and update the vldb * entry with it. */ - tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &backupID); + tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &backupID); if (tst) { goto fail_UV_BackupVolume; } @@ -1160,7 +1160,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver, } } else { temp = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, avolid, RWVOL, + ubik_VL_ReleaseLock(cellHandle->vos, 0, avolid, RWVOL, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP)); if (temp) { @@ -1223,7 +1223,7 @@ CloneVol(afs_cell_handle_p cellHandle, struct rx_connection *conn, /* Get the RO volume id. Allocate a new one if need to */ *rovidp = entry->volumeId[ROVOL]; if (*rovidp == INVALID_BID) { - tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, rovidp); + tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, rovidp); if (tst) { goto fail_CloneVol; } @@ -1495,7 +1495,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, memset((char *)&results, 0, sizeof(results)); tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL, + ubik_VL_SetLock(cellHandle->vos, 0, afromvol, RWVOL, VLOP_RELEASE); if ((tst) && (tst != VL_RERELEASE)) { goto fail_UV_ReleaseVolume; @@ -1544,7 +1544,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, /* Make sure we have a RO volume id to work with */ if (entry.volumeId[ROVOL] == INVALID_BID) { /* need to get a new RO volume id */ - tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &roVolId); + tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &roVolId); if (tst) { goto fail_UV_ReleaseVolume; } @@ -1969,7 +1969,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, } if (islocked) { tst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, RWVOL, + ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); if (tst) { rc = 0; @@ -2154,7 +2154,7 @@ UV_DumpVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol, if (islocked) { etst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1, + ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); if (etst) { if (!tst) @@ -2332,7 +2332,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver, aVLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst); if (tst == VL_NOENT) { tst = - ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid); + ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &pvolid); if (tst) { goto fail_UV_RestoreVolume; } @@ -2479,7 +2479,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver, islocked = 0; } else { /*update the existing entry */ tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, pvolid, RWVOL, + ubik_VL_SetLock(cellHandle->vos, 0, pvolid, RWVOL, VLOP_RESTORE); if (tst) { goto fail_UV_RestoreVolume; @@ -2557,7 +2557,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver, } if (islocked) { etst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, pvolid, RWVOL, + ubik_VL_ReleaseLock(cellHandle->vos, 0, pvolid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); if (etst) { if (!tst) @@ -2607,7 +2607,7 @@ UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, int same = 0; tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE); + ubik_VL_SetLock(cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE); if (tst) { goto fail_UV_AddSite; } @@ -2665,7 +2665,7 @@ UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, if (islocked) { tst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL, + ubik_VL_ReleaseLock(cellHandle->vos, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); } @@ -2686,7 +2686,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, int islocked = 0; tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE); + ubik_VL_SetLock(cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE); if (tst) { goto fail_UV_RemoveSite; } @@ -2704,7 +2704,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, if ((entry.nServers == 1) && (entry.flags & RW_EXISTS)) entry.flags &= ~RO_EXISTS; if (entry.nServers < 1) { /*this is the last ref */ - tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volid, ROVOL); + tst = ubik_VL_DeleteEntry(cellHandle->vos, 0, volid, ROVOL); if (tst) { goto fail_UV_RemoveSite; } @@ -2721,7 +2721,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part, if (islocked) { afs_status_t t; - t = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL, + t = ubik_VL_ReleaseLock(cellHandle->vos, 0, volid, RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); if (tst == 0) { tst = t; @@ -3017,7 +3017,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue, counter = 0; /* get the next available id's from the vldb server */ - vcode = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 0, &maxVolid); + vcode = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 0, &maxVolid); if (vcode) { return (vcode); } @@ -3039,7 +3039,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue, temp2 = elem.ids[RWVOL] - maxVolid + 1; maxVolid = 0; vcode = - ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2, + ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2, &maxVolid); maxVolid += temp2; @@ -3051,7 +3051,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue, temp2 = elem.ids[ROVOL] - maxVolid + 1; maxVolid = 0; vcode = - ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2, + ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2, &maxVolid); maxVolid += temp2; @@ -3061,7 +3061,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue, temp2 = elem.ids[BACKVOL] - temp1 + 1; maxVolid = 0; vcode = - ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2, + ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2, &maxVolid); maxVolid += temp2; @@ -3248,7 +3248,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue, totalUE++; vcode = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, + ubik_VL_ReleaseLock(cellHandle->vos, 0, elem.ids[RWVOL], RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); @@ -3548,7 +3548,7 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry, */ if (++pass == 2) { tst = - ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL], + ubik_VL_SetLock(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_DELETE); if (tst) { goto fail_CheckVldb; @@ -3588,7 +3588,7 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry, && !(entry->flags & RO_EXISTS)) { /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */ tst = - ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, + ubik_VL_DeleteEntry(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL); if (tst) { goto fail_CheckVldb; @@ -3613,7 +3613,7 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry, if (islocked) { vcode = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, + ubik_VL_ReleaseLock(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP), &tst); @@ -3721,7 +3721,7 @@ UV_RenameVolume(afs_cell_handle_p cellHandle, struct nvldbentry *entry, tid = 0; islocked = 0; - tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE); /*last param is dummy */ + tst = ubik_VL_SetLock(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE); /*last param is dummy */ if (tst) { goto fail_UV_RenameVolume; } @@ -3853,7 +3853,7 @@ UV_RenameVolume(afs_cell_handle_p cellHandle, struct nvldbentry *entry, if (islocked) { etst = - ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, + ubik_VL_ReleaseLock(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP); if (etst) { -- 2.39.5