From 68245b54cd561f362762a057d9b99ca43d0bf958 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 12 Jan 2002 00:50:01 +0000 Subject: Added the O_NOFOLLOW flag if follow symlinks is set off. Jeremy. (This used to be commit 4f1f5f28b514dda86f6f49465bd5887357e37bc6) --- source3/smbd/open.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') 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 '.' */ -- cgit