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 479670

Summary: fix the failure of file creation from hpux client
Product: Red Hat Enterprise Linux 5 Reporter: Wengang Wang <wen.gang.wang>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
Status: CLOSED DUPLICATE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2CC: bfields, fleite, greg.marsden, jlayton, rwheeler, sprabhu
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=7579314
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-04 17:40:53 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
the patch fixes the problem(back porting from mainline 4ac35c2f794503d3acda20d98e89cf63f6e94332) none

Description Wengang Wang 2009-01-12 12:48:05 UTC
sometimes HPUX nfs client sends a create request to linux nfs server(v2/v3).
the dump of the request is like:
    obj_attributes
        mode: value follows
            set_it: value follows (1)
            mode: 00
        uid: no value
            set_it: no value (0)
        gid: value follows
            set_it: value follows (1)
            gid: 8030
        size: value follows
            set_it: value follows (1)
            size: 0
        atime: don't change
            set_it: don't change (0)
        mtime: don't change
            set_it: don't change (0)

note that mode is 00(havs no rwx privilege even for the owner) and it requires
to set size to 0.

as current nfsd(v2/v3) implementation, the server does mainly 2 steps:
1) creates the file in mode specified by calling vfs_create().
2) sets attributes for the file by calling nfsd_setattr().

at step 2), it finally calls file system specific setattr() function which may
fails when checking permission because changing size needs WRITE privilege but
it has no since mode is 000.

for this case, a new file created, we may simply ignore the request of setting
size to 0. so that the WRITE privilege is not needed and finally succeed.

attached is the patch for this problem. please have it included in next release if it's suitable.

Comment 1 Wengang Wang 2009-10-09 07:00:13 UTC
Created attachment 364209 [details]
the patch fixes the problem(back porting from mainline 4ac35c2f794503d3acda20d98e89cf63f6e94332)