PATCH: 2.1.126-ELOOP (not EACCES) for O_NOFOLLOW

Chris Wedgwood (chris@cybernet.co.nz)
Mon, 26 Oct 1998 14:53:40 +1300


--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii

Linus,

A small fix changing the error code from EACCES to ELOOP when someone
attempts to open a patch when the last component is a link.

This is consistent with FreeBSD and is arguably more logical (too
many linked encountered, and in the case of O_NOFOLLOW, this means >
0).

The original EACCES error is my fault, I jumped the gun a bit sending
you a patch with this is it before checking carefully what other
people do here. Sorry about that.

-Chris

--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="2.1.126-ELOOP.patch"

--- fs/namei.c~ Mon Oct 26 13:39:15 1998
+++ fs/namei.c Mon Oct 26 14:45:41 1998
@@ -626,7 +626,7 @@
if (!inode)
goto exit;

- error = -EACCES;
+ error = -ELOOP; /* same as FreeBSD when using O_NOFOLLOW */
if (S_ISLNK(inode->i_mode))
goto exit;

--/04w6evG8XlLl3ft--

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