]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_gpfs: Explicitly log when share mode has been denied
authorChristof Schmitt <cs@samba.org>
Mon, 6 Jan 2020 21:42:05 +0000 (14:42 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 8 Jan 2020 00:01:37 +0000 (00:01 +0000)
As this denies access to a file, provide a better error message for
easier troubleshooting.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_gpfs.c

index 632c8ad044d6186abe84c6fdb6e633055f00241a..a1fc284741d94e4b6eb0c0f89edbd610664b76e2 100644 (file)
@@ -135,7 +135,13 @@ static int set_gpfs_sharemode(files_struct *fsp, uint32_t access_mask,
                return 0;
        }
 
-       DEBUG(10, ("gpfs_set_share failed: %s\n", strerror(errno)));
+       if (errno == EACCES) {
+               DBG_NOTICE("GPFS share mode denied for %s/%s.\n",
+                          fsp->conn->connectpath,
+                          fsp->fsp_name->base_name);
+       } else {
+               DEBUG(10, ("gpfs_set_share failed: %s\n", strerror(errno)));
+       }
 
        return result;
 }