[12323] in Athena Bugs

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

Hesiod pcap entry for hero

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Wed Aug 3 16:37:13 1994

From: epeisach@MIT.EDU
Date: Wed, 3 Aug 1994 16:37:02 -0400
To: op@MIT.EDU, bugs@MIT.EDU
Cc: tytso@MIT.EDU



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