Bug 7444 - nt_printer_publish and check_published_printers should release krb5 cache override
nt_printer_publish and check_published_printers should release krb5 cache ove...
Product: Samba 3.5
Classification: Unclassified
Component: Printing
x86 Linux
: P3 normal
: ---
Assigned To: Guenther Deschner
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2010-05-20 10:57 UTC by Mark LaCroix
Modified: 2013-07-24 09:44 UTC (History)
0 users

See Also:

proposed patch for master (2.41 KB, patch)
2013-07-19 13:10 UTC, Guenther Deschner
asn: review+
patch for 4.1.x (2.65 KB, patch)
2013-07-24 09:43 UTC, Guenther Deschner
gd: review? (asn)

Note You need to log in before you can comment on or make changes to this bug.
Description Mark LaCroix 2010-05-20 10:57:03 UTC
The kerberos code in the nt_printer_publish and check_published_printers routines in source3/printing/nt_printing.c make the following call:

setenv(KRB5_ENV_CCNAME, "MEMORY:prtpub_cache", 1)

This overrides the library default kerberos cache for the process (for linux, /tmp/krb5cc_<uid>).  If another routine relies on default kerberos cache settings (e.g. nss_ldap), this causes problems.

This can be resolved by calling unsetenv(KRB5_ENV_CCNAME) before exiting the nt_printer_publish and check_published_printers routines.
Comment 1 Karolin Seeger 2012-12-12 09:12:36 UTC
Günther, can you please comment if that is true for 3.6/4.0 also?
Comment 2 Guenther Deschner 2013-07-19 12:31:54 UTC
Yes, it is.
Comment 3 Guenther Deschner 2013-07-19 13:10:26 UTC
Created attachment 9067 [details]
proposed patch for master
Comment 4 Guenther Deschner 2013-07-24 09:43:59 UTC
Created attachment 9072 [details]
patch for 4.1.x

Same patch applies to v4.1 as well.