[767] in Moira

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

NetProb ticket #2068, Hesiod pcap entry for hero

daemon@ATHENA.MIT.EDU (yandros@MIT.EDU)
Mon Sep 5 05:27:12 1994

From: yandros@MIT.EDU
Date: Mon, 5 Sep 94 05:27:01 -0400
To: bug-moira@MIT.EDU, tytso@MIT.EDU, jweiss@MIT.EDU
Cc: yandros@MIT.EDU, epeisach@MIT.EDU



This is a bit old, but...  I assigned the ticket to Ted, since it seems to
be a server issue from my limited standpoint.  Ted is out on vacation right
now, though, so if anyone has anything to say before he gets back, feel free. 
:-)

chad

>From: epeisach@MIT.EDU
>Date: Wed, 3 Aug 1994 16:37:02 -0400
>Message-Id: <9408032037.AA09936@kangaroo.mit.edu>
>To: op@MIT.EDU, bugs@MIT.EDU
>Cc: tytso@MIT.EDU
>Subject: Hesiod pcap entry for hero
>
>
>
>I was doing the following:
>
>>lpquota -Phero -I
>Kerberos authentication failed - Principal unknwn (kerberos)
>Running unauthenticated.
>Host not found: (null)
>
>The cause:
>
>>hesinfo hero pcap
>hero:rp=hero:rm=IO.MIT.EDU:sd=/usr/spool/printer/hero:ka#0:pc#0:rq=(null)
>
>This is bad..... When I wrote lpquota, I remember testing the above
>scenario and the assumption was that rq was not (null) if not
>defined.... The field should not exist in the pcap.
>
>I suspect that the (null) was when moira was moved to a DECstation where
>printf("%s", NULL) gives the above....
>
>Looking in /mit/moiradev/src/gen/hesiod.dc I see:
>------------------------------------------------------------
>
>    fprintf(stderr, "Building printcap.db\n");
>    get_mach();
>
>    EXEC SQL DECLARE p_cursor2 CURSOR FOR
>      SELECT name, rp, dir, mach_id, auth, price, quotaserver
>      FROM printcap;
>    EXEC SQL OPEN p_cursor2; 
>    while (1) { 
>        EXEC SQL FETCH p_cursor2 INTO :name, :rp, :sd, :rm, :ka, :pc, :rq; 
>        if (sqlca.sqlcode != 0) break;
>	strtrim(name);
>	strtrim(rp);
>	strtrim(sd);
>	fprintf(out, "%s.pcap\tHS %s \"%s:rp=%s:rm=%s:sd=%s:ka#%d:pc#%d",
>		name, HTYPE, name, rp, hash_lookup(machines, rm), sd, ka, pc);
>	if (rq)
>	  fprintf(out, ":rq=%s\"\n", hash_lookup(machines, rq));
>	else
>	  fputs("\"\n", out);
>    }
>    EXEC SQL CLOSE p_cursor2;
>
>---------------------------------------------------------------------
>
>Probably those "empty" fields from the old database were converted to
>(null) on the way....  Anyway, the above code seems to assume that rq
>could be 0 implying that it is not set. I guess it all depends on what
>\[NONE\] gets translated as a host number in the database... If not 0,
>then the hesiod extraction code needs to understand it......
>
>
>
>		Ezra


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