f2fs: fix a bug of inheriting default ACL from parent
Subsystems (2)
PATCH 1/1 f2fs: fix a bug of inheriting default ACL from parent
Introduced by a6dda0e63e97122ce9e0ba04367e37cca28315fa "f2fs: use generic posix ACL infrastructure".
When testing default acl, gets in recent kernel (3.19.0-rc5),
# setfacl -dm g:root:rwx test/ # getfacl test/ # file: test/ # owner: root # group: root user::rwx group::r-x other::r-x default:user::rwx default:group::r-x default:group:root:rwx default:mask::rwx default:other::r-x
# cd test/
# mkdir testdir
]# getfacl testdir/
# file: testdir/
# owner: root
# group: root
user::rwx
group::rwx
// missing an acl "group:root:rwx" inherited from parent
other::r-x
default:user::rwx
default:group::r-x
default:group:root:rwx
default:mask::rwx
default:other::r-x--- fs/f2fs/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/acl.c +0 -0
@@ -396,7 +396,7 @@ int f2fs_init_acl(struct inode *inode, struct inode
*dir, struct page *ipage,
posix_acl_release(default_acl);
}
if (acl) {
- if (error)
+ if (!error)
error = __f2fs_set_acl(inode, ACL_TYPE_ACCESS, acl,
ipage);
posix_acl_release(acl);
Signature · 1 line
2.1.0
Hi Kinglong,
Nice catch!
Quoted 25 lines
-----Original Message-----
From: Kinglong Mee [mailto:[email protected]]
Sent: Saturday, January 24, 2015 5:06 PM
To: Jaegeuk Kim
Cc: [email protected]; [email protected]
Subject: [f2fs-dev] [PATCH] f2fs: fix a bug of inheriting default ACL from parentIntroduced by
a6dda0e63e97122ce9e0ba04367e37cca28315fa"f2fs: use generic posix ACL infrastructure".When testing default acl, gets in recent kernel (3.19.0-rc5),
# setfacl -dm g:root:rwx test/ # getfacl test/ # file: test/ # owner: root # group: root user::rwx group::r-x other::r-x default:user::rwx default:group::r-x default:group:root:rwx default:mask::rwx default:other::r-x
Quoted 8 lines
# cd test/ # mkdir testdir ]# getfacl testdir/ # file: testdir/ # owner: root # group: root user::rwx group::rwx
Should be group::r-x?
Quoted 1 line
// missing an acl "group:root:rwx" inherited from parent
mask::rwx is missing too.
Quoted 8 lines
other::r-x
default:user::rwx
default:group::r-x
default:group:root:rwx
default:mask::rwx
default:other::r-xSigned-off-by Kinglong Mee <[email protected]>
Quoted 32 lines
--- fs/f2fs/acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/acl.c +1
-1@@ -396,7 +396,7 @@ int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage,posix_acl_release (default_acl); }if (acl) { -if (error) +if (!error) error =__f2fs_set_acl (inode,ACL_TYPE_ACCESS , acl, ipage);
posix_acl_release(acl);
--
2.1.0------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Linux-f2fs-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel