linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns
@ 2018-05-04 16:47 Eric W. Biederman
  2018-05-08 13:37 ` Seth Forshee
  2018-05-23 16:11 ` Eric W. Biederman
  0 siblings, 2 replies; 8+ messages in thread
From: Eric W. Biederman @ 2018-05-04 16:47 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: lkml, Linux Containers, linux-fsdevel, Alban Crequy,
	Seth Forshee, Sargun Dhillon, Dongsu Park, Serge E. Hallyn


Ensure the translation happens by failing to read or write
posix acls when the filesystem has not indicated it supports
posix acls.

This ensures that modern cached posix acl support is available
and used when dealing with posix acls.  This is important
because only that path has the code to convernt the uids and
gids in posix acls into the user namespace of a fuse filesystem.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---

Miklos after several attempts to handle this better last cycle.  I
figure we should go with the stupid version for now.  I think I know
how to do better but I don't want that to gate forward progress on
fully unprivileged fuse mounts.  Especially as this is the last known
issue to deal with.

 fs/fuse/fuse_i.h |  1 +
 fs/fuse/inode.c  |  7 +++++++
 fs/fuse/xattr.c  | 43 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index f630951df8dc..5256ad333b05 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -985,6 +985,7 @@ ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size);
 int fuse_removexattr(struct inode *inode, const char *name);
 extern const struct xattr_handler *fuse_xattr_handlers[];
 extern const struct xattr_handler *fuse_acl_xattr_handlers[];
+extern const struct xattr_handler *fuse_no_acl_xattr_handlers[];
 
 struct posix_acl;
 struct posix_acl *fuse_get_acl(struct inode *inode, int type);
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 1643043d4fe5..22c76cf8c2e3 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1100,6 +1100,13 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
 	    file->f_cred->user_ns != sb->s_user_ns)
 		goto err_fput;
 
+	/*
+	 * If we are not in the initial user namespace posix
+	 * acls must be translated.
+	 */
+	if (sb->s_user_ns != &init_user_ns)
+		sb->s_xattr = fuse_no_acl_xattr_handlers;
+
 	fc = kmalloc(sizeof(*fc), GFP_KERNEL);
 	err = -ENOMEM;
 	if (!fc)
diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c
index 3caac46b08b0..433717640f78 100644
--- a/fs/fuse/xattr.c
+++ b/fs/fuse/xattr.c
@@ -192,6 +192,26 @@ static int fuse_xattr_set(const struct xattr_handler *handler,
 	return fuse_setxattr(inode, name, value, size, flags);
 }
 
+static bool no_xattr_list(struct dentry *dentry)
+{
+	return false;
+}
+
+static int no_xattr_get(const struct xattr_handler *handler,
+			struct dentry *dentry, struct inode *inode,
+			const char *name, void *value, size_t size)
+{
+	return -EOPNOTSUPP;
+}
+
+static int no_xattr_set(const struct xattr_handler *handler,
+			struct dentry *dentry, struct inode *nodee,
+			const char *name, const void *value,
+			size_t size, int flags)
+{
+	return -EOPNOTSUPP;
+}
+
 static const struct xattr_handler fuse_xattr_handler = {
 	.prefix = "",
 	.get    = fuse_xattr_get,
@@ -209,3 +229,26 @@ const struct xattr_handler *fuse_acl_xattr_handlers[] = {
 	&fuse_xattr_handler,
 	NULL
 };
+
+static const struct xattr_handler fuse_no_acl_access_xattr_handler = {
+	.name  = XATTR_NAME_POSIX_ACL_ACCESS,
+	.flags = ACL_TYPE_ACCESS,
+	.list  = no_xattr_list,
+	.get   = no_xattr_get,
+	.set   = no_xattr_set,
+};
+
+static const struct xattr_handler fuse_no_acl_default_xattr_handler = {
+	.name  = XATTR_NAME_POSIX_ACL_DEFAULT,
+	.flags = ACL_TYPE_ACCESS,
+	.list  = no_xattr_list,
+	.get   = no_xattr_get,
+	.set   = no_xattr_set,
+};
+
+const struct xattr_handler *fuse_no_acl_xattr_handlers[] = {
+	&fuse_no_acl_access_xattr_handler,
+	&fuse_no_acl_default_xattr_handler,
+	&fuse_xattr_handler,
+	NULL
+};
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns
  2018-05-04 16:47 [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns Eric W. Biederman
@ 2018-05-08 13:37 ` Seth Forshee
  2018-05-23 16:11 ` Eric W. Biederman
  1 sibling, 0 replies; 8+ messages in thread
From: Seth Forshee @ 2018-05-08 13:37 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Miklos Szeredi, lkml, Linux Containers, linux-fsdevel,
	Alban Crequy, Sargun Dhillon, Dongsu Park, Serge E. Hallyn

On Fri, May 04, 2018 at 11:47:28AM -0500, Eric W. Biederman wrote:
> 
> Ensure the translation happens by failing to read or write
> posix acls when the filesystem has not indicated it supports
> posix acls.
> 
> This ensures that modern cached posix acl support is available
> and used when dealing with posix acls.  This is important
> because only that path has the code to convernt the uids and
> gids in posix acls into the user namespace of a fuse filesystem.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> ---
> 
> Miklos after several attempts to handle this better last cycle.  I
> figure we should go with the stupid version for now.  I think I know
> how to do better but I don't want that to gate forward progress on
> fully unprivileged fuse mounts.  Especially as this is the last known
> issue to deal with.

This seems reasonable as a short-term measure.

Acked-by: Seth Forshee <seth.forshee@canonical.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns
  2018-05-04 16:47 [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns Eric W. Biederman
  2018-05-08 13:37 ` Seth Forshee
@ 2018-05-23 16:11 ` Eric W. Biederman
  2018-05-29 12:42   ` Eric W. Biederman
  1 sibling, 1 reply; 8+ messages in thread
From: Eric W. Biederman @ 2018-05-23 16:11 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: lkml, Linux Containers, linux-fsdevel, Alban Crequy,
	Seth Forshee, Sargun Dhillon, Dongsu Park, Serge E. Hallyn

ebiederm@xmission.com (Eric W. Biederman) writes:

> Ensure the translation happens by failing to read or write
> posix acls when the filesystem has not indicated it supports
> posix acls.
>
> This ensures that modern cached posix acl support is available
> and used when dealing with posix acls.  This is important
> because only that path has the code to convernt the uids and
> gids in posix acls into the user namespace of a fuse filesystem.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> ---

ping.

Miklos are you around where you can look at this?

> Miklos after several attempts to handle this better last cycle.  I
> figure we should go with the stupid version for now.  I think I know
> how to do better but I don't want that to gate forward progress on
> fully unprivileged fuse mounts.  Especially as this is the last known
> issue to deal with.
>
>  fs/fuse/fuse_i.h |  1 +
>  fs/fuse/inode.c  |  7 +++++++
>  fs/fuse/xattr.c  | 43 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 51 insertions(+)
>
> diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
> index f630951df8dc..5256ad333b05 100644
> --- a/fs/fuse/fuse_i.h
> +++ b/fs/fuse/fuse_i.h
> @@ -985,6 +985,7 @@ ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size);
>  int fuse_removexattr(struct inode *inode, const char *name);
>  extern const struct xattr_handler *fuse_xattr_handlers[];
>  extern const struct xattr_handler *fuse_acl_xattr_handlers[];
> +extern const struct xattr_handler *fuse_no_acl_xattr_handlers[];
>  
>  struct posix_acl;
>  struct posix_acl *fuse_get_acl(struct inode *inode, int type);
> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> index 1643043d4fe5..22c76cf8c2e3 100644
> --- a/fs/fuse/inode.c
> +++ b/fs/fuse/inode.c
> @@ -1100,6 +1100,13 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
>  	    file->f_cred->user_ns != sb->s_user_ns)
>  		goto err_fput;
>  
> +	/*
> +	 * If we are not in the initial user namespace posix
> +	 * acls must be translated.
> +	 */
> +	if (sb->s_user_ns != &init_user_ns)
> +		sb->s_xattr = fuse_no_acl_xattr_handlers;
> +
>  	fc = kmalloc(sizeof(*fc), GFP_KERNEL);
>  	err = -ENOMEM;
>  	if (!fc)
> diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c
> index 3caac46b08b0..433717640f78 100644
> --- a/fs/fuse/xattr.c
> +++ b/fs/fuse/xattr.c
> @@ -192,6 +192,26 @@ static int fuse_xattr_set(const struct xattr_handler *handler,
>  	return fuse_setxattr(inode, name, value, size, flags);
>  }
>  
> +static bool no_xattr_list(struct dentry *dentry)
> +{
> +	return false;
> +}
> +
> +static int no_xattr_get(const struct xattr_handler *handler,
> +			struct dentry *dentry, struct inode *inode,
> +			const char *name, void *value, size_t size)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static int no_xattr_set(const struct xattr_handler *handler,
> +			struct dentry *dentry, struct inode *nodee,
> +			const char *name, const void *value,
> +			size_t size, int flags)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
>  static const struct xattr_handler fuse_xattr_handler = {
>  	.prefix = "",
>  	.get    = fuse_xattr_get,
> @@ -209,3 +229,26 @@ const struct xattr_handler *fuse_acl_xattr_handlers[] = {
>  	&fuse_xattr_handler,
>  	NULL
>  };
> +
> +static const struct xattr_handler fuse_no_acl_access_xattr_handler = {
> +	.name  = XATTR_NAME_POSIX_ACL_ACCESS,
> +	.flags = ACL_TYPE_ACCESS,
> +	.list  = no_xattr_list,
> +	.get   = no_xattr_get,
> +	.set   = no_xattr_set,
> +};
> +
> +static const struct xattr_handler fuse_no_acl_default_xattr_handler = {
> +	.name  = XATTR_NAME_POSIX_ACL_DEFAULT,
> +	.flags = ACL_TYPE_ACCESS,
> +	.list  = no_xattr_list,
> +	.get   = no_xattr_get,
> +	.set   = no_xattr_set,
> +};
> +
> +const struct xattr_handler *fuse_no_acl_xattr_handlers[] = {
> +	&fuse_no_acl_access_xattr_handler,
> +	&fuse_no_acl_default_xattr_handler,
> +	&fuse_xattr_handler,
> +	NULL
> +};

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns
  2018-05-23 16:11 ` Eric W. Biederman
@ 2018-05-29 12:42   ` Eric W. Biederman
  2018-05-29 12:55     ` Miklos Szeredi
  0 siblings, 1 reply; 8+ messages in thread
From: Eric W. Biederman @ 2018-05-29 12:42 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: lkml, Linux Containers, linux-fsdevel, Alban Crequy,
	Seth Forshee, Sargun Dhillon, Dongsu Park, Serge E. Hallyn,
	Miklos Szeredi

ebiederm@xmission.com (Eric W. Biederman) writes:

> ebiederm@xmission.com (Eric W. Biederman) writes:
>
>> Ensure the translation happens by failing to read or write
>> posix acls when the filesystem has not indicated it supports
>> posix acls.
>>
>> This ensures that modern cached posix acl support is available
>> and used when dealing with posix acls.  This is important
>> because only that path has the code to convernt the uids and
>> gids in posix acls into the user namespace of a fuse filesystem.
>>
>> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>> ---
>
> ping.
>
> Miklos are you around where you can look at this?

Perhaps I got the wrong email address.

Ping?


>
>> Miklos after several attempts to handle this better last cycle.  I
>> figure we should go with the stupid version for now.  I think I know
>> how to do better but I don't want that to gate forward progress on
>> fully unprivileged fuse mounts.  Especially as this is the last known
>> issue to deal with.
>>
>>  fs/fuse/fuse_i.h |  1 +
>>  fs/fuse/inode.c  |  7 +++++++
>>  fs/fuse/xattr.c  | 43 +++++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 51 insertions(+)
>>
>> diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
>> index f630951df8dc..5256ad333b05 100644
>> --- a/fs/fuse/fuse_i.h
>> +++ b/fs/fuse/fuse_i.h
>> @@ -985,6 +985,7 @@ ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size);
>>  int fuse_removexattr(struct inode *inode, const char *name);
>>  extern const struct xattr_handler *fuse_xattr_handlers[];
>>  extern const struct xattr_handler *fuse_acl_xattr_handlers[];
>> +extern const struct xattr_handler *fuse_no_acl_xattr_handlers[];
>>  
>>  struct posix_acl;
>>  struct posix_acl *fuse_get_acl(struct inode *inode, int type);
>> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
>> index 1643043d4fe5..22c76cf8c2e3 100644
>> --- a/fs/fuse/inode.c
>> +++ b/fs/fuse/inode.c
>> @@ -1100,6 +1100,13 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
>>  	    file->f_cred->user_ns != sb->s_user_ns)
>>  		goto err_fput;
>>  
>> +	/*
>> +	 * If we are not in the initial user namespace posix
>> +	 * acls must be translated.
>> +	 */
>> +	if (sb->s_user_ns != &init_user_ns)
>> +		sb->s_xattr = fuse_no_acl_xattr_handlers;
>> +
>>  	fc = kmalloc(sizeof(*fc), GFP_KERNEL);
>>  	err = -ENOMEM;
>>  	if (!fc)
>> diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c
>> index 3caac46b08b0..433717640f78 100644
>> --- a/fs/fuse/xattr.c
>> +++ b/fs/fuse/xattr.c
>> @@ -192,6 +192,26 @@ static int fuse_xattr_set(const struct xattr_handler *handler,
>>  	return fuse_setxattr(inode, name, value, size, flags);
>>  }
>>  
>> +static bool no_xattr_list(struct dentry *dentry)
>> +{
>> +	return false;
>> +}
>> +
>> +static int no_xattr_get(const struct xattr_handler *handler,
>> +			struct dentry *dentry, struct inode *inode,
>> +			const char *name, void *value, size_t size)
>> +{
>> +	return -EOPNOTSUPP;
>> +}
>> +
>> +static int no_xattr_set(const struct xattr_handler *handler,
>> +			struct dentry *dentry, struct inode *nodee,
>> +			const char *name, const void *value,
>> +			size_t size, int flags)
>> +{
>> +	return -EOPNOTSUPP;
>> +}
>> +
>>  static const struct xattr_handler fuse_xattr_handler = {
>>  	.prefix = "",
>>  	.get    = fuse_xattr_get,
>> @@ -209,3 +229,26 @@ const struct xattr_handler *fuse_acl_xattr_handlers[] = {
>>  	&fuse_xattr_handler,
>>  	NULL
>>  };
>> +
>> +static const struct xattr_handler fuse_no_acl_access_xattr_handler = {
>> +	.name  = XATTR_NAME_POSIX_ACL_ACCESS,
>> +	.flags = ACL_TYPE_ACCESS,
>> +	.list  = no_xattr_list,
>> +	.get   = no_xattr_get,
>> +	.set   = no_xattr_set,
>> +};
>> +
>> +static const struct xattr_handler fuse_no_acl_default_xattr_handler = {
>> +	.name  = XATTR_NAME_POSIX_ACL_DEFAULT,
>> +	.flags = ACL_TYPE_ACCESS,
>> +	.list  = no_xattr_list,
>> +	.get   = no_xattr_get,
>> +	.set   = no_xattr_set,
>> +};
>> +
>> +const struct xattr_handler *fuse_no_acl_xattr_handlers[] = {
>> +	&fuse_no_acl_access_xattr_handler,
>> +	&fuse_no_acl_default_xattr_handler,
>> +	&fuse_xattr_handler,
>> +	NULL
>> +};

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns
  2018-05-29 12:42   ` Eric W. Biederman
@ 2018-05-29 12:55     ` Miklos Szeredi
  2018-05-29 14:02       ` Eric W. Biederman
  0 siblings, 1 reply; 8+ messages in thread
From: Miklos Szeredi @ 2018-05-29 12:55 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Miklos Szeredi, lkml, Linux Containers, linux-fsdevel,
	Alban Crequy, Seth Forshee, Sargun Dhillon, Dongsu Park,
	Serge E. Hallyn

On Tue, May 29, 2018 at 2:42 PM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
> ebiederm@xmission.com (Eric W. Biederman) writes:
>
>> ebiederm@xmission.com (Eric W. Biederman) writes:
>>
>>> Ensure the translation happens by failing to read or write
>>> posix acls when the filesystem has not indicated it supports
>>> posix acls.
>>>
>>> This ensures that modern cached posix acl support is available
>>> and used when dealing with posix acls.  This is important
>>> because only that path has the code to convernt the uids and
>>> gids in posix acls into the user namespace of a fuse filesystem.
>>>
>>> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>>> ---
>>
>> ping.
>>
>> Miklos are you around where you can look at this?
>
> Perhaps I got the wrong email address.


No, sorry.  I'll queue this up for 4.18.

Just wanted to finish off overlayfs stuff before getting into fuse.

Thanks,
Miklos

>
>>
>>> Miklos after several attempts to handle this better last cycle.  I
>>> figure we should go with the stupid version for now.  I think I know
>>> how to do better but I don't want that to gate forward progress on
>>> fully unprivileged fuse mounts.  Especially as this is the last known
>>> issue to deal with.
>>>
>>>  fs/fuse/fuse_i.h |  1 +
>>>  fs/fuse/inode.c  |  7 +++++++
>>>  fs/fuse/xattr.c  | 43 +++++++++++++++++++++++++++++++++++++++++++
>>>  3 files changed, 51 insertions(+)
>>>
>>> diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
>>> index f630951df8dc..5256ad333b05 100644
>>> --- a/fs/fuse/fuse_i.h
>>> +++ b/fs/fuse/fuse_i.h
>>> @@ -985,6 +985,7 @@ ssize_t fuse_listxattr(struct dentry *entry, char *list, size_t size);
>>>  int fuse_removexattr(struct inode *inode, const char *name);
>>>  extern const struct xattr_handler *fuse_xattr_handlers[];
>>>  extern const struct xattr_handler *fuse_acl_xattr_handlers[];
>>> +extern const struct xattr_handler *fuse_no_acl_xattr_handlers[];
>>>
>>>  struct posix_acl;
>>>  struct posix_acl *fuse_get_acl(struct inode *inode, int type);
>>> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
>>> index 1643043d4fe5..22c76cf8c2e3 100644
>>> --- a/fs/fuse/inode.c
>>> +++ b/fs/fuse/inode.c
>>> @@ -1100,6 +1100,13 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
>>>          file->f_cred->user_ns != sb->s_user_ns)
>>>              goto err_fput;
>>>
>>> +    /*
>>> +     * If we are not in the initial user namespace posix
>>> +     * acls must be translated.
>>> +     */
>>> +    if (sb->s_user_ns != &init_user_ns)
>>> +            sb->s_xattr = fuse_no_acl_xattr_handlers;
>>> +
>>>      fc = kmalloc(sizeof(*fc), GFP_KERNEL);
>>>      err = -ENOMEM;
>>>      if (!fc)
>>> diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c
>>> index 3caac46b08b0..433717640f78 100644
>>> --- a/fs/fuse/xattr.c
>>> +++ b/fs/fuse/xattr.c
>>> @@ -192,6 +192,26 @@ static int fuse_xattr_set(const struct xattr_handler *handler,
>>>      return fuse_setxattr(inode, name, value, size, flags);
>>>  }
>>>
>>> +static bool no_xattr_list(struct dentry *dentry)
>>> +{
>>> +    return false;
>>> +}
>>> +
>>> +static int no_xattr_get(const struct xattr_handler *handler,
>>> +                    struct dentry *dentry, struct inode *inode,
>>> +                    const char *name, void *value, size_t size)
>>> +{
>>> +    return -EOPNOTSUPP;
>>> +}
>>> +
>>> +static int no_xattr_set(const struct xattr_handler *handler,
>>> +                    struct dentry *dentry, struct inode *nodee,
>>> +                    const char *name, const void *value,
>>> +                    size_t size, int flags)
>>> +{
>>> +    return -EOPNOTSUPP;
>>> +}
>>> +
>>>  static const struct xattr_handler fuse_xattr_handler = {
>>>      .prefix = "",
>>>      .get    = fuse_xattr_get,
>>> @@ -209,3 +229,26 @@ const struct xattr_handler *fuse_acl_xattr_handlers[] = {
>>>      &fuse_xattr_handler,
>>>      NULL
>>>  };
>>> +
>>> +static const struct xattr_handler fuse_no_acl_access_xattr_handler = {
>>> +    .name  = XATTR_NAME_POSIX_ACL_ACCESS,
>>> +    .flags = ACL_TYPE_ACCESS,
>>> +    .list  = no_xattr_list,
>>> +    .get   = no_xattr_get,
>>> +    .set   = no_xattr_set,
>>> +};
>>> +
>>> +static const struct xattr_handler fuse_no_acl_default_xattr_handler = {
>>> +    .name  = XATTR_NAME_POSIX_ACL_DEFAULT,
>>> +    .flags = ACL_TYPE_ACCESS,
>>> +    .list  = no_xattr_list,
>>> +    .get   = no_xattr_get,
>>> +    .set   = no_xattr_set,
>>> +};
>>> +
>>> +const struct xattr_handler *fuse_no_acl_xattr_handlers[] = {
>>> +    &fuse_no_acl_access_xattr_handler,
>>> +    &fuse_no_acl_default_xattr_handler,
>>> +    &fuse_xattr_handler,
>>> +    NULL
>>> +};

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns
  2018-05-29 12:55     ` Miklos Szeredi
@ 2018-05-29 14:02       ` Eric W. Biederman
  2018-05-29 14:04         ` [PATCH] fuse: Allow fully unprivileged mounts Eric W. Biederman
  0 siblings, 1 reply; 8+ messages in thread
From: Eric W. Biederman @ 2018-05-29 14:02 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Miklos Szeredi, lkml, Linux Containers, linux-fsdevel,
	Alban Crequy, Seth Forshee, Sargun Dhillon, Dongsu Park,
	Serge E. Hallyn

Miklos Szeredi <mszeredi@redhat.com> writes:

> On Tue, May 29, 2018 at 2:42 PM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
>> ebiederm@xmission.com (Eric W. Biederman) writes:
>>
>>> ebiederm@xmission.com (Eric W. Biederman) writes:
>>>
>>>> Ensure the translation happens by failing to read or write
>>>> posix acls when the filesystem has not indicated it supports
>>>> posix acls.
>>>>
>>>> This ensures that modern cached posix acl support is available
>>>> and used when dealing with posix acls.  This is important
>>>> because only that path has the code to convernt the uids and
>>>> gids in posix acls into the user namespace of a fuse filesystem.
>>>>
>>>> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
>>>> ---
>>>
>>> ping.
>>>
>>> Miklos are you around where you can look at this?
>>
>> Perhaps I got the wrong email address.
>
>
> No, sorry.  I'll queue this up for 4.18.
>
> Just wanted to finish off overlayfs stuff before getting into fuse.

After reading your overlayfs pull it looks like those were some tricky
issues you were dealing with so it makes complete sense.

Then I am going to send you the enablement patch as I think the initial
round of work is done and you can apply them when you are ready.

Eric

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] fuse: Allow fully unprivileged mounts
  2018-05-29 14:02       ` Eric W. Biederman
@ 2018-05-29 14:04         ` Eric W. Biederman
  2018-05-31 14:45           ` Miklos Szeredi
  0 siblings, 1 reply; 8+ messages in thread
From: Eric W. Biederman @ 2018-05-29 14:04 UTC (permalink / raw)
  To: Miklos Szeredi
  Cc: Miklos Szeredi, lkml, Linux Containers, linux-fsdevel,
	Alban Crequy, Seth Forshee, Sargun Dhillon, Dongsu Park,
	Serge E. Hallyn


Now that the fuse and the vfs work is complete.  Allow the fuse filesystem
to be mounted by the root user in a user namespace.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 22c76cf8c2e3..48baa26993f3 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1222,7 +1222,7 @@ static void fuse_kill_sb_anon(struct super_block *sb)
 static struct file_system_type fuse_fs_type = {
 	.owner		= THIS_MODULE,
 	.name		= "fuse",
-	.fs_flags	= FS_HAS_SUBTYPE,
+	.fs_flags	= FS_HAS_SUBTYPE | FS_USERNS_MOUNT,
 	.mount		= fuse_mount,
 	.kill_sb	= fuse_kill_sb_anon,
 };
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] fuse: Allow fully unprivileged mounts
  2018-05-29 14:04         ` [PATCH] fuse: Allow fully unprivileged mounts Eric W. Biederman
@ 2018-05-31 14:45           ` Miklos Szeredi
  0 siblings, 0 replies; 8+ messages in thread
From: Miklos Szeredi @ 2018-05-31 14:45 UTC (permalink / raw)
  To: Eric W. Biederman
  Cc: Miklos Szeredi, lkml, Linux Containers, linux-fsdevel,
	Alban Crequy, Seth Forshee, Sargun Dhillon, Dongsu Park,
	Serge E. Hallyn

On Tue, May 29, 2018 at 4:04 PM, Eric W. Biederman
<ebiederm@xmission.com> wrote:
>
> Now that the fuse and the vfs work is complete.  Allow the fuse filesystem
> to be mounted by the root user in a user namespace.

Thanks, pushed to for-next branch of the fuse tree toghether with the xattr fix.

Miklos

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-31 14:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 16:47 [PATCH] fuse: Ensure posix acls are translated outside of init_user_ns Eric W. Biederman
2018-05-08 13:37 ` Seth Forshee
2018-05-23 16:11 ` Eric W. Biederman
2018-05-29 12:42   ` Eric W. Biederman
2018-05-29 12:55     ` Miklos Szeredi
2018-05-29 14:02       ` Eric W. Biederman
2018-05-29 14:04         ` [PATCH] fuse: Allow fully unprivileged mounts Eric W. Biederman
2018-05-31 14:45           ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).