[9] in arla-drinkers
Re: appl/arlalib.c's arlalib_get_cred() problems
daemon@ATHENA.MIT.EDU (Assar Westerlund)
Thu Jun 18 16:55:54 1998
From arla-drinkers-request@sundance.stacken.kth.se Thu Jun 18 20:55:53 1998
Return-Path: <arla-drinkers-request@sundance.stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 9025 invoked from network); 18 Jun 1998 20:55:52 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
by bloom-picayune.mit.edu with SMTP; 18 Jun 1998 20:55:52 -0000
Received: from dhcp217.conference.usenix.org (dhcp217.conference.usenix.org [204.119.186.217])
by sundance.stacken.kth.se (8.8.8/8.8.8) with ESMTP id WAA08863
for <arla-drinkers@stacken.kth.se>; Thu, 18 Jun 1998 22:51:15 +0200 (MET DST)
Received: (from assar@localhost) by dhcp217.conference.usenix.org (8.8.5/8.7.3) id WAA00278; Thu, 18 Jun 1998 22:52:21 +0200 (MET DST)
To: John Hawkinson <jhawk@bbnplanet.com>
Cc: arla-drinkers@stacken.kth.se
Subject: Re: appl/arlalib.c's arlalib_get_cred() problems
References: <199806172140.RAA14834@all-purpose-gunk.near.net>
Mime-Version: 1.0 (generated by tm-edit 7.68)
Content-Type: multipart/mixed;
boundary="Multipart_Thu_Jun_18_22:52:19_1998-1"
Content-Transfer-Encoding: 7bit
From: Assar Westerlund <assar@sics.se>
Date: 18 Jun 1998 22:52:19 +0200
In-Reply-To: John Hawkinson's message of "Wed, 17 Jun 1998 17:40:58 -0400 (EDT)"
Message-ID: <5lbtrqcu0s.fsf@dhcp217.conference.usenix.org>
Lines: 93
X-Mailer: Gnus v5.5/Emacs 19.34
--Multipart_Thu_Jun_18_22:52:19_1998-1
Content-Type: text/plain; charset=US-ASCII
John Hawkinson <jhawk@bbnplanet.com> writes:
> Pursuant to <5lhg5g3hjn.fsf@assaris.sics.se>, arlalib_get_cred()
> in appl/arlalib.c has the same problem that arlad/arla.c used
> to have when calling get_cred()
It would seem to me that you need to fix all the arlalib_* functions
to take the cell as an argument.
> Also, it would be nice if the default cell could be obtained from the
> AFSCELL environment variable before checking the ThisCell file,
> like in the TransArc utilities.
That's easy. Patch appended.
> Ideally arlad -t would also use arlalib_get_cred()...
Right. Got to move the arlalib to a real library.
> On an unrelated note, I find that the instruction in INSTALL for
> installation on Solaris need some help. One shouldn't have to mknod
> stuff by hand; the appropriate invokation of add_drv and editting
> /etc/devlink.tab should be sufficient. I haven't quite figured out
> what's necessary yet.
I haven't been able to figure out how this should work so I weaseled
out and just did the mknod. Once you know what's necessary to get it
done automatically...
> Also, kthkrb's kafs seems to assume that afs will have a fixed
> syscall number. This is inconsistent with INSTALL, which
> implies you can pick any unused number (and you ought to be
> able to) for /etc/name_to_sysnum.
Yes, adding some way of specifying the system call to use to kafs is
on my todo-list.
As long as you're not using Transarc AFS you should of course use
105. I added some text about that in INSTALL.
/assar
--Multipart_Thu_Jun_18_22:52:19_1998-1
Content-Type: text/plain; charset=US-ASCII
Index: lib/ko/kocell.c
===================================================================
RCS file: /usr/local/cvsroot/arla/lib/ko/kocell.c,v
retrieving revision 1.9
diff -u -w -u -w -r1.9 kocell.c
--- kocell.c 1998/06/09 18:25:51 1.9
+++ kocell.c 1998/06/18 20:50:25
@@ -284,6 +284,8 @@
void
cell_init (int cellcachesize)
{
+ char *env;
+
if (thiscell != NULL) {
fprintf(stderr, "cell_init: Already initlized\n");
return;
@@ -294,17 +296,22 @@
cellnamehtab = hashtabnew (cellcachesize, cellnamecmp, cellnamehash);
cellnumhtab = hashtabnew (cellcachesize, cellnumcmp, cellnumhash);
- if (readthiscell (SYSCONFDIR "/" THISCELLFILENAME)) {
- fprintf(stderr, "Falling back on: " TRANSARCSYSCONFDIR);
+
+ env = getenv ("AFSCELL");
+ if (env != NULL) {
+ thiscell = strdup (env);
+ } else if (readthiscell (SYSCONFDIR "/" THISCELLFILENAME)) {
+ fprintf(stderr, "Falling back on: " TRANSARCSYSCONFDIR "\n");
if (readthiscell(TRANSARCSYSCONFDIR "/" THISCELLFILENAME)) {
fprintf(stderr, "Don't know where I am\n");
exit(1);
}
}
+
if (readcellservdb (SYSCONFDIR "/" CELLFILENAME)) {
- fprintf(stderr, "Falling back on: " TRANSARCSYSCONFDIR);
+ fprintf(stderr, "Falling back on: " TRANSARCSYSCONFDIR "\n");
if (readcellservdb(TRANSARCSYSCONFDIR "/" CELLFILENAME)) {
- fprintf(stderr, "Cant read the CellServDB file," \
+ fprintf(stderr, "Can't read the CellServDB file," \
"will use DNS AFSDB entries\n");
}
}
--Multipart_Thu_Jun_18_22:52:19_1998-1--