Re: patch: new sysctl to remove hardcoded ELOOP limit

Linus Torvalds (torvalds@transmeta.com)
Thu, 9 Apr 1998 13:09:47 -0700 (PDT)


On Thu, 9 Apr 1998, Pavel Machek wrote:
>
> > Another useful bit from FreeBSD: a O_NOFOLLOW option for open(). This
> > is a nice idea will prevent lots of /tmp races.
>
> No, as you can still put named pipe there (for example) and it results
> in much more dangerous attacks. You could also make file with 0666 and
> then change contents under victims hands. You really want O_CREAT |
> O_EXCL. If you want to force O_EXCL to anyone using /tmp, you can use
> my ld_preload hack (it was on bugtraq.)

Note that O_NOFOLLOW is still useful, partly because of web-serving etc
where the web-server may want to do validation of symlinks (make sure the
symlink doesn't point to /etc/passwd, for example). So I'd be more than
happy to support O_NOFOLLOW (and it should be fairly easy), but it's never
been a high priority for me,

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu