lkml.org 
[lkml]   [2014]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 2/2] fs,proc: Respect FMODE_WRITE when opening /proc/pid/fd/N
On Mon, Apr 21, 2014 at 09:22:48AM -0700, Andy Lutomirski wrote:

> +static int proc_may_follow(struct nameidata *nd, struct file *f)
> +{
> + if (!nd)
> + return 0; /* This is readlink, */
> +
> + if ((nd->flags & LOOKUP_WRITE) && !(f->f_mode & FMODE_WRITE))
> + return -EACCES;
> +
> + return 0;
> +}

And this is just plain wrong. WTF are you making the traversal of symlink
in the middle of pathname dependent on the open flags?

NAK.


\
 
 \ /
  Last update: 2014-04-21 19:01    [W:1.441 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site