Bug 7444 - nt_printer_publish and check_published_printers should release krb5 cache override
Summary: nt_printer_publish and check_published_printers should release krb5 cache ove...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Printing (show other bugs)
Version: 3.5.3
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Guenther Deschner
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-20 10:57 UTC by Mark LaCroix
Modified: 2021-02-11 14:04 UTC (History)
0 users

See Also:


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

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.
Comment 5 Björn Jacke 2019-12-05 07:42:13 UTC
Günther, can you please look out for bugs like this, that have been fixed but not been closed in bugzilla?