[Top] [All Lists]

Re: Errors from basic open_by_handle operations

To: Mark Hills <mark.hills@xxxxxxxxxxxxxx>
Subject: Re: Errors from basic open_by_handle operations
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 9 Apr 2015 23:27:20 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1504091316590.18609@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1504091316590.18609@xxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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.


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>