git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d40138
)
Added the O_NOFOLLOW flag if follow symlinks is set off.
author
Jeremy Allison
<jra@samba.org>
Sat, 12 Jan 2002 00:50:01 +0000
(
00:50
+0000)
committer
Jeremy Allison
<jra@samba.org>
Sat, 12 Jan 2002 00:50:01 +0000
(
00:50
+0000)
Jeremy.
(This used to be commit
4f1f5f28b514dda86f6f49465bd5887357e37bc6
)
source3/smbd/open.c
patch
|
blob
|
history
diff --git
a/source3/smbd/open.c
b/source3/smbd/open.c
index 72f73deb84bb7a22aeee38b047127df1ab6ca8e4..b42c1bacc34dba2c96fae3a4284eea4494a7cfa7 100644
(file)
--- a/
source3/smbd/open.c
+++ b/
source3/smbd/open.c
@@
-37,6
+37,12
@@
static int fd_open(struct connection_struct *conn, char *fname,
#ifdef O_NONBLOCK
flags |= O_NONBLOCK;
#endif
+
+#ifdef O_NOFOLLOW
+ if (!lp_symlinks(SNUM(conn)))
+ flags |= O_NOFOLLOW;
+#endif
+
fd = conn->vfs_ops.open(conn,fname,flags,mode);
/* Fix for files ending in '.' */