Bug 696951 - mount option uid doesn't work with krb5
Summary: mount option uid doesn't work with krb5
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cifs-utils
Version: 6.1
Hardware: Unspecified
OS: Linux
high
unspecified
Target Milestone: rc
: ---
Assignee: Jeff Layton
QA Contact: yanfu,wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-15 11:39 UTC by Jian Li
Modified: 2014-06-18 07:41 UTC (History)
5 users (show)

Fixed In Version: cifs-utils-4.8.1-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:07:08 UTC
Target Upstream Version:


Attachments (Terms of Use)
patch -- fix test for strtoul failure in mount.cifs (1.91 KB, patch)
2011-04-15 11:52 UTC, Jeff Layton
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0569 0 normal SHIPPED_LIVE cifs-utils bug fix update 2011-05-18 17:57:06 UTC

Description Jian Li 2011-04-15 11:39:55 UTC
Description of problem:
When work with krb5, mount with option uid fails, although mount.cifs make it with option uid.

Version-Release number of selected component (if applicable):
cifs-utils-4.8.1-1.el6.x86_64

How reproducible:
Refer to 
1. testcase /CoreOS/samba-client/Sanity/mount-with-kerberos
2. BZ 618609

Comment 2 Jeff Layton 2011-04-15 11:52:11 UTC
Created attachment 492356 [details]
patch -- fix test for strtoul failure in mount.cifs

Good catch, Jian. Thanks for the bug report.

This patch fixes it for me in cursory testing.

Comment 4 Jeff Layton 2011-04-18 14:53:33 UTC
Patch committed in cifs-utils-4.8.1-2.el6

Comment 6 yanfu,wang 2011-04-20 08:31:10 UTC
reproduced on rhel6.1 kernel 2.6.32-131.0.1.el6.x86_64 + cifs-utils-4.8.1-1.el6.x86_64:
[root@intel-s3e3144-01 krb5]# id testuser
uid=501(testuser) gid=501(testuser) groups=501(testuser)
[root@intel-s3e3144-01 krb5]# klist -k
Keytab name: WRFILE:/etc/krb5.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   2 root.NAY.REDHAT.COM
   2 root.NAY.REDHAT.COM
   2 root.NAY.REDHAT.COM
   2 root.NAY.REDHAT.COM
   2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM
   2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM
   2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM
   2 host/intel-s3e3144-01.rhts.eng.nay.redhat.com.NAY.REDHAT.COM
   2 testuser.NAY.REDHAT.COM
   2 testuser.NAY.REDHAT.COM
   2 testuser.NAY.REDHAT.COM
   2 testuser.NAY.REDHAT.COM
[root@intel-s3e3144-01 krb5]# mount -t cifs -o sec=krb5,uid=501 //intel-s3e3144-01.rhts.eng.nay.redhat.com/export /mnt/cifs
bad user name "501"

verified when update to cifs-utils-4.8.1-2.el6 and mount with uid successfully on i386 and x86_64:
[root@intel-s3e3144-01 krb5]# mount -t cifs -o sec=krb5,uid=501 //intel-s3e3144-01.rhts.eng.nay.redhat.com/export /mnt/cifs -vvv
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "//intel-s3e3144-01.rhts.eng.nay.redhat.com/export"
mount: node:  "/mnt/cifs"
mount: types: "cifs"
mount: opts:  "sec=krb5,uid=501"
mount: external mount: argv[0] = "/sbin/mount.cifs"
mount: external mount: argv[1] = "//intel-s3e3144-01.rhts.eng.nay.redhat.com/export"
mount: external mount: argv[2] = "/mnt/cifs"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw,sec=krb5,uid=501"
mount.cifs kernel mount options: ip=10.66.86.30,unc=\\intel-s3e3144-01.rhts.eng.nay.redhat.com\export,sec=krb5,uid=501,ver=1,user=root,pass=********
[root@intel-s3e3144-01 krb5]# cat /proc/mounts 
...
//intel-s3e3144-01.rhts.eng.nay.redhat.com/export/ /mnt/cifs cifs rw,relatime,unc=\\intel-s3e3144-01.rhts.eng.nay.redhat.com\export,username=root,uid=501,forceuid,gid=0,noforcegid,addr=10.66.86.30,posixpaths,serverino,acl,rsize=16384,wsize=57344 0 0

Comment 7 errata-xmlrpc 2011-05-19 13:07:08 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0569.html


Note You need to log in before you can comment on or make changes to this bug.