struct afsconf_cell tcell;
register afs_int32 code;
char caller[MAXKTCNAMELEN];
+ char clones[MAXHOSTSPERCELL];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
code = BZACCESS;
}
if (DoLogging) bozo_Log("%s is executing SetCellName '%s'\n", caller, aname);
- code = afsconf_GetCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell);
+ code = afsconf_GetExtendedCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell, &clones);
if (code)
goto fail;
}
strcpy(tcell.name, aname);
- code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
+ code = afsconf_SetExtendedCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell, &clones);
fail:
osi_auditU (acall, BOS_SetCellEvent, code, AUD_STR, aname, AUD_END);
register afs_int32 code;
struct afsconf_cell tcell;
register char *tp;
+ char clones[MAXHOSTSPERCELL];
- code = afsconf_GetCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell);
+ code = afsconf_GetExtendedCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell, &clones);
if (code) goto fail;
if (awhich >= tcell.numServers) {
}
tp = tcell.hostName[awhich];
- *aname = (char *) malloc(strlen(tp)+1);
- strcpy(*aname, tp);
+ *aname = (char *) malloc(strlen(tp)+3);
+ if (clones[awhich]) {
+ strcpy(*aname, "[");
+ strcat(*aname, tp);
+ strcat(*aname, "]");
+ } else
+ strcpy(*aname, tp);
goto done;
fail:
afs_int32 which;
register int i;
char caller[MAXKTCNAMELEN];
+ char clones[MAXHOSTSPERCELL];
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
code = BZACCESS;
if (DoLogging)
bozo_Log("%s is executing DeleteCellHost '%s'\n", caller, aname);
- code = afsconf_GetCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell);
+ code = afsconf_GetExtendedCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell, &clones);
if (code)
goto fail;
memset(&tcell.hostAddr[which], 0, sizeof(struct sockaddr_in));
memset(tcell.hostName[which], 0, MAXHOSTCHARS);
- code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
+ code = afsconf_SetExtendedCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell, &clones);
fail:
osi_auditU( acall, BOS_DeleteHostEvent, code, AUD_STR, aname, AUD_END);
afs_int32 which;
register int i;
char caller[MAXKTCNAMELEN];
+ char clones[MAXHOSTSPERCELL];
+ char *n;
+ char isClone = 0;
if (!afsconf_SuperUser(bozo_confdir, acall, caller)) {
code = BZACCESS;
if (DoLogging)
bozo_Log("%s is executing AddCellHost '%s'\n", caller, aname);
- code = afsconf_GetCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell);
+ code = afsconf_GetExtendedCellInfo(bozo_confdir, (char *) 0, (char *) 0, &tcell, &clones);
if (code)
goto fail;
+ n = aname;
+ if (*n == '[') {
+ *(n + strlen(n) -1) = 0;
+ ++n;
+ isClone = 1;
+ }
+
which = -1;
for(i=0;i<tcell.numServers;i++) {
- if (strcmp(tcell.hostName[i], aname) == 0) {
+ if (strcmp(tcell.hostName[i], n) == 0) {
which = i;
break;
}
}
memset(&tcell.hostAddr[which], 0, sizeof(struct sockaddr_in));
- strcpy(tcell.hostName[which], aname);
- code = afsconf_SetCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell);
+ strcpy(tcell.hostName[which], n);
+ clones[which] = isClone;
+ code = afsconf_SetExtendedCellInfo(bozo_confdir, AFSDIR_SERVER_ETC_DIRPATH, &tcell, &clones);
fail:
osi_auditU(acall, BOS_AddHostEvent, code, AUD_STR, aname, AUD_END);