Bug 748756

Summary: mount.cifs does not use KRB5_CONFIG
Product: Red Hat Enterprise Linux 6 Reporter: Marko Myllynen <myllynen>
Component: cifs-utilsAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact: Jian Li <jiali>
Severity: low Docs Contact:
Priority: low    
Version: 6.2CC: jiali, nmurray, steved, yanwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The cifs.upcall utility previously always used the "/etc/krb5.conf" file regardless of whether the user had specified a custom Kerberos configuration file. This update adds the "--krb5conf" option to cifs.upcall allowing thus the administrator to specify an alternate krb5.conf file. Details for option usage can be seen in the cifs.upcall(8) manual page.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 07:27:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch -- allow admins to specify an alternate krb5.conf location none

Description Marko Myllynen 2011-10-25 09:46:22 UTC
Description of problem:
Applications using krb5-libs can use a custom (user specific) krb5.conf by defining KRB5_CONFIG but mount.cifs always uses /etc/krb5.conf regardless of KRB5_CONFIG. It would make testing in some cases a bit easier if the system keytab does not need to be modified while testing CIFS mounts with Kerberos authentication.

Version-Release number of selected component (if applicable):
RHEL 6.2

Comment 2 RHEL Program Management 2011-10-29 05:47:11 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Jeff Layton 2011-11-08 15:42:43 UTC
I don't think we'll be able to reasonably support this feature. While I'm sure it would be convenient, I don't see it as worth the effort.

When the kernel does an upcall it occurs in a different process context than the process that triggered the upcall. In order to do this, we'd need the upcall program to scrape /proc/<pid>/environ for that process and try to divine the various KRB5* functions out of it.

That's a lot of effort to handle this variable, and I think it would likely be problematic. Another possibility is to add a new command-line parm to cifs.upcall that would allow it to use an alternate krb5.conf. Would that be reasonable?

Comment 4 Marko Myllynen 2011-11-08 15:57:41 UTC
Thanks for looking into this.

> I don't think we'll be able to reasonably support this feature. While I'm sure
> it would be convenient, I don't see it as worth the effort.

Yes, this is definitely in the nice-to-have category.

> That's a lot of effort to handle this variable, and I think it would likely be
> problematic. Another possibility is to add a new command-line parm to
> cifs.upcall that would allow it to use an alternate krb5.conf. Would that be
> reasonable?

Sure - it might even be better as it would make things perhaps a bit more explicit.

Thanks.

Comment 5 Jeff Layton 2012-01-04 19:03:34 UTC
Created attachment 550749 [details]
patch -- allow admins to specify an alternate krb5.conf location

Something like this patch ought to do it. When you get a chance, could you test it and let me know if it works for you?

Comment 8 Jeff Layton 2012-03-02 13:05:42 UTC
Fixed in cifs-utils-4.8.1-7.el6.

Comment 10 Jeff Layton 2012-05-01 10:23:46 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The cifs.upcall utility previously always used the "/etc/krb5.conf" file regardless of whether the user had specified a custom Kerberos configuration file. This update adds the "--krb5conf" option to cifs.upcall allowing thus the administrator to specify an alternate krb5.conf file. Details for option usage can be seen in the cifs.upcall(8) manual page.

Comment 11 Jian Li 2012-05-14 05:15:28 UTC
This bug is tested on cifs-utils-4.8.1-10.el6, using test case /kernel/filesystems/cifs/multihost/bz805490-krb5-domain_realm, test steps follow comment 7.

Comment 12 errata-xmlrpc 2012-06-20 07:27:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0902.html