From: Christof Schmitt Date: Mon, 6 Jan 2020 21:42:05 +0000 (-0700) Subject: vfs_gpfs: Explicitly log when share mode has been denied X-Git-Tag: ldb-2.1.0~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=191e375d2071de5e44110155230da7e0c4b64d54;p=thirdparty%2Fsamba.git vfs_gpfs: Explicitly log when share mode has been denied As this denies access to a file, provide a better error message for easier troubleshooting. Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index 632c8ad044d..a1fc284741d 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -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; }