[16] in arla-drinkers

home help back first fref pref prev next nref lref last post

afs_strerror()?

daemon@ATHENA.MIT.EDU (John Hawkinson)
Sun Jun 21 05:03:18 1998

From arla-drinkers-request@sundance.stacken.kth.se Sun Jun 21 09:03:17 1998
Return-Path: <arla-drinkers-request@sundance.stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 12296 invoked from network); 21 Jun 1998 09:03:15 -0000
Received: from unknown (HELO sundance.stacken.kth.se) (130.237.234.41)
  by bloom-picayune.mit.edu with SMTP; 21 Jun 1998 09:03:15 -0000
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28])
	by sundance.stacken.kth.se (8.8.8/8.8.8) with SMTP id KAA28145
	for <arla-drinkers@stacken.kth.se>; Sun, 21 Jun 1998 10:55:10 +0200 (MET DST)
Received: from MARY-KAY-COMMANDOS.MIT.EDU by MIT.EDU with SMTP
	id AA27889; Sun, 21 Jun 98 04:55:09 EDT
Received: by mary-kay-commandos.MIT.EDU (SMI-8.6/4.7) id EAA25136; Sun, 21 Jun 1998 04:55:07 -0400
Date: Sun, 21 Jun 1998 04:55:07 -0400
Message-Id: <199806210855.EAA25136@mary-kay-commandos.MIT.EDU>
To: arla-drinkers@stacken.kth.se
Subject: afs_strerror()?
From: John Hawkinson <jhawk@MIT.EDU>


I'm sort of wondering if we should have one.
Or perhaps an rx_strerror().

Because I haven't gone and followed up on Assar's
suggestions:

| It would seem to me that you need to fix all the arlalib_* functions
| to take the cell as an argument.

(I'll try to do it today), pts on the athena cell doesn't work:

> ./pts mem jhawk
mem: pts: pts_name_to_id(..) returned 19270408

Of course, this is 

include/rxkad.h:#define RXKADUNKNOWNKEY         (19270408L)

But the pts code just does:

        if(res != 0) {
            if(res == PRPERM) {
                if(id == ANONYMOUSID) /* this sucks */
                    errx(1, "pts: User or group doesn't exist so couldn't"
                         "look up id for %s (id: %d)", name, id);
                else
                    errx(1, "pts: Permission denied ; unable to get "
                         "membership of %s (id: %d)", name, id);
            }
            else if(res == PRNOENT)
                errx(1, "pts: User or group doesn't exist so couldn't look up"
                     "id for %s (id: %d)", name, id);
            else
                errx(1, "pts: PR_ListElements(..) returned %d", res);
        }

which is clearly insufficient since all sorts of errors
could pop up.

An rx_strerror() seems like it'd be the right thing here.
Concurrance? Disagreement?

Thanks.

--jhawk

home help back first fref pref prev next nref lref last post