From: Dave Chinner <david@fromorbit.com>
To: Mark Hills <mark.hills@framestore.com>
Cc: xfs@oss.sgi.com
Subject: Re: Errors from basic open_by_handle operations
Date: Thu, 9 Apr 2015 23:27:20 +1000 [thread overview]
Message-ID: <20150409132720.GF13731@dastard> (raw)
In-Reply-To: <1504091316590.18609@sys953.ldn.framestore.com>
On Thu, Apr 09, 2015 at 01:53:31PM +0100, Mark Hills wrote:
> I am having troubles with elementary file handle functions in libhandle.
>
> A basic open_by_handle is giving "Bad file descriptor".
>
> But I am suspicious of a side effect; using path_to_fshandle earlier in
> the program changes these errors to "Operation not permitted".
EPERM. Root permissions are required to convert file handles back to
file descriptors, as the handle could have been passed to anyone and
open_by_handle has no directory based access/permission checks to
determine if the user actually has permission to access the inode
behind the filehandle.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-04-09 13:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 12:53 Errors from basic open_by_handle operations Mark Hills
2015-04-09 13:09 ` Roger Willcocks
2015-04-09 13:36 ` Mark Hills
2015-04-09 13:27 ` Dave Chinner [this message]
2015-04-09 13:31 ` [PATCH] libhandle: document the need for path_to_handle tinguely
2015-04-13 0:25 ` Dave Chinner
2015-04-09 14:09 ` Errors from basic open_by_handle operations Roger Willcocks
2015-04-09 14:34 ` Mark Hills
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=20150409132720.GF13731@dastard \
--to=david@fromorbit.com \
--cc=mark.hills@framestore.com \
--cc=xfs@oss.sgi.com \
/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