lkml.org 
[lkml]   [1998]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH(es): root coredump fix, O_NOFOLLOW, safer coredump
On Wed, Oct 21, 1998 at 09:04:59PM +1300, Chris Wedgwood wrote:

> pre-2.1.126-2-no-follow.patch
>
> This adds O_NOFOLLOW to the kernel (and hence libc5). I'm not
> sure this is the best way to do this, but it works for me so
> far.
>
> The error returned is ELOOP when someone specifies O_NOFOLLOW
> on a target that is a symlink - I chose this because this is
> what FreeBSD uses.
>
> I'm not sure if the arch. specific stuff is OK, it might be
> one of the other ABIs already has O_NOFOLLOW, in which case
> it should probably use that.

Colin Plumb pointed out this patch is broken. I'll post a new one
which is along the lines of Colin's suggestion on how to do it
`right'.

When doing the original one, I was under the assumption LOOKUP_FOLLOW
applied to all of the path, not just the last bit, hence
open("/proc/self/cwd/some.file",O_RDONLY|O_NOFOLLOW) will succeed.




-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:1.249 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site