Blob Blame History Raw
From 4b192aaf503ea7f5eba27b6e43edcfe54ac6c5a6 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Wed, 26 May 2021 15:04:08 +0200
Subject: [PATCH] s3:modules: Reduce debug level if file doesn't exists on dfs
 share

There is software out there trying to open desktop.ini in every
directory. Avoid spamming the logs with error messages.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun 18 18:14:11 UTC 2021 on sn-devel-184

(cherry picked from commit 4079efae76718a84a4cf24b6613cdc53cdb2dd39)
---
 source3/modules/vfs_default.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 8d592bbad64..ea036b24ddf 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -476,10 +476,17 @@ static NTSTATUS vfswrap_read_dfs_pathat(struct vfs_handle_struct *handle,
 			status = NT_STATUS_OBJECT_TYPE_MISMATCH;
 		} else {
 			status = map_nt_error_from_unix(errno);
-			DBG_ERR("Error reading "
-				"msdfs link %s: %s\n",
-				smb_fname->base_name,
-				strerror(errno));
+			if (errno == ENOENT) {
+				DBG_NOTICE("Error reading "
+					 "msdfs link %s: %s\n",
+					 smb_fname->base_name,
+					 strerror(errno));
+			} else {
+				DBG_ERR("Error reading "
+					"msdfs link %s: %s\n",
+					smb_fname->base_name,
+					strerror(errno));
+			}
 		}
                 goto err;
         }
-- 
2.31.1