Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b1ec24
)
b=9780
author
green
<green>
Tue, 3 Jan 2006 22:48:44 +0000
(22:48 +0000)
committer
green
<green>
Tue, 3 Jan 2006 22:48:44 +0000
(22:48 +0000)
properly handle O_NOFOLLOW
libsysio/src/open.c
patch
|
blob
|
history
diff --git
a/libsysio/src/open.c
b/libsysio/src/open.c
index
717cdfc
..
132ce39
100644
(file)
--- a/
libsysio/src/open.c
+++ b/
libsysio/src/open.c
@@
-181,6
+181,14
@@
SYSIO_INTERFACE_NAME(open)(const char *path, int flags, ...)
/*
* Ask for the open/creat.
*/
+
+#ifdef O_NOFOLLOW
+ if (pno && pno->p_base->pb_ino && (flags & O_NOFOLLOW) &&
+ S_ISLNK(pno->p_base->pb_ino->i_stbuf.st_mode)) {
+ rtn = -ELOOP;
+ goto error;
+ }
+#endif
rtn = _sysio_open(pno, flags, mode);
if (rtn)
goto error;