From 5a103f4abff0503740822c8ed75d9102ee51e8f0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 17 Nov 2004 21:05:47 +0000 Subject: [PATCH] r3823: Fix bug reported by Tom Dickson with follow symlinks = no reporting an incorrect error when it should be access denied. Jeremy. --- source/smbd/vfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/smbd/vfs.c b/source/smbd/vfs.c index f30a5559006..10599c50a12 100644 --- a/source/smbd/vfs.c +++ b/source/smbd/vfs.c @@ -897,7 +897,8 @@ BOOL reduce_name(connection_struct *conn, const pstring fname) } default: DEBUG(1,("reduce_name: couldn't get realpath for %s\n", fname)); - errno = saved_errno; + /* Don't restore the saved errno. We need to return the error that + realpath caused here as it was not one of the cases we handle. JRA. */ return False; } } -- 2.47.3