lkml.org 
[lkml]   [1998]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: 2.1.126-ELOOP (not EACCES) for O_NOFOLLOW
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
--- 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;
\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.296 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site