Re: PATCH: O_NOFOLLOW? (was "Linux 2.1.125 doesn't dump core on SIGSEGV")

David Woodhouse (David.Woodhouse@mvhi.com)
Wed, 21 Oct 1998 01:40:43 +0100


chris@cybernet.co.nz said:
> Please pick holes in this.
> I've tested this ever so slightly, and it does appear to work... so if
> someone can say `yes - this makes sense' I'll make another patch with
> the coredump fix proper.

I think you win the race - I've just noticed the differences between 2.1.125
and 2.1.126-pre2 :)

You do want to modify fs/open.c so that O_NOFOLLOW is removed from the flags
after open() time, though, as with all the other such flags.

--- linux/fs/open.c.nofollow Wed Oct 21 00:38:35 1998
+++ linux/fs/open.c Wed Oct 21 00:38:51 1998
@@ -665,7 +665,7 @@
if (error)
goto cleanup_all;
}
- f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
+ f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | O_NOFOLLOW);

fd_install(fd, f);
return 0;

---- ---- ----
David Woodhouse David.Woodhouse@mvhi.com Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger dwmw2@ferret.lmh.ox.ac.uk for PGP key.

-
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/