Subject: [netatalk-admins] kerberos and papd...

From: Everette G Allen <[email-masked]>
Date: Tue, 22 Jul 1997 15:49:24 -0400

I am having a problem with papd under 1.3.3 not finding the ka#1 entry in
printcap to recognize that it needs to do kerberos authentication.  What is
different is that when parsing printcap in main.c for papd a call to
pgetflag is used to look for ka while a series of tests using pgetstr is
used for the rest.
Code follows:
/*
	 * Must Kerberos authenticate?
	 */
	syslog(LOG_ERR,"before ka for %s",pr->p_printer);
	if ( pgetflag( "ka" ) == 1 ) {
	  syslog(LOG_ERR,"AUTH = 1");
	    pr->p_flags |= P_AUTH;
	} else {
	  syslog(LOG_ERR,"AUTH = 0");
	    pr->p_flags &= ~P_AUTH;
	}
(Note: syslog is always getting AUTH=0 in binary)
as opposed to say

/*
	 * Is accounting on?
	 */
	a = area;
	if ( pgetstr( "af", &a ) == NULL ) {
	    pr->p_flags &= ~P_ACCOUNT;
	} else {
	    pr->p_flags |= P_ACCOUNT;
	}
Why the difference?

Everette Gray Allen                               Consultant IV
Box 7109 NCState Campus                     Computing Services
Raleigh, NC 27695-7109                       919-515-2517

---

From: [email-masked]
Date: Tue, 22 Jul 1997 23:44:36 -0400

> From:    Everette G Allen <[email-masked]>
> To:      [email-masked]

> if ( pgetstr( "af", &a ) == NULL ) {

You should have just :ka:, not :ka#1:.  The flag, string, and number
name-space for the Unix capability libraries are orthogonal.  :ka#1:
specifies that the number capability "ka" has value 1.  The papd code
is looking for a boolean capability called "ka".  There's an exception
to this, BTW.  The negative capability name-space overlaps all of the
other three name spaces.  Hence, :ka@: turns off :ka#1: and :ka:.

The second example you give, the string capability "af", is of type
string because "af" is the accounting file name.

:wes

---

From: [email-masked]
Date: Wed, 23 Jul 1997 11:03:18 -0400

>printcap to recognize that it needs to do kerberos authentication.

Is there any doc available that describes how to use the papd/kerberos support?

thanks.