tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
if (!tdir) {
- fprintf(stderr,
- "libprot: Could not open configuration directory: %s.\n",
- AFSDIR_SERVER_ETC_DIRPATH);
- return -1;
+ ViceLog(0, ("hpr_Initialize: Could not open configuration directory: %s", AFSDIR_SERVER_ETC_DIRPATH));
+ return -1;
}
code = afsconf_GetLocalCell(tdir, cellstr, sizeof(cellstr));
if (code) {
- fprintf(stderr,
- "libprot: Could not get local cell. [%d]\n", code);
+ ViceLog(0, ("hpr_Initialize: Could not get local cell. [%d]", code));
afsconf_Close(tdir);
return code;
}
code = afsconf_GetCellInfo(tdir, cellstr, "afsprot", &info);
if (code) {
- fprintf(stderr, "libprot: Could not locate cell %s in %s/%s\n",
- cellstr, confDir, AFSDIR_CELLSERVDB_FILE);
+ ViceLog(0, ("hpr_Initialize: Could not locate cell %s in %s/%s", cellstr, confDir, AFSDIR_CELLSERVDB_FILE));
afsconf_Close(tdir);
return code;
}
code = rx_Init(0);
if (code) {
- fprintf(stderr, "libprot: Could not initialize rx.\n");
+ ViceLog(0, ("hpr_Initialize: Could not initialize rx."));
afsconf_Close(tdir);
return code;
}
if ((afsconf_GetLatestKey(tdir, 0, 0) == 0)) {
code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
if (code)
- fprintf(stderr,
- "libprot: clientauthsecure returns %d %s"
- " (so trying noauth)\n", code, error_message(code));
+ ViceLog(0, ("hpr_Initialize: clientauthsecure returns %d %s (so trying noauth)", code, error_message(code)));
if (code)
scIndex = 0; /* use noauth */
if (scIndex != 2)
/* this is a kerberos ticket, set scIndex accordingly */
scIndex = 2;
else {
- fprintf(stderr,
- "libprot: funny kvno (%d) in ticket, proceeding\n",
- ttoken.kvno);
+ ViceLog(0, ("hpr_Initialize: funny kvno (%d) in ticket, proceeding", ttoken.kvno));
scIndex = 2;
}
sc[2] =
if ((scIndex == 0) && (sc[0] == 0))
sc[0] = rxnull_NewClientSecurityObject();
if ((scIndex == 0))
- com_err("fileserver", code,
- "Could not get afs tokens, running unauthenticated.");
+ ViceLog(0, ("hpr_Initialize: Could not get afs tokens, running unauthenticated. [%d]", code));
memset(serverconns, 0, sizeof(serverconns)); /* terminate list!!! */
for (i = 0; i < info.numServers; i++) {
code = ubik_ClientInit(serverconns, uclient);
if (code) {
- com_err("fileserver", code, "ubik client init failed.");
+ ViceLog(0, ("hpr_Initialize: ubik client init failed. [%d]", code));
}
afsconf_Close(tdir);
code = rxs_Release(sc[scIndex]);