Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 573652

Summary: Regression: AUTH_SYS cannot be requested using the 'sec=sys' export option.
Product: Red Hat Enterprise Linux 5 Reporter: Sachin Prabhu <sprabhu>
Component: kernelAssignee: Sachin Prabhu <sprabhu>
Status: CLOSED ERRATA QA Contact: Boris Ranto <branto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: branto, jiali, jlayton, qcai
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 21:17:39 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
Proposed patch none

Description Sachin Prabhu 2010-03-15 13:56:33 UTC
The NFS server rejects all calls made using AUTH_SYS security flavour when AUTH_SYS is explicitly requested using the option sec=sys as an exports option for that share. This is caused by a bug in the patch for bz 253019 when went into RHEL 5.2 and is thus a regression.

To reproduce:
1) Export a share with the following options.
/export *(rw,insecure,fsid=0,sec=sys)
2) Try mounting it on the client.
# mount -t nfs4 vm21:/ /mnt
mount.nfs4: Operation not permitted

This is wrong since the default auth_sys which is requested is explicitly mentioned in the exports for that share.

The problem is caused by the following line in svcauth_unix_accept()

static int
svcauth_unix_accept(struct svc_rqst *rqstp, u32 *authp)
{
..
        rqstp->rq_flavor = RPC_AUTH_NULL;
..
}

This line was introduced by the patch for bz 253019. The rqstp->rq_flavor should be instead set to RPC_AUTH_UNIX.

Upstream
static int
svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
{
..
        rqstp->rq_flavor = RPC_AUTH_UNIX;
..
}

similarly the rqstp->rq_flavor is wrongly assigned to RPC_AUTH_UNIX in svcauth_null_accept()

Comment 2 Sachin Prabhu 2010-03-15 16:02:29 UTC
Created attachment 400255 [details]
Proposed patch

Comment 4 RHEL Program Management 2010-05-20 12:49:25 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Jarod Wilson 2010-05-25 21:12:07 UTC
in kernel-2.6.18-200.el5
You can download this test kernel from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 8 Jeff Layton 2010-09-13 17:39:16 UTC
*** Bug 596806 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2011-01-13 21:17:39 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/RHSA-2011-0017.html