diff options
author | Jeremy Allison <jra@samba.org> | 2002-01-12 00:50:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-01-12 00:50:01 +0000 |
commit | 68245b54cd561f362762a057d9b99ca43d0bf958 (patch) | |
tree | 9e8ea91a946c2d77ef4f2046d0938c259cfd0273 | |
parent | 1d40138232a22b78f088847d0d72d6ddec17a65e (diff) | |
download | samba-68245b54cd561f362762a057d9b99ca43d0bf958.tar.gz samba-68245b54cd561f362762a057d9b99ca43d0bf958.tar.bz2 samba-68245b54cd561f362762a057d9b99ca43d0bf958.zip |
Added the O_NOFOLLOW flag if follow symlinks is set off.
Jeremy.
(This used to be commit 4f1f5f28b514dda86f6f49465bd5887357e37bc6)
-rw-r--r-- | source3/smbd/open.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 72f73deb84..b42c1bacc3 100644 --- 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 '.' */ |