Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1215630

Re: [RFC v6 03/40] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [RFC v6 03/40] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD permission flags
Date 2015-08-29 03:10 +0200
Message-ID <q2COC-3lr-5@gated-at.bofh.it> (permalink)
References <pTJ2V-1c2-3@gated-at.bofh.it> <pTJ2W-1c2-29@gated-at.bofh.it> <q2zxo-6Zc-19@gated-at.bofh.it> <q2zQJ-7lW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Aug 28, 2015 2:54 PM, "Andreas Grünbacher"
<andreas.gruenbacher@gmail.com> wrote:
>
> 2015-08-28 23:36 GMT+02:00 Andy Lutomirski <luto@amacapital.net>:
> > Silly question from the peanut gallery: is there any such thing as
> > opening an fd pointing at a file such that the "open file description"
> > (i.e. the struct file) captures the right to delete the file?
> >
> > IOW do we need FMODE_DELETE_SELF?
>
> When would that permission be checked, what syscall would you use to
> unlink an open file descriptor?

Good point.  It's remotely plausible that there's some trick with bind
mounts, it's likely possible to unlink a directory by fd (using
unlinkat), and you can *link* a file (with linkat or /proc), but
unlinkat doesn't appear to allow you to unlink a file by fd.

--Andy

>
> Thanks,
> Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC v6 03/40] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD  permission flags Andy Lutomirski <luto@amacapital.net> - 2015-08-28 23:40 +0200
  Re: [RFC v6 03/40] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD  permission flags Andreas Grünbacher <andreas.gruenbacher@gmail.com> - 2015-08-29 00:00 +0200
    Re: [RFC v6 03/40] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD  permission flags Andy Lutomirski <luto@amacapital.net> - 2015-08-29 03:10 +0200
  Re: [RFC v6 03/40] vfs: Add MAY_DELETE_SELF and MAY_DELETE_CHILD  permission flags bfields@fieldses.org (J. Bruce Fields) - 2015-08-29 00:00 +0200

csiph-web