Whamcloud - gitweb
b=9780
authorgreen <green>
Thu, 5 Jan 2006 21:45:29 +0000 (21:45 +0000)
committergreen <green>
Thu, 5 Jan 2006 21:45:29 +0000 (21:45 +0000)
Check that we actually encountered a symlink before returning error.

libsysio/src/open.c

index 11516cb..2542d94 100644 (file)
@@ -113,7 +113,7 @@ _sysio_open(struct pnode *pno, int flags, mode_t mode)
        else if (!ino)
                err = _sysio_p_validate(pno, NULL, NULL);
 #ifdef O_NOFOLLOW
-       else if (flags & O_NOFOLLOW)
+       else if (flags & O_NOFOLLOW && S_ISLNK(ino->i_stbuf.st_mode))
                err = -ELOOP;
 #endif
        else {