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 | 4f1f5f28b514dda86f6f49465bd5887357e37bc6 (patch) | |
tree | 74895e741f090186c823e383f1e33b741361192d /source | |
parent | 2603ab3c6870f3697751b887e940910713f08985 (diff) | |
download | samba-4f1f5f28b514dda86f6f49465bd5887357e37bc6.tar.gz samba-4f1f5f28b514dda86f6f49465bd5887357e37bc6.tar.xz samba-4f1f5f28b514dda86f6f49465bd5887357e37bc6.zip |
Added the O_NOFOLLOW flag if follow symlinks is set off.
Jeremy.
Diffstat (limited to 'source')
-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 '.' */ |