s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Fri, 31 Jan 2014 09:31:21 +0000 (10:31 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 15 May 2014 00:19:41 +0000 (02:19 +0200)
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 15 02:19:41 CEST 2014 on sn-devel-104

source3/modules/vfs_gpfs.c

index a56af8f99a42b32f818b7a05ef52fa961290d95c..5ad2595544dca530cc12c0832ef2a6ca7d09507c 100644 (file)
@@ -1468,13 +1468,20 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle,  const char *pat
 
         ret = get_gpfs_winattrs(discard_const_p(char, path), &attrs);
         if ( ret == -1){
+               int dbg_lvl;
+
                if (errno == ENOSYS) {
                        return SMB_VFS_NEXT_GETXATTR(handle, path, name, value,
                                                     size);
                }
 
-                DEBUG(1, ("gpfs_get_xattr: Get GPFS attributes failed: "
-                         "%d (%s)\n", ret, strerror(errno)));
+               if (errno != EPERM && errno != EACCES) {
+                       dbg_lvl = 1;
+               } else {
+                       dbg_lvl = 5;
+               }
+               DEBUG(dbg_lvl, ("gpfs_get_xattr: Get GPFS attributes failed: "
+                             "%d (%s)\n", ret, strerror(errno)));
                 return -1;
         }