From: Goffredo Baroncelli <kreijack@libero.it>
To: linux-btrfs@vger.kernel.org
Subject: Re: [RFC] Allow to exec "btrfs subvolume delete" by a non root user
Date: Wed, 20 Oct 2010 05:00:47 +0200 [thread overview]
Message-ID: <201010200500.47793.kreijack@libero.it> (raw)
In-Reply-To: <Pine.LNX.4.64.1010191653550.26790@cobra.newdream.net>
On Wednesday, 20 October, 2010, Sage Weil wrote:
> On Mon, 18 Oct 2010, Goffredo Baroncelli wrote:
>
> > Hi all
> >
> > like my previous patch, this one allow to remove a subvolume by an
ordinary
> > user. Instead of adding this capability to the rmdir(2) syscall, I update
the
> > BTRFS_IOC_SNAP_DESTROY ioctl, relaxing the rules to be execute.
> > The checks are the ones performed by the rmdir(2) syscall. So a
> > subvolume must be empty to be removed by a non-root user. I think that
this
> > increases a lot the usefulness of the snapshot/subvolume.
> >
> > It is possible to pull the code from the branch named "rm-subvolume-not-
root"
> > of the following repository:
> >
> > http://cassiopea.homelinux.net/git/btrfs-unstable.git
> >
> > Comments are welcome.
>
> This looks okay to me. I posted a similar patch a while back[1], but
> didn't want to duplicate the check_sticky and may_delete code and
> implemented a simpler set of checks instead. The full checks are probably
> a better route, although it would be nice if we could avoid duplicating
> the VFS checks in the process. Whether those helpers should be exported
> is someone else's call, though. (The only other may_ functions that are
> exported are may_umount and may_umount_tree.)
I agree about the may_* function. But also there is the case of the
may_create..
Anyway I want to highlight that the main differences between our patches is
the fact that may patches needed the subvolume to be empty. So I skip all the
problem related to removing a "not owned directory - not empty directory"
>
> sage
>
> [1] http://marc.info/?l=linux-btrfs&m=128086492512628&w=2
--
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E C054 BF04 F161 3DC5 0512
prev parent reply other threads:[~2010-10-20 3:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-18 18:04 [RFC] Allow to exec "btrfs subvolume delete" by a non root user Goffredo Baroncelli
2010-10-20 0:00 ` Sage Weil
2010-10-20 3:00 ` Goffredo Baroncelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201010200500.47793.kreijack@libero.it \
--to=kreijack@libero.it \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).