Bug 1387241 - Pass proper permission to acl_permit() in posix_acl_open()
Summary: Pass proper permission to acl_permit() in posix_acl_open()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: access-control
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiffin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 12:29 UTC by Jiffin
Modified: 2017-03-06 17:30 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-06 17:30:52 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jiffin 2016-10-20 12:29:09 UTC
Description of problem:

In posix_acl_open(), permission are send to acl_permit function based on flag set
In current code value for calculated on switch case, but there is chance that more than value(O_RDONLY | O_TRUNC) encoded in flag but this is not handled properly in posix_acl_open

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2016-10-20 18:15:35 UTC
REVIEW: http://review.gluster.org/15688 (access_control : Convert switch case into if .. else in posix_acl_open()) posted (#1) for review on master by jiffin tony Thottan (jthottan)

Comment 2 Worker Ant 2016-10-20 18:30:03 UTC
REVIEW: http://review.gluster.org/15688 (access_control : Convert switch case into if .. else in posix_acl_open()) posted (#2) for review on master by jiffin tony Thottan (jthottan)

Comment 3 Worker Ant 2016-11-18 08:39:03 UTC
REVIEW: http://review.gluster.org/15688 (access_control : address O_TRUNC and O_APPEND flag properly in posix_acl_open) posted (#3) for review on master by jiffin tony Thottan (jthottan)

Comment 4 Worker Ant 2016-12-14 13:01:10 UTC
COMMIT: http://review.gluster.org/15688 committed in master by Kaleb KEITHLEY (kkeithle) 
------
commit e81fd0b85c8dd3f521e54e32b7da2f99a513f2f2
Author: Jiffin Tony Thottan <jthottan>
Date:   Thu Nov 17 18:22:39 2016 +0530

    access_control : address O_TRUNC and O_APPEND flag properly in posix_acl_open
    
    In posix_acl_open, in switch value passed is (flag & O_ACCMODE). The value for
    O_ACCMODE is 0003, so the result will always be less than or equal to 3.
    But value for O_TRUNC is 01000 and O_APPEND is 02000, so it is not right to
    check it in switch case
    
    Change-Id: Ia17db80a6a5f681c35e08e062d384f33ef7e0354
    BUG: 1387241
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Reviewed-on: http://review.gluster.org/15688
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 5 Worker Ant 2016-12-19 11:23:02 UTC
REVIEW: http://review.gluster.org/16201 (access-control/tests : correct the test case bug-1387241.t) posted (#1) for review on master by jiffin tony Thottan (jthottan)

Comment 6 Shyamsundar 2017-03-06 17:30:52 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.10.0, please open a new bug report.

glusterfs-3.10.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2017-February/030119.html
[2] https://www.gluster.org/pipermail/gluster-users/


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