Commit f168d9fd authored by Ernesto A. Fernández's avatar Ernesto A. Fernández Committed by Linus Torvalds
Browse files

hfsplus: drop ACL support

The HFS+ Access Control Lists have not worked at all for the past five
years, and nobody seems to have noticed.  Besides, POSIX draft ACLs are
not compatible with MacOS.  Drop the feature entirely.

Link: http://lkml.kernel.org/r/20180714190608.wtnmmtjqeyladkut@eaf


Signed-off-by: default avatarErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Acked-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent afd6c9e1
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -11,18 +11,3 @@ config HFSPLUS_FS
	  MacOS 8. It includes all Mac specific filesystem data such as
	  data forks and creator codes, but it also has several UNIX
	  style features such as file ownership and permissions.

config HFSPLUS_FS_POSIX_ACL
	bool "HFS+ POSIX Access Control Lists"
	depends on HFSPLUS_FS
	select FS_POSIX_ACL
	help
	  POSIX Access Control Lists (ACLs) support permissions for users and
	  groups beyond the owner/group/world scheme.

	  It needs to understand that POSIX ACLs are treated only under
	  Linux. POSIX ACLs doesn't mean something under Mac OS X.
	  Mac OS X beginning with version 10.4 ("Tiger") support NFSv4 ACLs,
	  which are part of the NFSv4 standard.

	  If you don't know what Access Control Lists are, say N
+0 −2
Original line number Diff line number Diff line
@@ -8,5 +8,3 @@ obj-$(CONFIG_HFSPLUS_FS) += hfsplus.o
hfsplus-objs := super.o options.o inode.o ioctl.o extents.o catalog.o dir.o btree.o \
		bnode.o brec.o bfind.o tables.o unicode.o wrapper.o bitmap.o part_tbl.o \
		attributes.o xattr.o xattr_user.o xattr_security.o xattr_trusted.o

hfsplus-$(CONFIG_HFSPLUS_FS_POSIX_ACL)	+= posix_acl.o

fs/hfsplus/acl.h

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * linux/fs/hfsplus/acl.h
 *
 * Vyacheslav Dubeyko <slava@dubeyko.com>
 *
 * Handler for Posix Access Control Lists (ACLs) support.
 */

#include <linux/posix_acl_xattr.h>

#ifdef CONFIG_HFSPLUS_FS_POSIX_ACL

/* posix_acl.c */
struct posix_acl *hfsplus_get_posix_acl(struct inode *inode, int type);
int hfsplus_set_posix_acl(struct inode *inode, struct posix_acl *acl,
		int type);
extern int hfsplus_init_posix_acl(struct inode *, struct inode *);

#else  /* CONFIG_HFSPLUS_FS_POSIX_ACL */
#define hfsplus_get_posix_acl NULL
#define hfsplus_set_posix_acl NULL

static inline int hfsplus_init_posix_acl(struct inode *inode, struct inode *dir)
{
	return 0;
}
#endif  /* CONFIG_HFSPLUS_FS_POSIX_ACL */
+2 −7
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include "hfsplus_fs.h"
#include "hfsplus_raw.h"
#include "xattr.h"
#include "acl.h"

static inline void hfsplus_instantiate(struct dentry *dentry,
				       struct inode *inode, u32 cnid)
@@ -455,7 +454,7 @@ static int hfsplus_symlink(struct inode *dir, struct dentry *dentry,
	if (res)
		goto out_err;

	res = hfsplus_init_inode_security(inode, dir, &dentry->d_name);
	res = hfsplus_init_security(inode, dir, &dentry->d_name);
	if (res == -EOPNOTSUPP)
		res = 0; /* Operation is not supported. */
	else if (res) {
@@ -496,7 +495,7 @@ static int hfsplus_mknod(struct inode *dir, struct dentry *dentry,
	if (res)
		goto failed_mknod;

	res = hfsplus_init_inode_security(inode, dir, &dentry->d_name);
	res = hfsplus_init_security(inode, dir, &dentry->d_name);
	if (res == -EOPNOTSUPP)
		res = 0; /* Operation is not supported. */
	else if (res) {
@@ -567,10 +566,6 @@ const struct inode_operations hfsplus_dir_inode_operations = {
	.mknod			= hfsplus_mknod,
	.rename			= hfsplus_rename,
	.listxattr		= hfsplus_listxattr,
#ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
	.get_acl		= hfsplus_get_posix_acl,
	.set_acl		= hfsplus_set_posix_acl,
#endif
};

const struct file_operations hfsplus_dir_operations = {
+0 −1
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@
#define DBG_EXTENT	0x00000020
#define DBG_BITMAP	0x00000040
#define DBG_ATTR_MOD	0x00000080
#define DBG_ACL_MOD	0x00000100

#if 0
#define DBG_MASK	(DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD)
Loading