diff options
-rw-r--r-- | source/smbd/open.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c index 72f73deb84b..b42c1bacc34 100644 --- a/source/smbd/open.c +++ b/source/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 '.' */ |