Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-22 Thread Misono Tomohiro
On 2018/03/21 16:46, Nikolay Borisov wrote: > > > On 20.03.2018 22:06, Goffredo Baroncelli wrote: >> On 03/20/2018 07:45 AM, Misono, Tomohiro wrote: >>> Deletion of subvolume by non-privileged user is completely restricted >>> by default because we can delete a subvolume even if it is not empty >

Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-22 Thread Goffredo Baroncelli
On 03/22/2018 01:15 PM, Austin S. Hemmelgarn wrote: > On 2018-03-21 16:38, Goffredo Baroncelli wrote: >> On 03/21/2018 12:47 PM, Austin S. Hemmelgarn wrote: >>> I agree as well, with the addendum that I'd love to see a new ioctl that >>> does proper permissions checks.  While letting rmdir(2) work

Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-22 Thread Austin S. Hemmelgarn
On 2018-03-21 16:38, Goffredo Baroncelli wrote: On 03/21/2018 12:47 PM, Austin S. Hemmelgarn wrote: I agree as well, with the addendum that I'd love to see a new ioctl that does proper permissions checks.  While letting rmdir(2) work for an empty subvolume with the appropriate permissions woul

Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-21 Thread Goffredo Baroncelli
On 03/21/2018 12:47 PM, Austin S. Hemmelgarn wrote: > I agree as well, with the addendum that I'd love to see a new ioctl that does > proper permissions checks.  While letting rmdir(2) work for an empty > subvolume with the appropriate permissions would be great (it will let rm -r > work correct

Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-21 Thread Austin S. Hemmelgarn
On 2018-03-21 03:46, Nikolay Borisov wrote: On 20.03.2018 22:06, Goffredo Baroncelli wrote: On 03/20/2018 07:45 AM, Misono, Tomohiro wrote: Deletion of subvolume by non-privileged user is completely restricted by default because we can delete a subvolume even if it is not empty and may cause

Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-21 Thread Nikolay Borisov
On 20.03.2018 22:06, Goffredo Baroncelli wrote: > On 03/20/2018 07:45 AM, Misono, Tomohiro wrote: >> Deletion of subvolume by non-privileged user is completely restricted >> by default because we can delete a subvolume even if it is not empty >> and may cause data loss. In other words, when user_

Re: [PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-20 Thread Goffredo Baroncelli
On 03/20/2018 07:45 AM, Misono, Tomohiro wrote: > Deletion of subvolume by non-privileged user is completely restricted > by default because we can delete a subvolume even if it is not empty > and may cause data loss. In other words, when user_subvol_rm_allowed > mount option is used, a user can de

[PATCH] btrfs: Allow non-privileged user to delete empty subvolume by default

2018-03-19 Thread Misono, Tomohiro
Deletion of subvolume by non-privileged user is completely restricted by default because we can delete a subvolume even if it is not empty and may cause data loss. In other words, when user_subvol_rm_allowed mount option is used, a user can delete a subvolume containing the directory which cannot b