s3:modules: Reduce debug level if file doesn't exists on dfs share master
authorAndreas Schneider <asn@samba.org>
Wed, 26 May 2021 13:04:08 +0000 (15:04 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 18 Jun 2021 18:14:11 +0000 (18:14 +0000)
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

source3/modules/vfs_default.c

index 79531f83483efde35e0dcb7f68bde37b05d582bd..9acc5bda0ad8770bee3d380f7cce7f2967942688 100644 (file)
@@ -474,10 +474,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;
         }