smbspool: fix Kerberos support for CUPS 1.3.
commit8c12c5cea01d9b801fe80c2a87b8139c488a62a5
authorMike Sweet <msweet@apple.com>
Mon, 21 Apr 2008 16:16:01 +0000 (21 09:16 -0700)
committerJames Peach <jpeach@apple.com>
Mon, 21 Apr 2008 16:16:01 +0000 (21 09:16 -0700)
treea2453c2e3c47a33e244e20cea86ef6e97b68a603
parent87232351b5e66728f8d602259961909e8c1dfcb6
smbspool: fix Kerberos support for CUPS 1.3.

To summarize the changes, the patches remove the old (probably non-
working) Kerberos support code which is unnecessary with CUPS 1.3
and adds some checks on the NT status we get back to see whether
the connection error is related to authentication.  If so, we send
the ATTR: message to tell CUPS we need a username and password and
return exit code 2 so cupsd will do the right thing.

AUTH_USERNAME, AUTH_PASSWORD, and KRB5CCNAME are set and supported
by CUPS 1.3.  The new exit code is supported by CUPS 1.2.x and 1.3,
and it treated as a general failure in CUPS 1.1.  The ATTR: message
is only supported by CUPS 1.3, while CUPS 1.2 will assume the
"username,password" value we are setting.

The current code only uses the AUTH_* env vars if they are set.
If not, we fall back to the previous behavior.

I really can't tell whether the Kerberos code that was in there
would work at all. It did not work for Mac OS X which is why
I dropped it.
source/client/smbspool.c