Bug 1030728 - [] When export dir with sec=krb5; Client mount success, but ls fail with permission, and ls -l return invalid argument
[] When export dir with sec=krb5; Client mount success, but ls fail with perm...
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: nfs-utils (Show other bugs)
5.11
All Linux
unspecified Severity high
: rc
: ---
Assigned To: Steve Dickson
Red Hat Kernel QE team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-14 22:00 EST by Yin.JianHong
Modified: 2014-02-10 08:32 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-10 08:32:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yin.JianHong 2013-11-14 22:00:09 EST
Description of problem:
When export dir with sec=krb5; Client mount success, but ls fail with permission, and ls -l return invalid argument.

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


How reproducible:
100%

Steps to Reproduce:
1. In server, krb5 config and add keytab file
   start rpcsvcgssd
   export "/usr/share *(ro,sec=krb5)"
   start nfs server
2. In client, krb5 config and add keytab file
   start rpcgssd
   mount $server:/usr/share  /nfsmp
   ls -l /nfsmp
   ls /nfsmp
3.

Actual results:
================================================================================
[21:09:35 root@ /mnt/tests/CoreOS/nfs-utils/krb5-test/base]# showmount -e $SERVER_nfs
Export list for hp-sl390s-01.rhts.eng.bos.redhat.com:
/usr/share       *
/usr/local/share *
--------------------------------------------------------------------------------

================================================================================
[21:09:36 root@ /mnt/tests/CoreOS/nfs-utils/krb5-test/base]# mount $SERVER_nfs:/usr/share  /nfs-mp
--------------------------------------------------------------------------------

================================================================================
[21:09:36 root@ /mnt/tests/CoreOS/nfs-utils/krb5-test/base]# mount | grep "$SERVER_nfs:/usr/share"
hp-sl390s-01.rhts.eng.bos.redhat.com:/usr/share on /nfs-mp type nfs (rw,addr=10.16.67.67)
--------------------------------------------------------------------------------

================================================================================
[21:09:36 root@ /mnt/tests/CoreOS/nfs-utils/krb5-test/base]# ls -d /nfs-mp
/nfs-mp
--------------------------------------------------------------------------------

================================================================================
[21:09:36 root@ /mnt/tests/CoreOS/nfs-utils/krb5-test/base]# ls -l /nfs-mp | tail
ls: /nfs-mp: Invalid argument  <<<--- when use ls -l, get Invalid argument err.
ls: /nfs-mp: Permission denied
--------------------------------------------------------------------------------

================================================================================
[21:09:36 root@ /mnt/tests/CoreOS/nfs-utils/krb5-test/base]# ls    /nfs-mp | tail
ls: /nfs-mp: Permission denied
--------------------------------------------------------------------------------

Expected results:


Additional info:
  test in RHEL6 RHEL7 PASS.
Comment 1 RHEL Product and Program Management 2014-01-29 05:33:52 EST
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 2 Steve Dickson 2014-02-10 08:32:48 EST
(In reply to Yin.JianHong from comment #0)
> Description of problem:
> When export dir with sec=krb5; Client mount success, but ls fail with
> permission, and ls -l return invalid argument.
> 
> Steps to Reproduce:
> 1. In server, krb5 config and add keytab file
>    start rpcsvcgssd
>    export "/usr/share *(ro,sec=krb5)"
>    start nfs server
> 2. In client, krb5 config and add keytab file
>    start rpcgssd
>    mount $server:/usr/share  /nfsmp
>    ls -l /nfsmp
>    ls /nfsmp

The EINVAL is coming from how the 
   getxattr("/mnt/home", "system.posix_acl_access", 0x0, 0)
system fails.

When the mount is mounted using the -o sec=krb5 flag the
system call fails with ENODATA which is not printed to sdterr
but when -o sec=krb5 flag is not used the system call fails 
with a EINVAL which is written to stderr by the ls command.

This is simply a function of how ls works in RHEL5

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